Bug 674032 - SELinux is preventing /bin/systemctl from 'read' accesses on the directory ntpd.service.
Summary: SELinux is preventing /bin/systemctl from 'read' accesses on the directory nt...
Keywords:
Status: CLOSED DUPLICATE of bug 675278
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: rawhide
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:db5161e99a8...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-31 11:47 UTC by Luya Tshimbalanga
Modified: 2011-04-07 12:01 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-04-07 12:01:48 UTC
Type: ---


Attachments (Terms of Use)
grep systemctl audit.log (1.14 KB, application/octet-stream)
2011-02-01 08:02 UTC, Luya Tshimbalanga
no flags Details

Description Luya Tshimbalanga 2011-01-31 11:47:28 UTC
SELinux is preventing /bin/systemctl from 'read' accesses on the directory ntpd.service.

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

If you believe that systemctl should be allowed read access on the ntpd.service directory 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 systemctl /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:gnomeclock_t:s0-s0:c0.c1023
Target Context                system_u:object_r:cgroup_t:s0
Target Objects                ntpd.service [ dir ]
Source                        systemctl
Source Path                   /bin/systemctl
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           systemd-units-17-1.fc15
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.13-4.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.35.10-74.fc14.i686
                              #1 SMP Thu Dec 23 16:17:40 UTC 2010 i686 i686
Alert Count                   1
First Seen                    Mon 24 Jan 2011 10:51:03 AM PST
Last Seen                     Mon 24 Jan 2011 10:51:03 AM PST
Local ID                      7ab52353-1260-40cb-bfc1-6b5fc0c359e6

Raw Audit Messages
type=AVC msg=audit(1295895063.784:68): avc:  denied  { read } for  pid=2374 comm="systemctl" name="ntpd.service" dev=cgroup ino=15610 scontext=system_u:system_r:gnomeclock_t:s0-s0:c0.c1023 tcontext=system_u:object_r:cgroup_t:s0 tclass=dir


type=SYSCALL msg=audit(1295895063.784:68): arch=i386 syscall=open success=no exit=EACCES a0=8e91810 a1=98800 a2=3e a3=80629e4 items=0 ppid=2372 pid=2374 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=systemctl exe=/bin/systemctl subj=system_u:system_r:gnomeclock_t:s0-s0:c0.c1023 key=(null)

Hash: systemctl,gnomeclock_t,cgroup_t,dir,read

audit2allow

#============= gnomeclock_t ==============
allow gnomeclock_t cgroup_t:dir read;

audit2allow -R

#============= gnomeclock_t ==============
allow gnomeclock_t cgroup_t:dir read;

Comment 1 Miroslav Grepl 2011-01-31 14:30:32 UTC
Can you add this command

auditctl -w /etc/shadow -p w 

And recreate it. I am interested about path to the ntpd.service file.

Comment 2 Luya Tshimbalanga 2011-02-01 08:02:39 UTC
Created attachment 476329 [details]
grep systemctl audit.log

I included part of audit.log. Let knwo if another info is needed.

Comment 3 Miroslav Grepl 2011-02-01 12:15:40 UTC
Could you execute

# semanage permissive -a gnomeclock_t

re-test it and attach AVC messages related to gnomeclock_t. Thanks. 

Also I am interested about the following part of AVC 

type=CWD msg=audit(1296444189.316:358016):  cwd="/"
type=PATH msg=audit(1296444189.316:358016): item=0 name="rhev" inode=3538945 dev=fd:00 mode=040755 ouid=0 ogid=0 rdev=00:00 obj=system_u:object_r:test_t:s0

Comment 4 Daniel Walsh 2011-02-01 16:40:08 UTC
This looks like the ntpd.service is not labelled correctly.

Comment 5 Miroslav Grepl 2011-04-07 12:01:48 UTC

*** This bug has been marked as a duplicate of bug 675278 ***


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