Bug 838810

Summary: can't run irssi with staff_u
Product: Red Hat Enterprise Linux 7 Reporter: Petr Lautrbach <plautrba>
Component: selinux-policyAssignee: Daniel Walsh <dwalsh>
Status: CLOSED NOTABUG QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: mgrepl, mmalik
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-07-10 08:55:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Petr Lautrbach 2012-07-10 08:15:59 UTC
Description of problem:
$ irssi
** (irssi:12107): ERROR **: Couldn't create /home/brq/plautrba/.irssi directory                                                                                                      
Trace/breakpoint trap                

$ ls -lZd . .irssi
drwxr-xr-x. plautrba plautrba staff_u:object_r:user_home_t:s0  .                                                                                                                     
drwx------. plautrba plautrba staff_u:object_r:user_home_t:s0  .irssi                                            
$ id -Z
staff_u:staff_r:staff_t:s0-s0:c0.c1023                   


Version-Release number of selected component (if applicable):
selinux-policy-3.10.0-137.el7.noarch
irssi-0.8.15-8.el7.x86_64


How reproducible:
Always

 
Actual results:
with 'setenforce 0' and 'semanage dontaudit off':

# ausearch -m avc -ts 10:07:20 | audit2allow 
WARNING: Policy would be downgraded from version 27 to 26.
WARNING: Policy would be downgraded from version 27 to 26.


#============= irssi_t ==============
allow irssi_t user_home_t:dir { read getattr open };
#!!!! The source type 'irssi_t' can write to a 'file' of the following type:
# irssi_home_t

allow irssi_t user_home_t:file { read lock ioctl write open };

#============= staff_t ==============
allow staff_t irssi_t:process { siginh noatsecure rlimitinh };

Comment 1 Petr Lautrbach 2012-07-10 08:55:09 UTC
I forgot to set up equivalence /home/brq to /home. Sorry for the noise.