1 |
On Wed, 2005-10-19 at 10:54 -0400, Andy Dustman wrote: |
2 |
> I'm missing some important piece of how to properly mount NFS |
3 |
> filesystems under SELinux. I can get the filesystem to mount, but if I |
4 |
> try to access it, I get permission denied. Additionally, doing ls -dZ |
5 |
> on the mount point shows (none) as the label. |
6 |
|
7 |
NFS does not support exporting of labels, since it does not support |
8 |
xattr. Any NFS filesystems you mount will have (none) as the labels, |
9 |
and all of the contents will have the label system_u:object_r:nfs_t, |
10 |
even if the server is a SELinux machine. So on your client, you have to |
11 |
give access to nfs_t. |
12 |
|
13 |
> So I'm guessing it's labeled nfs_t as would be expected, but even |
14 |
> getting the label is not allowed for the context. |
15 |
|
16 |
I'm not sure what you mean by "getting the label is not allowed for the |
17 |
context". |
18 |
|
19 |
> I'm aware of the need for NFS extensions on the client and server in |
20 |
> order to fully-implement file labelling. |
21 |
|
22 |
Right, except it will not likely be available anytime soon (if ever). |
23 |
You could try the NFSv3 experimental code on nsa.gov/selinux, but I have |
24 |
no idea if its up to date, and its not likely production quality. If |
25 |
NFS were to get real labeling support, it would be on NFSv4, not v3. |
26 |
|
27 |
In fact, I think CIFS is probably the closest network filesystem to |
28 |
having support for SELinux, as it has xattr support. It may just need |
29 |
to be enhanced to have security labels, but I'm not sure. |
30 |
|
31 |
> The server in this case is a NetApp Filer, so I don't expect it to |
32 |
> magically work. From what I am able to tell, all the files should be |
33 |
> labeled nfs_t, but I'm not really sure about this, based on |
34 |
> tunable.te, i.e. nfs_portdir and nfs_home_dirs. |
35 |
|
36 |
You turn on nfs_portdir if you have a portage tree or overlay on NFS. |
37 |
Nfs_home_dirs is if you have a NFS /home. |
38 |
|
39 |
-- |
40 |
Chris PeBenito |
41 |
<pebenito@g.o> |
42 |
Developer, |
43 |
Hardened Gentoo Linux |
44 |
Embedded Gentoo Linux |
45 |
|
46 |
Public Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE6AF9243 |
47 |
Key fingerprint = B0E6 877A 883F A57A 8E6A CB00 BC8E E42D E6AF 9243 |