SGI 902615: make nohide export option work with wildcard exports
Subsystems (2)
PATCH 1/1 SGI 902615: make nohide export option work with wildcard exports
G'day,
This patch has been sitting around gathering dust for some months, I recently updated and tested it. It changes rpc.mountd to make the "nohide" export option work with 2.4 kernels or if the nfsd filesystem isn't mounted, by pre-loading into the kernel and xtab at mount time all the nohide exports which are enclosed by the export being mounted.
Signed-off-by Greg Banks <[email protected]>
--- ChangeLog | 5 ++ utils/mountd/auth.c | 47 ++++++++++++----------- utils/mountd/mountd.c | 102 ++++++++++++++++++++++++++++++++++++++++++++++++-- utils/mountd/mountd.h | 14 ++++++ utils/mountd/rmtab.c | 2 5 files changed, 144 insertions(+), 26 deletions(-)
ChangeLog +5 -0
@@ -1,3 +1,8 @@ +2004-09-21 Greg Banks <[email protected]> + + * utils/mountd/auth.c, utils/mountd/mountd.c, utils/mountd/mountd.h: + Support "nohide" export option on wildcard export entries. + 2003-09-15 NeilBrown <[email protected]> Release 1.0.6
utils/mountd/auth.c +26 -21
79 lines not on this page · raw message
utils/mountd/mountd.c +99 -3
150 lines not on this page · raw message
utils/mountd/mountd.h +13 -1
@@ -25,6 +25,17 @@ union mountd_results {exports exports; }; +/* used internally only */ +enum auth_error +{ + bad_path, + unknown_host, + no_entry, + not_exported, + illegal_port, + success +}; +/* * Global Function prototypes. */
@@ -42,7 +53,8 @@ void mount_dispatch(struct svc_req *, Svoid auth_init (char *export_file);int auth_reload (void );nfs_export *auth_authenticate (char *what,struct sockaddr_in *sin, -char *path); +char *path,struct hostent **hpp); +enum auth_error auth_authenticate_export (nfs_export *exp,struct sockaddr_in *);void auth_export (nfs_export *exp);void mountlist_add (char *host,const char *path);
utils/mountd/rmtab.c +1 -1
@@ -150,7 +150,7 @@ mountlist_del_all(struct sockaddr_in *si }while ((rep =getrmtabent (1 ,NULL )) !=NULL ) {if (strcmp (rep->r_client, hp->h_name) ==0 && - (exp =auth_authenticate ("umountall" , sin, rep->r_path))) { + (exp =auth_authenticate ("umountall" , sin, rep->r_path,NULL ))) {export_reset (exp);continue ; }
Greg.
Signature · 12 lines
Greg Banks, R&D Software Engineer, SGI Australian Software Group. I don't speak for SGI. ------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php _______________________________________________ NFS maillist - [email protected] https://lists.sourceforge.net/lists/listinfo/nfs