Bug 709573

Summary: SELinux is preventing /bin/touch from 'add_name' accesses on the directory man-db.lock.
Product: [Fedora] Fedora Reporter: Ankur Sinha (FranciscoD) <sanjay.ankur>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 15CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:8ab3e66297db4a771be2b9e08dcd32a6f9d4edc069d4b7e5d89d6af4d23a0014
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-06-01 06:26:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Ankur Sinha (FranciscoD) 2011-06-01 03:56:31 UTC
SELinux is preventing /bin/touch from 'add_name' accesses on the directory man-db.lock.

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

If you believe that touch should be allowed add_name access on the man-db.lock 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 touch /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:system_cronjob_t:s0-s0:c0.c1023
Target Context                system_u:object_r:pppd_t:s0
Target Objects                man-db.lock [ dir ]
Source                        touch
Source Path                   /bin/touch
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           coreutils-8.10-2.fc15
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-26.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.38.6-27.fc15.x86_64 #1 SMP Sun
                              May 15 17:23:28 UTC 2011 x86_64 x86_64
Alert Count                   1
First Seen                    Wed 01 Jun 2011 03:34:23 IST
Last Seen                     Wed 01 Jun 2011 03:34:23 IST
Local ID                      7179e273-2216-47f6-b634-ee18ab5e542d

Raw Audit Messages
type=AVC msg=audit(1306879463.581:483): avc:  denied  { add_name } for  pid=25431 comm="touch" name="man-db.lock" scontext=system_u:system_r:system_cronjob_t:s0-s0:c0.c1023 tcontext=system_u:object_r:pppd_t:s0 tclass=dir


type=SYSCALL msg=audit(1306879463.581:483): arch=x86_64 syscall=open success=no exit=EACCES a0=7fffe94c9f39 a1=941 a2=1b6 a3=32ccd9a3ac items=0 ppid=25427 pid=25431 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=28 comm=touch exe=/bin/touch subj=system_u:system_r:system_cronjob_t:s0-s0:c0.c1023 key=(null)

Hash: touch,system_cronjob_t,pppd_t,dir,add_name

audit2allow

#============= system_cronjob_t ==============
allow system_cronjob_t pppd_t:dir add_name;

audit2allow -R

#============= system_cronjob_t ==============
allow system_cronjob_t pppd_t:dir add_name;

Comment 1 Miroslav Grepl 2011-06-01 05:38:40 UTC
"pppd_t" is a domain type. 

Did you add this label for a directory?

Comment 2 Ankur Sinha (FranciscoD) 2011-06-01 05:51:56 UTC
I'm not sure. I've only done what the troubleshooter asked me to from time to time. Nothing on my own. Should I relabel my entire system once to fix it?

Comment 3 Miroslav Grepl 2011-06-01 06:26:03 UTC
Try to execute

# restorecon -R -v /var

I believe it will fix the problem.

Please reopen the bug it this happens again.