Bug 430577 - Files created in NFS mounted home directories have user_home_dir_t context on server
Summary: Files created in NFS mounted home directories have user_home_dir_t context on...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: selinux-policy
Version: 5.1
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Daniel Walsh
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-01-28 20:50 UTC by Orion Poplawski
Modified: 2008-05-21 16:06 UTC (History)
2 users (show)

Fixed In Version: RHBA-2008-0465
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-05-21 16:06:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2008:0465 0 normal SHIPPED_LIVE selinux-policy bug fix update 2008-05-20 14:36:31 UTC

Description Orion Poplawski 2008-01-28 20:50:09 UTC
Description of problem:

We automount home directories from our CentOS 5.1 server onto our workstations.
 New files created in the home directories get the context user_home_dir_t
instead of user_home_t.  Is there any way around this?


Version-Release number of selected component (if applicable):
selinux-policy-targeted-2.4.6-115.el5

Comment 1 Daniel Walsh 2008-01-28 21:15:49 UTC
Could you look at http://people.redhat.com/dwalsh/SELinux/RHEL5

This is the U2 policy and I believe this is fixed.

selinux-policy-2.4.6-114.el5

Comment 2 RHEL Program Management 2008-01-28 21:25:33 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 5 Orion Poplawski 2008-02-06 16:03:26 UTC
I'm still seeing this with selinux-policy-2.4.6-115.el5.

Comment 6 Daniel Walsh 2008-02-06 20:39:11 UTC
Do you have the nfs_export_all_rw boolean turned on, or are you in permissive mode?

Comment 7 Orion Poplawski 2008-02-06 20:54:04 UTC
[root@earth ~]# getsebool -a | grep nfs
allow_ftpd_use_nfs --> off
allow_nfsd_anon_write --> off
nfs_export_all_ro --> on
nfs_export_all_rw --> on
nfsd_disable_trans --> off
samba_share_nfs --> on
use_nfs_home_dirs --> off
[root@earth ~]# cat /selinux/enforce
1[root@earth ~]#

Comment 8 Daniel Walsh 2008-02-06 21:05:15 UTC
Orion can you try out policy 119 on

http://people.redhat.com/dwalsh/SELinux/RHEL5



Comment 9 Orion Poplawski 2008-02-06 21:18:27 UTC
Installed and restarted nfs but it doesn't seem to have had an effect.

Comment 10 Daniel Walsh 2008-02-06 21:36:04 UTC
Ok, my policy is broken.

I had added.


userdom_generic_user_home_dir_filetrans_generic_user_home_content(nfsd_t, { file
dir })

But I believe the kernel is actually creating this file.  So I am not sure
whether this would work

	userdom_generic_user_home_dir_filetrans_generic_user_home_content(kernel_t, {
file dir })

Steve, can I do this?


Comment 11 Stephen Smalley 2008-02-06 21:43:15 UTC
Yes, that should work.  The nfsd-initiated kernel thread runs as kernel_t.
Some day it may assume the client's context as its acting context if/when NFSv4
support is complete.


Comment 12 Daniel Walsh 2008-02-07 14:41:54 UTC
Orion, 

Try selinux-policy-2.4.6-120.el5 out on people.

Comment 13 Orion Poplawski 2008-02-07 16:21:57 UTC
Huzzah!  That works.  Thanks Dan.

Comment 17 errata-xmlrpc 2008-05-21 16:06:36 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 the 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-2008-0465.html



Note You need to log in before you can comment on or make changes to this bug.