Bug 682260

Summary: SELinux is preventing /usr/lib/cyrus-imapd/pop3d from 'write' accesses on the sock_file idle.
Product: [Fedora] Fedora Reporter: Grosswiler Roger <roger>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 14CC: dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:1015052687be980be51ef515725a98c48bffaaf2b05e2d9c275dd85be76e78a3
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-03-31 19:52:24 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 Grosswiler Roger 2011-03-04 15:58:06 UTC
SELinux is preventing /usr/lib/cyrus-imapd/pop3d from 'write' accesses on the sock_file idle.

*****  Plugin catchall_labels (83.8 confidence) suggests  ********************

If you want to allow pop3d to have write access on the idle sock_file
Then you need to change the label on idle
Do
# semanage fcontext -a -t FILE_TYPE 'idle'
where FILE_TYPE is one of the following: lsassd_var_socket_t, avahi_var_run_t, cyrus_var_lib_t, cyrus_var_run_t, dirsrv_var_run_t, abrt_var_run_t, nscd_var_run_t, nslcd_var_run_t, slapd_var_run_t, snmpd_var_lib_t, sssd_var_lib_t, saslauthd_var_run_t, setrans_var_run_t, winbind_var_run_t, devlog_t, nscd_var_run_t, pcscd_var_run_t. 
Then execute: 
restorecon -v 'idle'


*****  Plugin catchall (17.1 confidence) suggests  ***************************

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

Additional Information:
Source Context                unconfined_u:system_r:cyrus_t:s0
Target Context                unconfined_u:object_r:var_lib_t:s0
Target Objects                idle [ sock_file ]
Source                        pop3d
Source Path                   /usr/lib/cyrus-imapd/pop3d
Port                          <Unbekannt>
Host                          (removed)
Source RPM Packages           cyrus-imapd-2.3.16-7.fc14
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.7-31.fc14
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 2.6.35.11-83.fc14.i686.PAE #1 SMP
                              Mon Feb 7 06:57:55 UTC 2011 i686 i686
Alert Count                   1
First Seen                    Fr 04 Mär 2011 16:56:14 CET
Last Seen                     Fr 04 Mär 2011 16:56:14 CET
Local ID                      1553209a-aeeb-4564-a2e7-c610cc3eede6

Raw Audit Messages
type=AVC msg=audit(1299254174.167:30977): avc:  denied  { write } for  pid=3917 comm="pop3d" name="idle" dev=dm-0 ino=2763583 scontext=unconfined_u:system_r:cyrus_t:s0 tcontext=unconfined_u:object_r:var_lib_t:s0 tclass=sock_file


type=SYSCALL msg=audit(1299254174.167:30977): arch=i386 syscall=socketcall success=yes exit=ECHILD a0=b a1=bf8300b0 a2=ee1148 a3=3 items=0 ppid=3906 pid=3917 auid=502 uid=76 gid=12 euid=76 suid=76 fsuid=76 egid=12 sgid=12 fsgid=12 tty=(none) ses=1 comm=pop3d exe=/usr/lib/cyrus-imapd/pop3d subj=unconfined_u:system_r:cyrus_t:s0 key=(null)

Hash: pop3d,cyrus_t,var_lib_t,sock_file,write

audit2allow

#============= cyrus_t ==============
allow cyrus_t var_lib_t:sock_file write;

audit2allow -R

#============= cyrus_t ==============
allow cyrus_t var_lib_t:sock_file write;

Comment 1 Miroslav Grepl 2011-03-07 09:23:44 UTC
Where are "idle", "db.backup1", "lmtp", "__db.001" files located?

Comment 2 Miroslav Grepl 2011-03-07 09:25:32 UTC
*** Bug 682261 has been marked as a duplicate of this bug. ***

Comment 3 Miroslav Grepl 2011-03-07 09:25:51 UTC
*** Bug 682263 has been marked as a duplicate of this bug. ***

Comment 4 Miroslav Grepl 2011-03-07 09:26:38 UTC
*** Bug 682264 has been marked as a duplicate of this bug. ***