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_fs.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_fs.h')
| -rw-r--r-- | include/linux/nfs_fs.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index a6d594bb252c..be2bfde99044 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h @@ -172,6 +172,7 @@ struct nfs_inode { #define NFS_INO_ADVISE_RDPLUS 0x0002 /* advise readdirplus */ #define NFS_INO_REVALIDATING 0x0004 /* revalidating attrs */ #define NFS_INO_FLUSH 0x0008 /* inode is due for flushing */ +#define NFS_INO_FAKE_ROOT 0x0080 /* root inode placeholder */ static inline struct nfs_inode *NFS_I(struct inode *inode) { @@ -207,6 +208,7 @@ do { \ #define NFS_FLAGS(inode) (NFS_I(inode)->flags) #define NFS_REVALIDATING(inode) (NFS_FLAGS(inode) & NFS_INO_REVALIDATING) #define NFS_STALE(inode) (NFS_FLAGS(inode) & NFS_INO_STALE) +#define NFS_FAKE_ROOT(inode) (NFS_FLAGS(inode) & NFS_INO_FAKE_ROOT) #define NFS_FILEID(inode) (NFS_I(inode)->fileid) |
