Bug 1043184 - squid fails to restart due to not being able to read pid file from old instance
Summary: squid fails to restart due to not being able to read pid file from old instance
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted
Version: 20
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: 2013-12-14 18:00 UTC by Tom Hughes
Modified: 2013-12-16 10:23 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-16 10:03:12 UTC
Type: Bug


Attachments (Terms of Use)

Description Tom Hughes 2013-12-14 18:00:49 UTC
Squid fails to restart due to an AVC reading /var/run/squid.pid:

time->Sat Dec 14 17:54:31 2013
type=SYSCALL msg=audit(1387043671.678:8259): arch=40000003 syscall=5 success=no exit=-13 a0=b9367440 a1=8000 a2=1b6 a3=b942b780 items=0 ppid=1 pid=4950 auid=4294967295 uid=23 gid=23 euid=0 suid=0 fsuid=0 egid=23 sgid=23 fsgid=23 ses=4294967295 tty=(none) comm="squid" exe="/usr/sbin/squid" subj=system_u:system_r:squid_t:s0 key=(null)
type=AVC msg=audit(1387043671.678:8259): avc:  denied  { read } for  pid=4950 comm="squid" name="squid.pid" dev="tmpfs" ino=20196 scontext=system_u:system_r:squid_t:s0 tcontext=system_u:object_r:init_var_run_t:s0 tclass=file

Comment 1 Miroslav Grepl 2013-12-16 10:03:12 UTC
Did you run squid by hand? 

Please execute

# restorecon -R -v /var/run/squid.pid

to fix the labeling and reopen if this happens again.

Comment 2 Tom Hughes 2013-12-16 10:08:58 UTC
I hadn't knowingly started it by hand, no.

I had upgraded to F20 on Friday, then on Saturday there was a squid update pushed and when yum installed it and tried to restart squid the restart failed.

Labelling seems to be right now anyway:

gosford [~] % ls -Z /var/run/squid.pid
-rw-r--r--. root squid system_u:object_r:squid_var_run_t:s0 /var/run/squid.pid
gosford [~] % sudo restorecon -R -v /var/run/squid.pid
[sudo] password for tom: 
gosford [~] % ls -Z /var/run/squid.pid                
-rw-r--r--. root squid system_u:object_r:squid_var_run_t:s0 /var/run/squid.pid

and indeed doing a "systemctl restart squid" works so it looks like it has worked itself out.

Comment 3 Miroslav Grepl 2013-12-16 10:23:52 UTC
Ok, please reopen if this happens again. Thank you.


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