Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 674689

Summary: pyzor with nfs home directories
Product: Red Hat Enterprise Linux 5 Reporter: Orion Poplawski <orion>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Milos Malik <mmalik>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.5CC: dwalsh, mmalik
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: selinux-policy-2.4.6-301.el5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-21 09:19:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Orion Poplawski 2011-02-02 22:24:13 UTC
Description of problem:

pyzor needs to write some files into users' home directories, namely:

/home/<user>/.pyzor/servers

Running on a server with nfs mounted home directories and use_nfs_home_dirs --> on I get:

type=AVC msg=audit(1296684776.239:43866): avc:  denied  { search } for  pid=15209 comm="pyzor" name="" dev=0:1c ino=4288665 scontext=root:system_r:pyzor_t:s0 tcontext=system_u:object_r:nfs_t:s0 tclass=dir
type=AVC msg=audit(1296684776.262:43867): avc:  denied  { write } for  pid=15209 comm="pyzor" name="" dev=0:1c ino=4288665 scontext=root:system_r:pyzor_t:s0 tcontext=system_u:object_r:nfs_t:s0 tclass=dir
type=AVC msg=audit(1296684776.262:43867): avc:  denied  { add_name } for  pid=15209 comm="pyzor" name=".pyzor" scontext=root:system_r:pyzor_t:s0 tcontext=system_u:object_r:nfs_t:s0 tclass=dir
type=AVC msg=audit(1296684776.262:43867): avc:  denied  { create } for  pid=15209 comm="pyzor" name=".pyzor" scontext=root:system_r:pyzor_t:s0 tcontext=root:object_r:nfs_t:s0 tclass=dir
type=AVC msg=audit(1296684776.354:43868): avc:  denied  { create } for  pid=15209 comm="pyzor" name="servers" scontext=root:system_r:pyzor_t:s0 tcontext=root:object_r:nfs_t:s0 tclass=file
type=AVC msg=audit(1296684776.355:43869): avc:  denied  { getattr } for  pid=15209 comm="pyzor" path="/home/vasha/.pyzor/servers" dev=0:1c ino=4292648 scontext=root:system_r:pyzor_t:s0 tcontext=system_u:object_r:nfs_t:s0 tclass=file
type=AVC msg=audit(1296684776.356:43870): avc:  denied  { write } for  pid=15209 comm="pyzor" path="/home/vasha/.pyzor/servers" dev=0:1c ino=4292648 scontext=root:system_r:pyzor_t:s0 tcontext=system_u:object_r:nfs_t:s0 tclass=file
type=AVC msg=audit(1296684776.356:43871): avc:  denied  { read } for  pid=15209 comm="pyzor" name="servers" dev=0:1c ino=4292648 scontext=root:system_r:pyzor_t:s0 tcontext=system_u:object_r:nfs_t:s0 tclass=file
type=AVC msg=audit(1296684821.926:43872): avc:  denied  { search } for  pid=15273 comm="pyzor" name="" dev=0:1c ino=12308737 scontext=root:system_r:pyzor_t:s0 tcontext=system_u:object_r:nfs_t:s0 tclass=dir
type=AVC msg=audit(1296684821.927:43873): avc:  denied  { getattr } for  pid=15273 comm="pyzor" path="/home/orion/.pyzor" dev=0:1c ino=12374237 scontext=root:system_r:pyzor_t:s0 tcontext=system_u:object_r:nfs_t:s0 tclass=dir
type=AVC msg=audit(1296684821.927:43874): avc:  denied  { getattr } for  pid=15273 comm="pyzor" path="/home/orion/.pyzor/servers" dev=0:1c ino=12374279 scontext=root:system_r:pyzor_t:s0 tcontext=system_u:object_r:nfs_t:s0 tclass=file
type=AVC msg=audit(1296684821.927:43875): avc:  denied  { read } for  pid=15273 comm="pyzor" name="servers" dev=0:1c ino=12374279 scontext=root:system_r:pyzor_t:s0 tcontext=system_u:object_r:nfs_t:s0 tclass=file

Version-Release number of selected component (if applicable):
selinux-policy-2.4.6-279.el5_5.2

Comment 1 Miroslav Grepl 2011-02-03 10:53:23 UTC
We treat pyzor/razor policy as spamc_t policy in RHEL6 and we have


tunable_policy(`use_nfs_home_dirs',`
    fs_manage_nfs_dirs(spamc_t)
    fs_manage_nfs_files(spamc_t)
    fs_manage_nfs_symlinks(spamc_t)
')

tunable_policy(`use_samba_home_dirs',`
    fs_manage_cifs_dirs(spamc_t)
    fs_manage_cifs_files(spamc_t)
    fs_manage_cifs_symlinks(spamc_t)
')

I will add these rules for pyzor/razor policy to RHEL5. I mean

tunable_policy(`use_nfs_home_dirs',`
    fs_manage_nfs_dirs(pyzor_t)
    ..
')

tunable_policy(`use_samba_home_dirs',`
    fs_manage_cifs_dirs(pyzor_t)
    ..
')

Comment 3 Miroslav Grepl 2011-03-01 17:08:05 UTC
Fixed in selinux-policy-2.4.6-301.el5

Comment 6 errata-xmlrpc 2011-07-21 09:19:44 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-1069.html

Comment 7 errata-xmlrpc 2011-07-21 11:56:05 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-1069.html