diff options
| author | Frank Cusack <fcusack@fcusack.com> | 2003-07-16 20:28:19 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.osdl.org> | 2003-07-16 20:28:19 -0700 |
| commit | ef8cd3e0ec37c73b8965978ebdf2a79bd1aef7d3 (patch) | |
| tree | 039fe1788dbeb33820d1f40665578306385df997 /include/linux/nfs_mount.h | |
| parent | 35146cf5a480d31c8198c55f8ffbc371fd550359 (diff) | |
[PATCH] Allow unattended nfs3/krb5 mounts
The comment in nfs_get_root() basically describes the patch:
Some authentication types (gss/krb5, most notably)
are such that root won't be able to present a
credential for GETATTR (ie, getroot()).
An easy way (ie, without this patch) to have unattended mounts is to
have a root/host@REALM (or similar) principal stashed in a keytab, which
root (rather, gssd) can use. However, this might not be desirable for
many sites. In any case, RFC2623 specifically describes the problem
addressed here.
Notes:
- Root inode gets inum of 1. This doesn't seem to matter, but may be
aesthetically unpleasing. I wanted to choose an inum unlikely to
conflict with an existing inum (although NFS has specific support
for that). It looks like more work than it's worth to change the
inum after the info is available. AFAICT it's not critical info.
- Solaris has this "wierd" (but understandable) behavior that after
mounting without a credential, the mount point is not visible at all
until an access is attempted with a credential. This now-you-see-it-
now-you-don't behavior doesn't seem worthwhile to reproduce here.
- Unfortunately, MOUNT_VERSION must go to 5. Some kernels with ver 4
do not understand pseudoflavor. Keeping it at 4 means that the
userland mount can't know for sure whether the kernel accepted the
option or not. (Unless I'm missing some hack that could be done.)
It works in my environment, against a netapp server (with the rpcsec_gss
patch I provided earlier).
Diffstat (limited to 'include/linux/nfs_mount.h')
| -rw-r--r-- | include/linux/nfs_mount.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/nfs_mount.h b/include/linux/nfs_mount.h index c2268ca1ccd3..23a9ff52537f 100644 --- a/include/linux/nfs_mount.h +++ b/include/linux/nfs_mount.h @@ -20,7 +20,7 @@ * mount-to-kernel version compatibility. Some of these aren't used yet * but here they are anyway. */ -#define NFS_MOUNT_VERSION 4 +#define NFS_MOUNT_VERSION 5 struct nfs_mount_data { int version; /* 1 */ @@ -40,7 +40,7 @@ struct nfs_mount_data { int namlen; /* 2 */ unsigned int bsize; /* 3 */ struct nfs3_fh root; /* 4 */ - int pseudoflavor; /* 4 */ + int pseudoflavor; /* 5 */ }; /* bits in the flags field */ @@ -57,7 +57,7 @@ struct nfs_mount_data { #define NFS_MOUNT_NONLM 0x0200 /* 3 */ #define NFS_MOUNT_BROKEN_SUID 0x0400 /* 4 */ #define NFS_MOUNT_STRICTLOCK 0x1000 /* reserved for NFSv4 */ -#define NFS_MOUNT_SECFLAVOUR 0x2000 /* reserved */ +#define NFS_MOUNT_SECFLAVOUR 0x2000 /* 5 */ #define NFS_MOUNT_FLAGMASK 0xFFFF #endif |
