This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 430577 - Files created in NFS mounted home directories have user_home_dir_t context on server
Files created in NFS mounted home directories have user_home_dir_t context on...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: selinux-policy (Show other bugs)
5.1
All Linux
low Severity low
: rc
: ---
Assigned To: Daniel Walsh
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-01-28 15:50 EST by Orion Poplawski
Modified: 2008-05-21 12:06 EDT (History)
2 users (show)

See Also:
Fixed In Version: RHBA-2008-0465
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-05-21 12:06:36 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Orion Poplawski 2008-01-28 15:50:09 EST
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 16:15:49 EST
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 Product and Program Management 2008-01-28 16:25:33 EST
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 11:03:26 EST
I'm still seeing this with selinux-policy-2.4.6-115.el5.
Comment 6 Daniel Walsh 2008-02-06 15:39:11 EST
Do you have the nfs_export_all_rw boolean turned on, or are you in permissive mode?
Comment 7 Orion Poplawski 2008-02-06 15:54:04 EST
[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 16:05:15 EST
Orion can you try out policy 119 on

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

Comment 9 Orion Poplawski 2008-02-06 16:18:27 EST
Installed and restarted nfs but it doesn't seem to have had an effect.
Comment 10 Daniel Walsh 2008-02-06 16:36:04 EST
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 16:43:15 EST
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 09:41:54 EST
Orion, 

Try selinux-policy-2.4.6-120.el5 out on people.
Comment 13 Orion Poplawski 2008-02-07 11:21:57 EST
Huzzah!  That works.  Thanks Dan.
Comment 17 errata-xmlrpc 2008-05-21 12:06:36 EDT
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.