Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
DescriptionMichal Trunecka
2013-03-21 09:10:36 UTC
Description of problem:
Following command:
# sepolicy generate --customize -n mypolicy -d httpd_sys_script_t -w /home
generates policy, but it doesn't extend the given type httpd_sys_script_t, but
created new type mypolicy_t:
# cat mypolicy.te
policy_module(mypolicy, 1.0.0)
gen_require(`
type httpd_sys_script_t;
')
type mypolicy_rw_t;
files_type(mypolicy_rw_t)
########################################
#
# mypolicy customized policy
#
manage_dirs_pattern(mypolicy_t, mypolicy_rw_t, mypolicy_rw_t)
manage_files_pattern(mypolicy_t, mypolicy_rw_t, mypolicy_rw_t)
manage_lnk_files_pattern(mypolicy_t, mypolicy_rw_t, mypolicy_rw_t)
Version-Release number of selected component (if applicable):
policycoreutils-python-2.1.14-23.el7.x86_64
I have fixed this to do
policy_module(mypolicy, 1.0.0)
gen_require(`
type httpd_sys_script_t;
')
type mypolicy_rw_t;
files_type(mypolicy_rw_t)
########################################
#
# mypolicy customized policy
#
manage_dirs_pattern(httpd_sys_script_t, httpd_sys_script_rw_t, httpd_sys_script_rw_t)
manage_files_pattern(httpd_sys_script_t, httpd_sys_script_rw_t, httpd_sys_script_rw_t)
manage_lnk_files_pattern(httpd_sys_script_t, httpd_sys_script_rw_t, httpd_sys_script_rw_t)
But I am not sure this is what the user would expect, In a perfect world, I would have added something like
userdom_manage_home_root()
For that command.
Well, yes.
At least it could just check labeling for the path and use this label in the local policy.
Also a user could define a new type for this writable location.
I am going to switch to modify because of
"I have fixed this to do .."
and we could open a new bug with this feature request for "sepolicy generate -w whatever ...."
This request was resolved in Red Hat Enterprise Linux 7.0.
Contact your manager or support representative in case you have further questions about the request.
Description of problem: Following command: # sepolicy generate --customize -n mypolicy -d httpd_sys_script_t -w /home generates policy, but it doesn't extend the given type httpd_sys_script_t, but created new type mypolicy_t: # cat mypolicy.te policy_module(mypolicy, 1.0.0) gen_require(` type httpd_sys_script_t; ') type mypolicy_rw_t; files_type(mypolicy_rw_t) ######################################## # # mypolicy customized policy # manage_dirs_pattern(mypolicy_t, mypolicy_rw_t, mypolicy_rw_t) manage_files_pattern(mypolicy_t, mypolicy_rw_t, mypolicy_rw_t) manage_lnk_files_pattern(mypolicy_t, mypolicy_rw_t, mypolicy_rw_t) Version-Release number of selected component (if applicable): policycoreutils-python-2.1.14-23.el7.x86_64