Bug 713472

Summary: SELinux is preventing /usr/libexec/nm-dhcp-client.action from 'search' accesses on the directory /usr/share.
Product: [Fedora] Fedora Reporter: hitech46
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 13CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:e9d0f811914188d6ec7af9d39cd1f0b471e812bc05dff4260da601051ee25439
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-06-15 17:51:05 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 hitech46 2011-06-15 13:59:15 UTC
SELinux is preventing /usr/libexec/nm-dhcp-client.action from 'search' accesses on the directory /usr/share.

*****  Plugin restorecon (99.5 confidence) suggests  *************************

If you want to fix the label. 
/usr/share default label should be usr_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /usr/share

*****  Plugin catchall (1.49 confidence) suggests  ***************************

If you believe that nm-dhcp-client.action should be allowed search access on the share 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 nm-dhcp-client. /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:dhcpc_t:s0
Target Context                unconfined_u:object_r:user_home_t:s0
Target Objects                /usr/share [ dir ]
Source                        nm-dhcp-client.
Source Path                   /usr/libexec/nm-dhcp-client.action
Port                          <Неизвестно>
Host                          (removed)
Source RPM Packages           NetworkManager-0.8.4-1.fc13
Target RPM Packages           filesystem-2.4.31-1.fc13
Policy RPM                    selinux-policy-3.7.19-101.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 2.6.34.8-68.fc13.i686.PAE #1
                              SMP Thu Feb 17 14:54:10 UTC 2011 i686 i686
Alert Count                   397
First Seen                    Вск 22 Май 2011 11:34:50
Last Seen                     Срд 15 Июн 2011 17:51:34
Local ID                      82ea1952-ac25-49e0-8c13-df8c25c0193d

Raw Audit Messages
type=AVC msg=audit(1308145894.128:74): avc:  denied  { search } for  pid=7456 comm="nm-dhcp-client." name="share" dev=dm-0 ino=2228226 scontext=system_u:system_r:dhcpc_t:s0 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=dir


type=SYSCALL msg=audit(1308145894.128:74): arch=i386 syscall=open success=yes exit=ESRCH a0=71c60c a1=8000 a2=1b6 a3=6e0228 items=0 ppid=7455 pid=7456 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=nm-dhcp-client. exe=/usr/libexec/nm-dhcp-client.action subj=system_u:system_r:dhcpc_t:s0 key=(null)

Hash: nm-dhcp-client.,dhcpc_t,user_home_t,dir,search

audit2allow

#============= dhcpc_t ==============
allow dhcpc_t user_home_t:dir search;

audit2allow -R

#============= dhcpc_t ==============
allow dhcpc_t user_home_t:dir search;

Comment 1 Dominick Grift 2011-06-15 14:04:23 UTC
Seems like you have a badly mislabelled file system.

restorecon -R -v /usr

should fix your immediate problem but you may want to

touch /.autorelabel && reboot

to relabel the whole filesystem.

(by the way, consider upgrading, because f13 is near end-of-life)

Comment 2 Daniel Walsh 2011-06-15 17:51:05 UTC
Did you set a label on /usr/share as user_home_t?