Bug 746423

Summary: SELinux is preventing /usr/bin/gok from 'read' accesses on the directory /var/ftp.
Product: [Fedora] Fedora Reporter: Simon <simon>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 14CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:46ae219126f8476d68d2ff9138d44d09d5ba5c1283ee914d98696a7abb509ff9
Fixed In Version: selinux-policy-3.9.7-46.fc14 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-10-30 00:34:51 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 Simon 2011-10-15 16:37:29 UTC
SELinux is preventing /usr/bin/gok from 'read' accesses on the directory /var/ftp.

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

If you believe that gok should be allowed read access on the ftp 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 gok /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:public_content_t:s0
Target Objects                /var/ftp [ dir ]
Source                        gok
Source Path                   /usr/bin/gok
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           gok-2.30.1-1.fc14
Target RPM Packages           vsftpd-2.3.4-1.fc14
Policy RPM                    selinux-policy-3.9.7-44.fc14
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed)
                              2.6.35.14-95.fc14.i686.PAE #1 SMP Tue Aug 16
                              21:12:22 UTC 2011 i686 i686
Alert Count                   4
First Seen                    Fri 26 Aug 2011 09:45:25 BST
Last Seen                     Fri 26 Aug 2011 15:11:10 BST
Local ID                      978834d4-f36b-4989-9358-cdb1d1dceeee

Raw Audit Messages
type=AVC msg=audit(1314367870.324:45778): avc:  denied  { read } for  pid=3306 comm="gok" name="ftp" dev=dm-4 ino=1705929 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:public_content_t:s0 tclass=dir


type=SYSCALL msg=audit(1314367870.324:45778): arch=i386 syscall=open success=no exit=EACCES a0=b1500d08 a1=8000 a2=0 a3=0 items=0 ppid=1 pid=3306 auid=4294967295 uid=42 gid=472 euid=42 suid=42 fsuid=42 egid=472 sgid=472 fsgid=472 tty=(none) ses=4294967295 comm=gok exe=/usr/bin/gok subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 key=(null)

Hash: gok,xdm_t,public_content_t,dir,read

audit2allow

#============= xdm_t ==============
allow xdm_t public_content_t:dir read;

audit2allow -R

#============= xdm_t ==============
allow xdm_t public_content_t:dir read;

Comment 1 Miroslav Grepl 2011-10-17 08:56:12 UTC
You can dontaudit it using

# grep gok /var/log/audit/audit.log | audit2allow -D -M mypol
# semodule -i mypol.pp

Comment 2 Miroslav Grepl 2011-10-20 07:31:52 UTC
Fixed in selinux-policy-3.9.7-46.fc14

Comment 3 Fedora Update System 2011-10-20 11:58:52 UTC
selinux-policy-3.9.7-46.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/selinux-policy-3.9.7-46.fc14

Comment 4 Fedora Update System 2011-10-22 08:22:09 UTC
Package selinux-policy-3.9.7-46.fc14:
* should fix your issue,
* was pushed to the Fedora 14 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.9.7-46.fc14'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-14734
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2011-10-30 00:34:51 UTC
selinux-policy-3.9.7-46.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.