Bug 962752
| Summary: | sepolicy generate: Errors when running setup script for generated admin_user policy | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Michal Trunecka <mtruneck> | ||||
| Component: | policycoreutils | Assignee: | Daniel Walsh <dwalsh> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Michal Trunecka <mtruneck> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | medium | ||||||
| Version: | 7.0 | CC: | ebenes, mgrepl, mmalik | ||||
| Target Milestone: | rc | ||||||
| Target Release: | --- | ||||||
| Hardware: | All | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | policycoreutils-2.1.14-63.el7 | Doc Type: | Bug Fix | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2013-09-10 12:17:58 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Bug Depends On: | |||||||
| Bug Blocks: | 917049 | ||||||
| Attachments: |
|
||||||
|
Description
Michal Trunecka
2013-05-14 11:41:53 UTC
Fixed in policycoreutils-2.1.14-44 There is still the message about deprecated macro: testpolicy.te:7: Warning: pcscd_manage_pub_files(passwd_t) has been deprecated testpolicy.te:7: Warning: pcscd_manage_pub_pipes(passwd_t) has been deprecated It concerns the following options: --admin_user --dbus --desktop_user --sandbox --term_user --x_user libsepol error is back in policycoreutils-2.1.14-46.2.el7.x86_64 sepolicy generate -n testpolicy --admin_user -a firewalld really should be sepolicy generate -n testpolicy --confined_admin -a firewalld Depracated wanings should be fixed in selinux-policy-3.12.1-53.el7.noarch Ok, I see. Then the following part of sepolicy generate --help message should be removed: ... [ --admin_user -a ADMIN_DOMAIN | ... The man page is correct regarding this. Ok, how about
... [ --admin_user -r TRANSITIONING_DOMAIN | ...
# sepolicy generate -n testpolicy --admin_user -r wine
which will generate rules for administrative user and
# cat testpolicy.te
...
...
...
optional_policy(`
wine_run(testpolicy_t, testpolicy_r)
')
Created attachment 762828 [details]
sepolicy-generate.patch
--admin_user -r TRANSITION_ROLE (In reply to Daniel Walsh from comment #9) > --admin_user -r TRANSITION_ROLE Better. fixed in policycoreutils-2.1.14-56.el7 Yes, it's working fine.
Only last thing, the man page should be altered accordingly (-r option with admin_user).
And a bit off topic not deserving new bug, but the following line is doubled in man page:
sepolicy generate --inetd [-n NAME] [-w WRITE_PATH ] command
sepolicy generate --inetd [-n NAME] [-w WRITE_PATH ] command
fixed in policycoreutils-2.1.14-57.el7 There is still the old way in man page (policycoreutils-2.1.14-59.el7.x86_64):
sepolicy generate --admin_user [-a ADMIN_ROLE] -n NAME
rpm -q policycoreutils
policycoreutils-2.1.14-59.fc20.x86_64
I don't see this with the rawhide package.
man sepolicy-generate | grep admin_user
sepolicy generate --admin_user -n NAME
--admin_user
That is interesting then. To be sure, I erased and reinstalled the policycoreutils-python and -devel packages, but still:
# rpm -q policycoreutils
policycoreutils-2.1.14-60.el7.x86_64
# man sepolicy-generate | grep admin_user
sepolicy generate --admin_user [-a ADMIN_ROLE] -n NAME
--admin_user
fixed in policycoreutils-2.1.14-63.el7 I really regret to annoy you with this again.
# rpm -q policycoreutils
policycoreutils-2.1.14-63.el7.x86_64
# man sepolicy-generate | grep admin_user
sepolicy generate --admin_user [-a TRANSITION_ROLE] -n NAME
Here it should be -r, not -a ----------^
$ man sepolicy-generate | grep admin_user
sepolicy generate --admin_user [-r TRANSITION_ROLE] -n NAME
--admin_user
|