Bug 680760 - SELinux is preventing /bin/systemctl from 'create' accesses on the lnk_file ntpd.service.
Summary: SELinux is preventing /bin/systemctl from 'create' accesses on the lnk_file n...
Keywords:
Status: CLOSED DUPLICATE of bug 675278
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 15
Hardware: i386
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:2492e870b51...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-02-27 15:28 UTC by John Watzke
Modified: 2011-04-11 11:32 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-02-27 22:49:58 UTC
Type: ---


Attachments (Terms of Use)

Description John Watzke 2011-02-27 15:28:10 UTC
SELinux is preventing /bin/systemctl from 'create' accesses on the lnk_file ntpd.service.

*****  Plugin catchall_labels (83.8 confidence) suggests  ********************

If you want to allow systemctl to have create access on the ntpd.service lnk_file
Then you need to change the label on ntpd.service
Do
# semanage fcontext -a -t FILE_TYPE 'ntpd.service'
where FILE_TYPE is one of the following: locale_t. 
Then execute: 
restorecon -v 'ntpd.service'


*****  Plugin catchall (17.1 confidence) suggests  ***************************

If you believe that systemctl should be allowed create access on the ntpd.service lnk_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 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:etc_t:s0
Target Objects                ntpd.service [ lnk_file ]
Source                        systemctl
Source Path                   /bin/systemctl
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           systemd-units-18-1.fc15
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.15-2.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed)
                              2.6.38-0.rc6.git4.1.fc15.i686.PAE #1 SMP Fri Feb
                              25 04:16:45 UTC 2011 i686 i686
Alert Count                   1
First Seen                    Sun 27 Feb 2011 03:22:03 AM CST
Last Seen                     Sun 27 Feb 2011 03:22:03 AM CST
Local ID                      3a706d95-ceca-4361-ab3b-f1878748e58c

Raw Audit Messages
type=AVC msg=audit(1298798523.378:71): avc:  denied  { create } for  pid=2176 comm="systemctl" name="ntpd.service" scontext=system_u:system_r:gnomeclock_t:s0-s0:c0.c1023 tcontext=system_u:object_r:etc_t:s0 tclass=lnk_file


type=SYSCALL msg=audit(1298798523.378:71): arch=i386 syscall=symlink success=no exit=EACCES a0=987b1c0 a1=987b158 a2=987b158 a3=bf8b3f7f items=0 ppid=2136 pid=2176 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,etc_t,lnk_file,create

audit2allow

#============= gnomeclock_t ==============
allow gnomeclock_t etc_t:lnk_file create;

audit2allow -R

#============= gnomeclock_t ==============
allow gnomeclock_t etc_t:lnk_file create;

Comment 1 Miroslav Grepl 2011-02-27 22:49:58 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.