Bug 801740 - SELinux is preventing /usr/sbin/chkconfig from 'getattr' accesses on the file /usr/lib/systemd/systemd. [NEEDINFO]
SELinux is preventing /usr/sbin/chkconfig from 'getattr' accesses on the file...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: system-config-samba (Show other bugs)
17
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Nils Philippsen
Fedora Extras Quality Assurance
abrt_hash:eea515ba0e2876e6ab5ec5caa58...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-09 05:25 EST by Barry Godusky
Modified: 2012-06-11 09:38 EDT (History)
14 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-05-26 03:41:07 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
nphilipp: needinfo? (fraggnroll)


Attachments (Terms of Use)

  None (edit)
Description Barry Godusky 2012-03-09 05:25:35 EST
libreport version: 2.0.8
executable:     /usr/bin/python
hashmarkername: setroubleshoot
kernel:         3.3.0-0.rc6.git0.2.fc17.x86_64
reason:         SELinux is preventing /usr/sbin/chkconfig from 'getattr' accesses on the file /usr/lib/systemd/systemd.
time:           Fri 09 Mar 2012 05:25:18 AM EST

description:
:SELinux is preventing /usr/sbin/chkconfig from 'getattr' accesses on the file /usr/lib/systemd/systemd.
:
:*****  Plugin catchall (100. confidence) suggests  ***************************
:
:If you believe that chkconfig should be allowed getattr 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 chkconfig /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                        chkconfig
:Source Path                   /usr/sbin/chkconfig
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           chkconfig-1.3.59-1.fc17.x86_64
:Target RPM Packages           systemd-43-2.fc17.x86_64
:Policy RPM                    selinux-policy-3.10.0-95.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed)
:                              3.3.0-0.rc6.git0.2.fc17.x86_64 #1 SMP Mon Mar 5
:                              16:54:07 UTC 2012 x86_64 x86_64
:Alert Count                   2
:First Seen                    Fri 09 Mar 2012 05:07:16 AM EST
:Last Seen                     Fri 09 Mar 2012 05:08:07 AM EST
:Local ID                      8e573136-f988-4706-9ec2-8b76f5ea45f7
:
:Raw Audit Messages
:type=AVC msg=audit(1331287687.280:117): avc:  denied  { getattr } for  pid=2085 comm="chkconfig" path="/usr/lib/systemd/systemd" dev="dm-1" ino=1445516 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(1331287687.280:117): arch=x86_64 syscall=lstat success=no exit=EACCES a0=1c53430 a1=7fff0b549cb0 a2=7fff0b549cb0 a3=1000 items=0 ppid=2084 pid=2085 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=chkconfig exe=/usr/sbin/chkconfig subj=system_u:system_r:sambagui_t:s0-s0:c0.c1023 key=(null)
:
:Hash: chkconfig,sambagui_t,init_exec_t,file,getattr
:
:audit2allowunable to open /sys/fs/selinux/policy:  Permission denied
:
:
:audit2allow -Runable to open /sys/fs/selinux/policy:  Permission denied
:
:
Comment 1 Miroslav Grepl 2012-03-09 06:58:00 EST
Why does s-c-samba use chkconfig instead of systemctl?
Comment 2 Daniel Walsh 2012-03-09 09:33:01 EST
Does not seem like something we should block.
Comment 3 Nils Philippsen 2012-04-26 06:13:17 EDT
(In reply to comment #1)
> Why does s-c-samba use chkconfig instead of systemctl?

Probably because of the old codebase... I have a piece of code to abstract SysV and systemd services lying around in s-c-date which I'll add to s-c-samba.
Comment 4 Nils Philippsen 2012-04-26 06:39:30 EDT
commit 212f6b4287e2366f583a719c5a0cbdc49e2a568e
Author:     Nils Philippsen <nils@redhat.com>
AuthorDate: Thu Apr 26 12:21:59 2012 +0200

    don't run chkconfig on systemd service units (#801740)
    
    Copy and use service abstraction classes from system-config-date.
Comment 5 Fedora Update System 2012-04-26 07:21:51 EDT
system-config-samba-1.2.97-1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/system-config-samba-1.2.97-1.fc17
Comment 6 Fedora Update System 2012-04-26 07:21:52 EDT
system-config-samba-1.2.97-1.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/system-config-samba-1.2.97-1.fc16
Comment 7 Fedora Update System 2012-04-26 07:21:54 EDT
system-config-samba-1.2.97-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/system-config-samba-1.2.97-1.fc15
Comment 8 Fedora Update System 2012-04-26 15:25:14 EDT
Package system-config-samba-1.2.97-1.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 system-config-samba-1.2.97-1.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-6641/system-config-samba-1.2.97-1.fc17
then log in and leave karma (feedback).
Comment 9 Fedora Update System 2012-05-11 06:25:43 EDT
system-config-samba-1.2.97-1.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 10 Fedora Update System 2012-05-11 06:32:38 EDT
system-config-samba-1.2.97-1.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 11 Fedora Update System 2012-05-26 03:41:07 EDT
system-config-samba-1.2.97-1.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 12 David Sieg 2012-06-11 05:16:49 EDT
(In reply to comment #11)
> system-config-samba-1.2.97-1.fc17 has been pushed to the Fedora 17 stable
> repository.  If problems still persist, please make note of it in this bug
> report.
Still happens on my system.
system-config-samba version: 1.2.97-1.fc17
selinux-policy-targeted: 3.10.0-128.fc17
Comment 13 Nils Philippsen 2012-06-11 09:38:46 EDT
(In reply to comment #12)
> (In reply to comment #11)
> > system-config-samba-1.2.97-1.fc17 has been pushed to the Fedora 17 stable
> > repository.  If problems still persist, please make note of it in this bug
> > report.
> Still happens on my system.
> system-config-samba version: 1.2.97-1.fc17
> selinux-policy-targeted: 3.10.0-128.fc17

I've just tried this out with this version of s-c-samba, both smb and nmb services disabled and stopped. I straced both the frontend and backend (mechanism) programs and found no indication that s-c-samba called chkconfig for any reason. Would you please strace this and check if this is somehow different with you? The commands are:

As root:

strace -Ff -e execve -o /tmp/scsamba-mech.out /usr/share/system-config-samba/system-config-samba-mechanism.py

--> leave it running

As user:

strace -Ff -e execve -o /tmp/scsamba-ui.out /usr/bin/system-config-samba



Try to reproduce the issue and attach the resulting files /tmp/scsamba-mech.out and /tmp/scsamba-ui.out to this ticket. Thanks!

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