From: Steinar H. Gunderson Date: Wed, 5 Apr 2006 20:54:09 +0000 (+0200) Subject: Imported Debian patch 1.0.7-8 X-Git-Tag: debian/1%1.0.7-8^0 X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=commitdiff_plain;h=e873a11144f5cbfa6b54a3b2eb3af131cbd5ebbd;hp=ab1d7b6062aba3bb5cf62325b37ee1e34b864c3f Imported Debian patch 1.0.7-8 --- diff --git a/confdefs.h b/confdefs.h deleted file mode 100644 index 0010349..0000000 --- a/confdefs.h +++ /dev/null @@ -1,4 +0,0 @@ - -#define NFS3_SUPPORTED 1 -#define NFS4_SUPPORTED 1 -#define GSS_SUPPORTED 1 diff --git a/debian/changelog b/debian/changelog index a36dd98..bbb9d29 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +nfs-utils (1:1.0.7-8) unstable; urgency=low + + * Don't complain about missing sync/async for a read-only export. + (Closes: #265409) + * Implement --state-directory-path for rpc.mountd; most code borrowed + from rpc.statd. (Closes: #352387) + * Update mountd.man accordingly. + + -- Steinar H. Gunderson Wed, 5 Apr 2006 22:54:09 +0200 + nfs-utils (1:1.0.7-7) unstable; urgency=high * urgency=high, fixes an RC bug. diff --git a/support/nfs/exports.c b/support/nfs/exports.c index 1e3854b..7194c08 100644 --- a/support/nfs/exports.c +++ b/support/nfs/exports.c @@ -448,7 +448,7 @@ bad_option: ep->e_nsqgids = nsqgids; out: - if (warn && !had_sync_opt) + if (warn && !had_sync_opt && !(ep->e_flags & NFSEXP_READONLY)) xlog(L_WARNING, "%s [%d]: No 'sync' or 'async' option specified for export \"%s:%s\".\n" " Assuming default behaviour ('sync').\n" " NOTE: this default has changed from previous versions\n", diff --git a/utils/mountd/mountd.c b/utils/mountd/mountd.c index 14dac41..a2ecb98 100644 --- a/utils/mountd/mountd.c +++ b/utils/mountd/mountd.c @@ -54,6 +54,7 @@ static struct option longopts[] = { "port", 1, 0, 'p' }, { "no-tcp", 0, 0, 'n' }, { "ha-callout", 1, 0, 'H' }, + { "state-directory-path", 1, 0, 's' }, { NULL, 0, 0, 0 } }; @@ -441,6 +442,7 @@ int main(int argc, char **argv) { char *export_file = _PATH_EXPORTS; + char *state_dir = NFS_STATEDIR; int foreground = 0; int port = 0; int descriptors = 0; @@ -490,6 +492,13 @@ main(int argc, char **argv) case 'n': _rpcfdtype = SOCK_DGRAM; break; + case 's': + if ((state_dir = xstrdup(optarg)) == NULL) { + fprintf(stderr, "%s: xstrdup(%s) failed!\n", + argv[0], optarg); + exit(1); + } + break; case 'V': nfs_version |= 1 << (atoi (optarg) - 1); break; @@ -507,9 +516,9 @@ main(int argc, char **argv) if (optind != argc || !(nfs_version & 0x7)) usage(argv [0], 1); - if (chdir(NFS_STATEDIR)) { + if (chdir(state_dir)) { fprintf(stderr, "%s: chdir(%s) failed: %s\n", - argv [0], NFS_STATEDIR, strerror(errno)); + argv [0], state_dir, strerror(errno)); exit(1); } @@ -606,6 +615,6 @@ usage(const char *prog, int n) " [-o num|--descriptors num] [-f exports-file|--exports-file=file]\n" " [-p|--port port] [-V version|--nfs-version version]\n" " [-N version|--no-nfs-version version] [-n|--no-tcp]\n" -" [-H ha-callout-prog]\n", prog); +" [-H ha-callout-prog] [-s|--state-directory-path path]\n", prog); exit(n); } diff --git a/utils/mountd/mountd.man b/utils/mountd/mountd.man index 64e508a..a815a52 100644 --- a/utils/mountd/mountd.man +++ b/utils/mountd/mountd.man @@ -119,6 +119,12 @@ The third will be the path that the client is mounting. The last is the number of concurrent mounts that we believe the client has of that path. .TP +.BI "\-P," "" " \-\-state\-directory\-path " directory +specify a directory in which to place statd state information. +If this option is not specified the default of +.BR /var/lib/nfs +is used. (This is a Debian-specific extension.) +.TP .B \-V " or " \-\-nfs-version This option can be used to request that .B rpc.mountd