From: Anibal Monsalve Salazar Date: Tue, 29 Jul 2008 08:08:42 +0000 (+1000) Subject: Imported Debian patch 1.1.3-1 X-Git-Tag: debian/1%1.1.3-1^0 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=e2a32d153524a5ae0276430e6c04a875f5fc4a1d;p=nfs-utils.git Imported Debian patch 1.1.3-1 --- diff --git a/debian/changelog b/debian/changelog index 1b7ab49..3a85197 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +nfs-utils (1:1.1.3-1) unstable; urgency=low + + * New upstream release + * The following patches were merged: + 02-fix-retry-option.patch + 04-eacces-is-a-permanent-error.patch + + -- Anibal Monsalve Salazar Tue, 29 Jul 2008 18:08:42 +1000 + nfs-utils (1:1.1.2-6) unstable; urgency=high * Load nfsd.ko before starting idmapd, to hopefully fix NFSv4 export issues. diff --git a/debian/patches/02-fix-retry-option.patch b/debian/patches/02-fix-retry-option.patch deleted file mode 100644 index 935cb3d..0000000 --- a/debian/patches/02-fix-retry-option.patch +++ /dev/null @@ -1,104 +0,0 @@ -text-based mount command: Fix retry= option - -Steinar Gunderson reports: - -"It seems retry= is now additive with the text-based mount interface. In -particular, "mount -o retry=0" still gives a two-minute timeout." - -Make retry option parsing more robust, while we're at it. - -Signed-off-by: Chuck Lever ---- - - utils/mount/stropts.c | 55 ++++++++++++++++++++++++++++++++++++++----------- - 1 files changed, 43 insertions(+), 12 deletions(-) - -diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c -index cadb1f4..4df9ad9 100644 ---- a/utils/mount/stropts.c -+++ b/utils/mount/stropts.c -@@ -65,6 +65,14 @@ - #define NFS_MAXPATHNAME (1024) - #endif - -+#ifndef NFS_DEF_FG_TIMEOUT_MINUTES -+#define NFS_DEF_FG_TIMEOUT_MINUTES (2ul) -+#endif -+ -+#ifndef NFS_DEF_BG_TIMEOUT_MINUTES -+#define NFS_DEF_BG_TIMEOUT_MINUTES (10000ul) -+#endif -+ - extern int nfs_mount_data_version; - extern char *progname; - extern int verbose; -@@ -141,6 +149,35 @@ static int fill_ipv4_sockaddr(const char *hostname, struct sockaddr_in *addr) - } - - /* -+ * Set up a timeout value based on the value of the "retry=" option. -+ * -+ * Returns 1 if the option was parsed successfully, otherwise zero. -+ * Returns the parsed timeout, or the default, in *timeout. -+ */ -+static int parse_retry_option(time_t *timeout, struct mount_options *options, -+ unsigned long timeout_minutes) -+{ -+ char *retry_option, *endptr; -+ -+ retry_option = po_get(options, "retry"); -+ if (retry_option) { -+ long tmp; -+ -+ errno = 0; -+ tmp = strtol(retry_option, &endptr, 10); -+ if (errno || endptr == retry_option || tmp < 0) { -+ nfs_error(_("%s: incorrect retry timeout specified"), -+ progname); -+ return 0; -+ } -+ timeout_minutes = tmp; -+ } -+ -+ *timeout = time(NULL) + (time_t)(timeout_minutes * 60); -+ return 1; -+} -+ -+/* - * Append the 'addr=' option to the options string to pass a resolved - * server address to the kernel. After a successful mount, this address - * is also added to /etc/mtab for use when unmounting. -@@ -535,13 +572,10 @@ static int nfsmount_fg(const char *spec, const char *node, - char **extra_opts) - { - unsigned int secs = 1; -- time_t timeout = time(NULL); -- char *retry; -+ time_t timeout; - -- timeout += 60 * 2; /* default: 2 minutes */ -- retry = po_get(options, "retry"); -- if (retry) -- timeout += 60 * atoi(retry); -+ if (!parse_retry_option(&timeout, options, NFS_DEF_FG_TIMEOUT_MINUTES)) -+ return EX_FAIL; - - if (verbose) - printf(_("%s: timeout set for %s"), -@@ -612,13 +646,10 @@ static int nfsmount_child(const char *spec, const char *node, - int fake, char **extra_opts) - { - unsigned int secs = 1; -- time_t timeout = time(NULL); -- char *retry; -+ time_t timeout; - -- timeout += 60 * 10000; /* default: 10,000 minutes */ -- retry = po_get(options, "retry"); -- if (retry) -- timeout += 60 * atoi(retry); -+ if (!parse_retry_option(&timeout, options, NFS_DEF_BG_TIMEOUT_MINUTES)) -+ return EX_FAIL; - - for (;;) { - if (sleep(secs)) diff --git a/debian/patches/series b/debian/patches/series index b150fe2..edc0d42 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,7 +1,5 @@ 01-sm-notify-in-sbin.patch -02-fix-retry-option.patch 03-handle-mtab-symlink.patch -04-eacces-is-a-permanent-error.patch 05-default-use-old-mount-interface.patch 06-dont-check-exec-bit.patch 07-remove-duplicate-exports-paragraphs.patch