Bug 682464

Summary: SELinux is preventing /usr/bin/sudo from 'open' accesses on the file /usr/bin/sudo.
Product: [Fedora] Fedora Reporter: Bill Bauman <bbauman>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 14CC: dwalsh, gdrapeau, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:3a9a2a4b80d29d81d340a9464619aa7485dbabf6105c61adda39874e9cb5f565
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-26 20:46:59 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 Bill Bauman 2011-03-05 18:27:49 UTC
SELinux is preventing /usr/bin/sudo from 'open' accesses on the file /usr/bin/sudo.

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

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

Additional Information:
Source Context                system_u:system_r:xdm_t:s0-s0:c0.c1023
Target Context                system_u:object_r:sudo_exec_t:s0
Target Objects                /usr/bin/sudo [ file ]
Source                        sudo
Source Path                   /usr/bin/sudo
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           sudo-1.7.4p5-1.fc14
Target RPM Packages           sudo-1.7.4p5-1.fc14
Policy RPM                    selinux-policy-3.9.7-31.fc14
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux baumanfedora13.corp.redhat.com
                              2.6.35.11-83.fc14.x86_64 #1 SMP Mon Feb 7 07:06:44
                              UTC 2011 x86_64 x86_64
Alert Count                   1
First Seen                    Sat 05 Mar 2011 01:26:22 PM EST
Last Seen                     Sat 05 Mar 2011 01:26:22 PM EST
Local ID                      0daf9d23-8b51-4a5e-aff8-2d73da925815

Raw Audit Messages
type=AVC msg=audit(1299349582.509:47): avc:  denied  { open } for  pid=3329 comm="Default" name="sudo" dev=dm-1 ino=38302 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:sudo_exec_t:s0 tclass=file


type=AVC msg=audit(1299349582.509:47): avc:  denied  { execute_no_trans } for  pid=3329 comm="Default" path="/usr/bin/sudo" dev=dm-1 ino=38302 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:sudo_exec_t:s0 tclass=file


type=SYSCALL msg=audit(1299349582.509:47): arch=x86_64 syscall=execve success=yes exit=0 a0=e1bab0 a1=e1cb30 a2=e19cb0 a3=fffffffffffffff0 items=0 ppid=3310 pid=3329 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=sudo exe=/usr/bin/sudo subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 key=(null)

Hash: sudo,xdm_t,sudo_exec_t,file,open

audit2allow

#============= xdm_t ==============
allow xdm_t sudo_exec_t:file { open execute_no_trans };

audit2allow -R

#============= xdm_t ==============
allow xdm_t sudo_exec_t:file { open execute_no_trans };

Comment 1 Miroslav Grepl 2011-03-07 10:46:03 UTC
How did you get this exactly? I mean what you were running?

Comment 2 Daniel Walsh 2011-03-07 22:32:23 UTC
Any change sudo is running within the bashrc files? /etc/profile?