From c0e89b264fb01c5b4bb925b32d1b6b7764c44d4a Mon Sep 17 00:00:00 2001 From: neilbrown Date: Fri, 4 Feb 2000 03:34:35 +0000 Subject: [PATCH] Support for NFSEXP_NOAUTHNLM introduced in 2.3.42 --- ChangeLog | 8 ++++++++ support/include/nfs/export.h | 4 ++-- support/nfs/exports.c | 10 ++++++++++ utils/exportfs/exports.man | 31 ++++++++++++++++++++++++++++++- 4 files changed, 50 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index d819637..2fdb46e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Fri Feb 4 23:42:23 EST 2000 Neil Brown + + * support/include/nfs/export.h: added NFSEXP_NOAUTHNLM + * support/nfs/exports.c: added handling for NFSEXP_NOAUTHNLM + * utils/exportfs/exports.man: added documentation for no_auth_nlm. + + This is for supporting a new option introduced in 2.3.42 + Thu Feb 3 14:55:48 2000 H.J. Lu * COPYING: Added. GPL. diff --git a/support/include/nfs/export.h b/support/include/nfs/export.h index cc88f0f..57b0371 100644 --- a/support/include/nfs/export.h +++ b/support/include/nfs/export.h @@ -21,8 +21,8 @@ #define NFSEXP_KERBEROS 0x0080 /* not available */ #define NFSEXP_SUNSECURE 0x0100 #define NFSEXP_CROSSMNT 0x0200 - #define NFSEXP_NOSUBTREECHECK 0x0400 -#define NFSEXP_ALLFLAGS 0x07FF +#define NFSEXP_NOAUTHNLM 0x0800 +#define NFSEXP_ALLFLAGS 0x0FFF #endif /* _NSF_EXPORT_H */ diff --git a/support/nfs/exports.c b/support/nfs/exports.c index 078c806..71420c8 100644 --- a/support/nfs/exports.c +++ b/support/nfs/exports.c @@ -151,6 +151,8 @@ putexportent(struct exportent *ep) "" : "no_"); fprintf(fp, "%ssubtree_check,", (ep->e_flags & NFSEXP_NOSUBTREECHECK)? "no_" : ""); + fprintf(fp, "%ssecure_locks,", (ep->e_flags & NFSEXP_NOAUTHNLM)? + "in" : ""); fprintf(fp, "mapping="); switch (ep->e_maptype) { @@ -307,6 +309,14 @@ parseopts(char *cp, struct exportent *ep) ep->e_flags &= ~NFSEXP_NOSUBTREECHECK; else if (strcmp(opt, "no_subtree_check") == 0) ep->e_flags |= NFSEXP_NOSUBTREECHECK; + else if (strcmp(opt, "auth_nlm") == 0) + ep->e_flags &= ~NFSEXP_NOAUTHNLM; + else if (strcmp(opt, "no_auth_nlm") == 0) + ep->e_flags |= NFSEXP_NOAUTHNLM; + else if (strcmp(opt, "secure_locks") == 0) + ep->e_flags &= ~NFSEXP_NOAUTHNLM; + else if (strcmp(opt, "insecure_locks") == 0) + ep->e_flags |= NFSEXP_NOAUTHNLM; else if (strncmp(opt, "mapping=", 8) == 0) ep->e_maptype = parsemaptype(opt+8); else if (strcmp(opt, "map_identity") == 0) /* old style */ diff --git a/utils/exportfs/exports.man b/utils/exportfs/exports.man index b256e4f..120ed2c 100644 --- a/utils/exportfs/exports.man +++ b/utils/exportfs/exports.man @@ -8,7 +8,7 @@ exports \- NFS file systems being exported (for Kernel based NFS) The file .I /etc/exports serves as the access control list for file systems which may be -exported to NFS clients. It it used by +exported to NFS clients. It is used by .IR exportfs (8) to give information to .IR mountd (8) @@ -124,6 +124,13 @@ However, some NFS clients do not cope well with this situation as, for instance, it is then possible for two files in the one apparent filesystem to have the same inode number. +The +.I nohide +option is currently only effective on +.I "single host +exports. It does not work reliably with netgroup, subnet, or wildcard +exports. + This option can be very useful in some situations, but it should be used with due care, and only after confirming that the client system copes with the situation effectively. @@ -164,6 +171,28 @@ exported with subtree checks enabled. The default of having subtree checks enabled, can be explicitly requested with .IR subtree_check . + +.TP +.IR insecure_locks +.TP +.IR no_auth_nlm +This option (the two names are synonymous) tells the NFS server not to require authentication of +locking requests (i.e. requests which use the NLM protocol). Normally +the NFS server will require a lock request to hold a credential for a +user who has read access to the file. With this flag no access checks +will be performed. + +Early NFS client implementations did not send credentials with lock +requests, and many current NFS clients still exist which are based on +the old implementations. Use this flag if you find that you can only +lock files which are world readable. + +The default behaviour of requiring authentication for NLM requests can +be explicitly requested with either of the synonymous +.IR auth_nlm , +or +.IR secure_locks . + '''.TP '''.I noaccess '''This makes everything below the directory inaccessible for the named -- 2.39.5