From e8bf7bbe4cb900fc3c9813c5aad3525168e1c403 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 14 Jul 2010 03:40:48 +0100 Subject: [PATCH] mount.nfs: Preserve explicit port=2049 option (Closes: #582003) --- debian/changelog | 2 +- .../13-preserve-explicit-port-2049.patch | 17 +++++++++++++++++ debian/patches/series | 1 + 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 debian/patches/13-preserve-explicit-port-2049.patch diff --git a/debian/changelog b/debian/changelog index c2eab80..0d5b199 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,6 @@ nfs-utils (1:1.2.2-3) UNRELEASED; urgency=low - * + * mount.nfs: Preserve explicit port=2049 option (Closes: #582003) -- Ben Hutchings Wed, 14 Jul 2010 03:37:03 +0100 diff --git a/debian/patches/13-preserve-explicit-port-2049.patch b/debian/patches/13-preserve-explicit-port-2049.patch new file mode 100644 index 0000000..5d270c9 --- /dev/null +++ b/debian/patches/13-preserve-explicit-port-2049.patch @@ -0,0 +1,17 @@ +From: Ben Hutchings +Subject: [PATCH] mount.nfs: Preserve any explicit port=2049 option + +This addresses Debian bug #582003. +--- nfs-utils-1.2.2.orig/utils/mount/stropts.c ++++ nfs-utils-1.2.2/utils/mount/stropts.c +@@ -434,8 +434,8 @@ + if (po_append(options, new_option) == PO_FAILED) + return 0; + +- po_remove_all(options, "port"); +- if (nfs_pmap->pm_port != NFS_PORT) { ++ if (po_remove_all(options, "port") == PO_FOUND || ++ nfs_pmap->pm_port != NFS_PORT) { + snprintf(new_option, sizeof(new_option) - 1, + "port=%lu", nfs_pmap->pm_port); + if (po_append(options, new_option) == PO_FAILED) diff --git a/debian/patches/series b/debian/patches/series index abd79b3..bbc16aa 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -4,3 +4,4 @@ 07-remove-duplicate-exports-paragraphs.patch 11-532048-reduce-verbosity.patch 12-svcgssd-document-n-option.patch +13-preserve-explicit-port-2049.patch -- 2.39.2