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.
DescriptionJonathan Underwood
2013-12-05 19:18:35 UTC
Description of problem:
With SELinux enforcing, issuing a cobbler sync results in:
..snip...
running: service dhcpd restart
received on stdout: Shutting down dhcpd: [ OK ]
Starting dhcpd: [ OK ]
received on stderr: /etc/init.d/functions: line 19: /sbin/consoletype: Permission denied
..snip..
Putting SELinux into permissive prevents this from happening.
Unfortunately nothing is reported in audit.log as far as I can tell.
Version-Release number of selected component (if applicable):
# rpm -qa | grep cobbler
cobbler-2.4.0-1.el6.noarch
# rpm -qa | grep selinux
ipa-server-selinux-3.0.0-26.el6_4.4.x86_64
libselinux-python-2.0.94-5.3.el6_4.1.x86_64
libselinux-2.0.94-5.3.el6_4.1.x86_64
selinux-policy-targeted-3.7.19-195.el6_4.18.noarch
libselinux-ruby-2.0.94-5.3.el6_4.1.x86_64
libselinux-utils-2.0.94-5.3.el6_4.1.x86_64
selinux-policy-3.7.19-195.el6_4.18.noarch
pki-selinux-9.0.3-30.el6.noarch
How reproducible:
Everytime
Steps to Reproduce:
1. run cobbler sync
2.
3.
Actual results:
received on stderr: /etc/init.d/functions: line 19: /sbin/consoletype: Permission denied
Expected results:
No error
Additional info:
Comment 1Jonathan Underwood
2013-12-05 19:25:38 UTC
Created attachment 833303[details]
Strace of cobbler sync
strace -f -e write=1,2 cobbler sync 2>cobbler.strace output with SELinux in enforcing mode
Comment 5Jonathan Underwood
2013-12-10 13:42:46 UTC
(In reply to Miroslav Grepl from comment #4)
> Does it work in permissive mode?
Yes, as I mentioned in the original report, switching to permissive (setenforce 0) makes everything work as it should, and the message "received on stderr: /etc/init.d/functions: line 19: /sbin/consoletype: Permission denied" is not displayed.
Could you try with dontaudit rules off.
#semodule -DB
Generate the AVCs
Look for consoletype command and see if there are AVCs related.
#semodule -B
Will turn dontaudit rules back on.
Comment 7Jonathan Underwood
2013-12-16 17:18:27 UTC
Hm. Unfortunately I can no longer reproduce the problem. I notice the system has recently updated to selinux-policy-targeted-3.7.19-231.el6.noarch, so perhaps that addressed the issue somehow. I'll close this and re-open it if I see it again.