From: neilbrown Date: Mon, 14 Jul 2003 22:17:24 +0000 (+0000) Subject: Assorted fixes X-Git-Tag: nfs-utils-1-0-5~2 X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=commitdiff_plain;h=317522198e1493fe0f1b10614ff2f3a582a9aaff;ds=sidebyside Assorted fixes --- diff --git a/ChangeLog b/ChangeLog index f1890c3..8763854 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2003-07-15 NeilBrown + + * utils/mountd/mountd.c(main): getopt string fix for 'o' + * utils/mountd/auth.c(auth_authenticate): remove extra 'free' + * utils/exportfs/exportfs.c(main): make 'exportfs -f' just flush + the caches. + * support/include/nfs/export.h: Reserve a bit for possible ACL + related use. 2003-07-03 NeilBrown diff --git a/support/include/nfs/export.h b/support/include/nfs/export.h index d79a179..9c73aaa 100644 --- a/support/include/nfs/export.h +++ b/support/include/nfs/export.h @@ -25,6 +25,7 @@ #define NFSEXP_NOAUTHNLM 0x0800 #define NFSEXP_FSID 0x2000 #define NFSEXP_CROSSMNT 0x4000 -#define NFSEXP_ALLFLAGS 0x7FFF +#define NFSEXP_NOACL 0x8000 /* reserved for possible ACL related use */ +#define NFSEXP_ALLFLAGS 0xFFFF #endif /* _NSF_EXPORT_H */ diff --git a/utils/exportfs/exportfs.c b/utils/exportfs/exportfs.c index ab8a4a2..5196564 100644 --- a/utils/exportfs/exportfs.c +++ b/utils/exportfs/exportfs.c @@ -91,11 +91,14 @@ main(int argc, char **argv) fprintf(stderr, "exportfs: -r and -u are incompatible.\n"); return 1; } - if (optind == argc && ! f_all) { - xtab_export_read(); - dump(f_verbose); - return 0; - } + if (optind == argc && ! f_all) + if (force_flush) { + cache_flush(1); + } else { + xtab_export_read(); + dump(f_verbose); + return 0; + } new_cache = check_new_cache(); diff --git a/utils/mountd/auth.c b/utils/mountd/auth.c index f968b07..6361fce 100644 --- a/utils/mountd/auth.c +++ b/utils/mountd/auth.c @@ -166,7 +166,6 @@ auth_authenticate(char *what, struct sockaddr_in *caller, char *path) if (p == epath) p++; *p = '\0'; } - free(hp); switch (error) { case bad_path: diff --git a/utils/mountd/mountd.c b/utils/mountd/mountd.c index 953891d..ae5daa1 100644 --- a/utils/mountd/mountd.c +++ b/utils/mountd/mountd.c @@ -438,7 +438,7 @@ main(int argc, char **argv) /* Parse the command line options and arguments. */ opterr = 0; - while ((c = getopt_long(argc, argv, "on:Fd:f:p:P:hN:V:v", longopts, NULL)) != EOF) + while ((c = getopt_long(argc, argv, "o:n:Fd:f:p:P:hN:V:v", longopts, NULL)) != EOF) switch (c) { case 'o': descriptors = atoi(optarg);