Bug 771238 - SELinux is preventing /bin/systemctl from 'write' accesses on the sock_file private
Summary: SELinux is preventing /bin/systemctl from 'write' accesses on the sock_file p...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted
Version: 16
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-01-02 19:29 UTC by Eddie Lania
Modified: 2012-01-11 06:18 UTC (History)
1 user (show)

Fixed In Version: selinux-policy-3.10.0-71.fc16
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-01-11 06:18:11 UTC
Type: ---


Attachments (Terms of Use)

Description Eddie Lania 2012-01-02 19:29:14 UTC
Description of problem:

A "grep systemctl /var/log/audit/audit.log" gives:

type=AVC msg=audit(1324779485.708:1797): avc:  denied  { write } for  pid=27830 comm="systemctl" name="private" dev=tmpfs ino=10351 scontext=system_u:system_r:logrotate_t:s0-s0:c0.c1023 tcontext=system_u:object_r:init_var_run_t:s0 tclass=sock_file
type=SYSCALL msg=audit(1324779485.708:1797): arch=c000003e syscall=42 success=no exit=-13 a0=3 a1=7fffebbb98e0 a2=16 a3=0 items=0 ppid=27829 pid=27830 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=173 comm="systemctl" exe="/bin/systemctl" subj=system_u:system_r:logrotate_t:s0-s0:c0.c1023 key=(null)
type=AVC msg=audit(1325385425.406:1170): avc:  denied  { write } for  pid=20490 comm="systemctl" name="private" dev=tmpfs ino=10342 scontext=system_u:system_r:logrotate_t:s0-s0:c0.c1023 tcontext=system_u:object_r:init_var_run_t:s0 tclass=sock_file
type=SYSCALL msg=audit(1325385425.406:1170): arch=c000003e syscall=42 success=no exit=-13 a0=3 a1=7fff1d6d7670 a2=16 a3=0 items=0 ppid=20489 pid=20490 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=102 comm="systemctl" exe="/bin/systemctl" subj=system_u:system_r:logrotate_t:s0-s0:c0.c1023 key=(null)




Version-Release number of selected component (if applicable):

selinux-policy-targeted-3.10.0-69.fc16.noarch


How reproducible: Every time when weekly logrotate takes place.


Steps to Reproduce:
1. Install logrotate
2. observe /var/log/audit/audit.log
3.
  
Actual results: vc:  denied  { write } for  pid=20490 comm="systemctl" name="private" dev=tmpfs ino=10342 scontext=system_u:system_r:logrotate_t:s0-s0:c0.c1023 tcontext=system_u:object_r:init_var_run_t:s0 tclass=sock_file


Expected results: No such denial.



Additional info:

Comment 1 Miroslav Grepl 2012-01-03 07:20:50 UTC
Fixed in elinux-policy-targeted-3.10.0-70.fc16.noarch

Comment 2 Fedora Update System 2012-01-03 23:47:43 UTC
selinux-policy-3.10.0-71.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-71.fc16

Comment 3 Fedora Update System 2012-01-05 21:08:00 UTC
Package selinux-policy-3.10.0-71.fc16:
* should fix your issue,
* was pushed to the Fedora 16 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-71.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-0154/selinux-policy-3.10.0-71.fc16
then log in and leave karma (feedback).

Comment 4 Eddie Lania 2012-01-08 12:15:36 UTC
I think it is solved.

I installed selinux-policy-3.10.0-71 on 01/05/2012.

After logrotation took place last night:

ausearch -c systemctl -ts 01/05/2012
<no matches>

while previous week:

ausearch -c systemctl -ts 01/01/2012 -te 01/05/2012
----
time->Sun Jan  1 03:37:05 2012
type=SYSCALL msg=audit(1325385425.406:1170): arch=c000003e syscall=42 success=no exit=-13 a0=3 a1=7fff1d6d7670 a2=16 a3=0 items=0 ppid=20489 pid=20490 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=102 comm="systemctl" exe="/bin/systemctl" subj=system_u:system_r:logrotate_t:s0-s0:c0.c1023 key=(null)
type=AVC msg=audit(1325385425.406:1170): avc:  denied  { write } for  pid=20490 comm="systemctl" name="private" dev=tmpfs ino=10342 scontext=system_u:system_r:logrotate_t:s0-s0:c0.c1023 tcontext=system_u:object_r:init_var_run_t:s0 tclass=sock_file

I consider it solved.

Thank you.

Regards,

Eddie.

Comment 5 Fedora Update System 2012-01-11 06:18:11 UTC
selinux-policy-3.10.0-71.fc16 has been pushed to the Fedora 16 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.