This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 839175 - Whenver I run it I get SELinux errors
Whenver I run it I get SELinux errors
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted (Show other bugs)
17
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-11 03:05 EDT by Didact
Modified: 2012-08-01 14:22 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-08-01 14:22:08 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Didact 2012-07-11 03:05:00 EDT
Get SE Linux errors, 3 every time I run it.  This happens before I can authenticate as root.  (I sometimes get other errors as well).  

SELinux is preventing /usr/bin/python2.7 from execute access on the file /usr/lib/systemd/systemd.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that python2.7 should be allowed execute access on the systemd file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep system-config-s /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:sambagui_t:s0-s0:c0.c1023
Target Context                system_u:object_r:init_exec_t:s0
Target Objects                /usr/lib/systemd/systemd [ file ]
Source                        system-config-s
Source Path                   /usr/bin/python2.7
Port                          <Unknown>
Host                          apollo
Source RPM Packages           python-2.7.3-6.fc17.x86_64
Target RPM Packages           systemd-44-17.fc17.x86_64
Policy RPM                    selinux-policy-3.10.0-134.fc17.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     apollo
Platform                      Linux apollo 3.4.4-5.fc17.x86_64 #1 SMP Thu Jul 5
                              20:20:59 UTC 2012 x86_64 x86_64
Alert Count                   1
First Seen                    Wed 11 Jul 2012 12:03:38 AM PDT
Last Seen                     Wed 11 Jul 2012 12:03:38 AM PDT
Local ID                      052ec02c-b32c-4ae2-91cf-71c37d4864dc

Raw Audit Messages
type=AVC msg=audit(1341990218.160:4937): avc:  denied  { execute } for  pid=7131 comm="system-config-s" name="systemd" dev="dm-1" ino=2097772 scontext=system_u:system_r:sambagui_t:s0-s0:c0.c1023 tcontext=system_u:object_r:init_exec_t:s0 tclass=file


type=SYSCALL msg=audit(1341990218.160:4937): arch=x86_64 syscall=access success=no exit=EACCES a0=fc69d0 a1=1 a2=3ea73b39c8 a3=20 items=0 ppid=1 pid=7131 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=system-config-s exe=/usr/bin/python2.7 subj=system_u:system_r:sambagui_t:s0-s0:c0.c1023 key=(null)

Hash: system-config-s,sambagui_t,init_exec_t,file,execute

audit2allowunable to open /sys/fs/selinux/policy:  Permission denied


audit2allow -Runable to open /sys/fs/selinux/policy:  Permission denied
Comment 1 Nils Philippsen 2012-07-11 06:08:55 EDT
The system-config-samba backend mechanism (/usr/share/system-config-samba/system-config-samba-mechanism.py) checks whether both /bin/systemctl and /bin/systemd are executable -- access(..., X_OK) -- to determine if it should use systemd or SysV methods to handle system services. I figure this causes the AVC denial -- it definitely doesn't execute the program. It must be allowed to check for this in order to work right, changing component accordingly.
Comment 2 Nils Philippsen 2012-07-11 06:10:36 EDT
NB: the AVC denial only happens if the mechanism is started via dbus service activation. If I start it manually as root, I don't get it.
Comment 3 Miroslav Grepl 2012-07-11 08:08:46 EDT
Yeap, as you say, this is access check

syscall=access
Comment 4 Miroslav Grepl 2012-07-11 08:17:42 EDT
Fixed in selinux-policy-3.10.0-138.fc17.noarch
Comment 5 Fedora Update System 2012-07-27 11:34:51 EDT
selinux-policy-3.10.0-142.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-142.fc17
Comment 6 Fedora Update System 2012-07-27 21:24:36 EDT
Package selinux-policy-3.10.0-142.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.10.0-142.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-11215/selinux-policy-3.10.0-142.fc17
then log in and leave karma (feedback).
Comment 7 Fedora Update System 2012-08-01 14:22:08 EDT
selinux-policy-3.10.0-142.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.