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-07 10:09:57 UTC
Description of problem:
The generated domain type for given application is permissive domain by default (i.e. defined in the generated module). From my point of view it is confusing because no documentation mentions it. In addition, following note is in the generated:
"Note: semanage permissive -a mojeapp_t can be used to make the process type mojeapp_t permissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated."
Which would make more sense if the domain type wasn't permissive by default.
And second manpage thing, when I generate policy for "mydaemon", in generated manpage is correctly listed only the new domain:
The following process types are defined for mydaemon:
mydaemon_t
whereas when generated policy for "testd", there is listed also one unrelated testapp domain:
The following process types are defined for testd:
testd_t, testapp_t
Version-Release number of selected component (if applicable):
policycoreutils-python-2.1.14-16.el7.x86_64
How reproducible:
always
Steps to Reproduce:
1. sepolicy generate --init mydaemon
2a. cat mydaemon.te
....
permissive mydaemon_t;
....
2b. ./mydaemon.sh; man mydaemon_selinux.8
Actual results:
domain type is permissive by default
unrelated testapp_t is listed in testd_selinux generated man page
Expected results:
Better, domains aren't permissive by default. If it has a reason, it should be described better in documentation.
Added the following to the sepolicy-generate man page
Note: Policy generated by sepolicy generate will automatically add a permissive DOMAIN to your te file. When you are satisfied that your policy works, you need to remove the permissive line from the te file to run your domain in enforcing mode.
Also fixed sepolicy manpage to match on domain(d)_* rather then domain(d)*
Fixed in policycoreutils-2.1.14-20.el7
With the new version, I miss completely the line with the process types (one type respectively).
Moreover, the testapp is showed among the referred man pages:
SEE ALSO
selinux(8), testd(8), ..... testapp_selinux(8)
# rpm -qa policycoreutils\*
policycoreutils-gui-2.1.14-20.el7.x86_64
policycoreutils-2.1.14-20.el7.x86_64
policycoreutils-devel-2.1.14-20.el7.x86_64
policycoreutils-sandbox-2.1.14-20.el7.x86_64
policycoreutils-restorecond-2.1.14-20.el7.x86_64
policycoreutils-python-2.1.14-20.el7.x86_64
policycoreutils-newrole-2.1.14-20.el7.x86_64
I have aproblem with this bugzilla since it is reporting two or more bugs.
First the original bug about permissive domains sh
I see
man sepolicy-generate
...
Note: Policy generated by sepolicy generate will automatically add a
permissive DOMAIN to your te file. When you are satisfied that your
policy works, you need to remove the permissive line from the te file
to run your domain in enforcing mode.
Do you agree this is fixed?
Created attachment 710156[details]
FIxed manpage.py
Can you save this python file to /usr/lib64/python2.7/site-packages/sepolicy/manpage.py and see if it fixes the problem. If yes I will build a new update for RHEL.
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: The generated domain type for given application is permissive domain by default (i.e. defined in the generated module). From my point of view it is confusing because no documentation mentions it. In addition, following note is in the generated: "Note: semanage permissive -a mojeapp_t can be used to make the process type mojeapp_t permissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated." Which would make more sense if the domain type wasn't permissive by default. And second manpage thing, when I generate policy for "mydaemon", in generated manpage is correctly listed only the new domain: The following process types are defined for mydaemon: mydaemon_t whereas when generated policy for "testd", there is listed also one unrelated testapp domain: The following process types are defined for testd: testd_t, testapp_t Version-Release number of selected component (if applicable): policycoreutils-python-2.1.14-16.el7.x86_64 How reproducible: always Steps to Reproduce: 1. sepolicy generate --init mydaemon 2a. cat mydaemon.te .... permissive mydaemon_t; .... 2b. ./mydaemon.sh; man mydaemon_selinux.8 Actual results: domain type is permissive by default unrelated testapp_t is listed in testd_selinux generated man page Expected results: Better, domains aren't permissive by default. If it has a reason, it should be described better in documentation.