Updating link to change in openSUSE:Factory/nfs-utils revision 61.0

OBS-URL: https://build.opensuse.org/package/show/Base:System/nfs-utils?expand=0&rev=cb75ed5e603b8f9de3c067835cc9fc07
This commit is contained in:
OBS User buildservice-autocommit 2010-10-11 15:03:25 +00:00 committed by Git OBS Bridge
parent bae17c8722
commit 7ca9921dc5
13 changed files with 300 additions and 126 deletions

3
.gitattributes vendored
View File

@ -21,3 +21,6 @@
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text
## Specific LFS patterns
nfs-utils-allow-port-number-sharing filter=lfs diff=lfs merge=lfs -text
nfs-utils-improve-v4-umount filter=lfs diff=lfs merge=lfs -text

View File

@ -6,9 +6,9 @@
support/nfs/exports.c | 2 ++
1 file changed, 2 insertions(+)
--- nfs-utils-1.2.1.orig/support/nfs/exports.c
+++ nfs-utils-1.2.1/support/nfs/exports.c
@@ -621,6 +621,8 @@ bad_option:
--- nfs-utils-1.2.3.orig/support/nfs/exports.c
+++ nfs-utils-1.2.3/support/nfs/exports.c
@@ -626,6 +626,8 @@ bad_option:
} else if (strncmp(opt, "replicas=", 9) == 0) {
ep->e_fslocmethod = FSLOC_REPLICA;
ep->e_fslocdata = strdup(opt+9);

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f4fc8fd71f562564de051d681997be3dd7753fb93f8a3a0eb7c5835f0f04fa6d
size 685942

3
nfs-utils-1.2.3.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5575ece941097cbfa67fbe0d220dfa11b73f5e6d991e7939c9339bd72259ff19
size 672759

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:677e5240198d3a25ca727e7cb2e60d04e2c3abb45fd5f928375d3c9070e372b1
size 14343

106
nfs-utils-clear-mountd-reg Normal file
View File

@ -0,0 +1,106 @@
Return-Path: <linux-nfs-owner@vger.kernel.org>
Received: from imap.suse.de ([unix socket])
by imap-int (Cyrus v2.2.12) with LMTPA;
Mon, 11 Oct 2010 02:04:17 +0200
X-Sieve: CMU Sieve 2.2
Received: from relay1.suse.de (relay1.suse.de [149.44.160.133])
(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
(Client CN "relay.suse.de", Issuer "CAcert Class 3 Root" (verified OK))
by imap.suse.de (Postfix) with ESMTP id 0A65F3C416B3
for <nfbrown@imap.suse.de>; Mon, 11 Oct 2010 02:04:17 +0200 (CEST)
Received: by relay1.suse.de (Postfix)
id 01A90344BA64; Mon, 11 Oct 2010 02:04:17 +0200 (CEST)
Received: from relay1.suse.de (localhost [127.0.0.1])
by relay1.suse.de (Postfix) with ESMTP id EAE7C344BA63
for <neilb@suse.de>; Mon, 11 Oct 2010 02:04:16 +0200 (CEST)
Received: from relay1.suse.de ([127.0.0.1])
by relay1.suse.de (relay1.suse.de [127.0.0.1]) (amavisd-new, port 10026)
with ESMTP id 06582-10 for <neilb@suse.de>;
Mon, 11 Oct 2010 02:04:16 +0200 (CEST)
Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15])
by relay1.suse.de (Postfix) with ESMTP id A9C85344BA61
for <neilb@suse.de>; Mon, 11 Oct 2010 02:04:16 +0200 (CEST)
Received: from vger.kernel.org (vger.kernel.org [209.132.180.67])
by mx2.suse.de (Postfix) with ESMTP id 48FDA8738D
for <neilb@suse.de>; Mon, 11 Oct 2010 02:04:16 +0200 (CEST)
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
id S1752517Ab0JKAEP (ORCPT <rfc822;neilb@suse.de>);
Sun, 10 Oct 2010 20:04:15 -0400
Received: from mail-iw0-f174.google.com ([209.85.214.174]:38170 "EHLO
mail-iw0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
with ESMTP id S1752478Ab0JKAEO (ORCPT
<rfc822;linux-nfs@vger.kernel.org>); Sun, 10 Oct 2010 20:04:14 -0400
Received: by mail-iw0-f174.google.com with SMTP id 6so2668490iwn.19
for <linux-nfs@vger.kernel.org>; Sun, 10 Oct 2010 17:04:14 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=gamma;
h=domainkey-signature:received:received:sender:from:subject:to:cc
:date:message-id:in-reply-to:references:user-agent:mime-version
:content-type:content-transfer-encoding;
bh=t0jGXR6R6oFSOiIUs0mhcgc6DxuwAvaQUeA4K9C6P84=;
b=a4iSPFd5eQ0w0uyOCzEw0E44Ud/KpIE0iyhwHFBL7/yElckfZuR+8EbyeT2DdjMz/U
CBTTU+1m2Rl7Jgo+SvQqsYi84y86JzTzF70Yxyz9t3JlR5M1L4lnJpRqLQDQKBeFZcBF
xK7+GTLWxsMes1kGvXF9hP8wvMrtwDG+e2TQk=
DomainKey-Signature: a=rsa-sha1; c=nofws;
d=gmail.com; s=gamma;
h=sender:from:subject:to:cc:date:message-id:in-reply-to:references
:user-agent:mime-version:content-type:content-transfer-encoding;
b=lTAr0b38PPzxyY95nnjiEMYRgiHw+BGTRAesblo6IygAHrBDQcd/2a0cCFPkxC0QH/
eGi1Nko+PqLCE197Av+G4OFIvf4TD6fePOfXcVcTy201y0Xv5keebgt1Qb+TBkFK/U3I
yQi/JS9/L3l9sZBfqmB6rvmqLodMbYhu87BQk=
Received: by 10.42.211.140 with SMTP id go12mr1536860icb.320.1286755454106;
Sun, 10 Oct 2010 17:04:14 -0700 (PDT)
Received: from ellison.1015granger.net (adsl-76-241-169-38.dsl.sfldmi.sbcglobal.net [76.241.169.38])
by mx.google.com with ESMTPS id gy41sm6556180ibb.23.2010.10.10.17.04.12
(version=TLSv1/SSLv3 cipher=RC4-MD5);
Sun, 10 Oct 2010 17:04:13 -0700 (PDT)
From: Chuck Lever <chuck.lever@oracle.com>
Subject: [PATCH 01/15] mountd: Clear mountd registrations at start up
To: steved@redhat.com
Cc: linux-nfs@vger.kernel.org
Date: Sun, 10 Oct 2010 20:04:11 -0400
Message-ID: <20101011000411.6667.17979.stgit@ellison.1015granger.net>
In-Reply-To: <20101010234836.6667.4057.stgit@ellison.1015granger.net>
References: <20101010234836.6667.4057.stgit@ellison.1015granger.net>
User-Agent: StGIT/0.14.3
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Sender: linux-nfs-owner@vger.kernel.org
Precedence: bulk
List-ID: <linux-nfs.vger.kernel.org>
X-Mailing-List: linux-nfs@vger.kernel.org
X-Virus-Scanned: by amavisd-new at relay1.suse.de
X-Spam-Status: No, score=-4.999 tagged_above=-20 required=5
tests=[BAYES_50=0.001, MY_LINUX=-1, RCVD_IN_DNSWL_MED=-4]
X-Spam-Score: -4.999
X-Spam-Level:
X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.2
Clear stale MNT registrations before mountd tries to create fresh
listeners, to ensure that mountd starts. This is also what statd
does.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
utils/mountd/mountd.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/utils/mountd/mountd.c b/utils/mountd/mountd.c
index d309950..7e0cf6a 100644
--- a/utils/mountd/mountd.c
+++ b/utils/mountd/mountd.c
@@ -840,6 +840,7 @@ main(int argc, char **argv)
if (new_cache)
cache_open();
+ unregister_services();
if (version2()) {
listeners += nfs_svc_create("mountd", MOUNTPROG,
MOUNTVERS, mount_dispatch, port);
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

View File

@ -1,28 +0,0 @@
Fall back from v4 to v3 on EPERM.
When the mount version isn't specified, mount.nfs tries v4 and
falls back to v3 if it gets ENOENT.
Linux kernels prior to 2.6.25 will return EPERM if there is no
v4 export, so fall back in that case too.
This fixes bnc#557138 where a 2.6.31 or later kernel client gets
an error when mounting from a 2.6.24 or earlier server.
Signed-off-by: NeilBrown <neilb@suse.de>
diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c
index b595649..68eb82b 100644
--- a/utils/mount/stropts.c
+++ b/utils/mount/stropts.c
@@ -657,8 +657,10 @@ static int nfs_try_mount(struct nfsmount_info *mi)
* To deal with legacy Linux servers that don't
* automatically export a pseudo root, retry
* ENOENT errors using version 3
+ * And for Linux servers prior to 2.6.25, retry
+ * EPERM
*/
- if (errno != ENOENT)
+ if (errno != ENOENT && errno != EPERM)
break;
}
}

130
nfs-utils-fix-remount Normal file
View File

@ -0,0 +1,130 @@
Return-Path: <linux-nfs-owner@vger.kernel.org>
Received: from imap.suse.de ([unix socket])
by imap-int (Cyrus v2.2.12) with LMTPA;
Mon, 11 Oct 2010 02:06:35 +0200
X-Sieve: CMU Sieve 2.2
Received: from relay2.suse.de (relay2.suse.de [149.44.160.134])
(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
(Client CN "relay.suse.de", Issuer "CAcert Class 3 Root" (verified OK))
by imap.suse.de (Postfix) with ESMTP id BE1103C416B3
for <nfbrown@imap.suse.de>; Mon, 11 Oct 2010 02:06:35 +0200 (CEST)
Received: by relay2.suse.de (Postfix)
id B466A18552E3; Mon, 11 Oct 2010 02:06:35 +0200 (CEST)
Received: from localhost (localhost [127.0.0.1])
by relay2.suse.de (Postfix) with ESMTP id A9D7618552E2
for <neilb@suse.de>; Mon, 11 Oct 2010 02:06:35 +0200 (CEST)
Received: from relay2.suse.de ([127.0.0.1])
by localhost (localhost [127.0.0.1]) (amavisd-new, port 10026) with ESMTP
id 29122-13 for <neilb@suse.de>; Mon, 11 Oct 2010 02:06:35 +0200 (CEST)
Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15])
by relay2.suse.de (Postfix) with ESMTP id 6B65518552E1
for <neilb@suse.de>; Mon, 11 Oct 2010 02:06:35 +0200 (CEST)
Received: from vger.kernel.org (vger.kernel.org [209.132.180.67])
by mx2.suse.de (Postfix) with ESMTP id 14B278738D
for <neilb@suse.de>; Mon, 11 Oct 2010 02:06:35 +0200 (CEST)
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
id S1752634Ab0JKAGe (ORCPT <rfc822;neilb@suse.de>);
Sun, 10 Oct 2010 20:06:34 -0400
Received: from mail-iw0-f174.google.com ([209.85.214.174]:38170 "EHLO
mail-iw0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
with ESMTP id S1752630Ab0JKAGe (ORCPT
<rfc822;linux-nfs@vger.kernel.org>); Sun, 10 Oct 2010 20:06:34 -0400
Received: by mail-iw0-f174.google.com with SMTP id 6so2668490iwn.19
for <linux-nfs@vger.kernel.org>; Sun, 10 Oct 2010 17:06:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=gamma;
h=domainkey-signature:received:received:sender:from:subject:to:cc
:date:message-id:in-reply-to:references:user-agent:mime-version
:content-type:content-transfer-encoding;
bh=UJO3paHucq6OlKM06UEb1TVN7QqzkPyXWN7fNztk7mQ=;
b=WGeehh2PC4rE1yirLXFQQ14UxrmfbbOCNqK2L2tESAaywDxoDSFRMJzdR885ARlMC9
GZwggetqRpo+LU2m36u2ZeE3gtOIFCZ23GClQbdRUiKKMwzRpWbP3vfEt7adJIV2RjsW
thMkV1EOnxeJMpP4IJdRRXxJ8tXkCaHjwzj38=
DomainKey-Signature: a=rsa-sha1; c=nofws;
d=gmail.com; s=gamma;
h=sender:from:subject:to:cc:date:message-id:in-reply-to:references
:user-agent:mime-version:content-type:content-transfer-encoding;
b=kL7dvDU66o7mLvoqMOG0Xw/RxY3rj5LA9DjPUc79e+XB9OxHuwVhwbzwL0dCaBmD16
VhumTwhcPLN/wEkiuSMe/Tsu3di038gQL/nz6zBeszxC3JVrDO5aGw/DAsT0fcipVNyg
sJR3xvqRVFuH7VtO1a/HugVzTwMiCt+EBcvRY=
Received: by 10.231.12.133 with SMTP id x5mr2060586ibx.131.1286755593267;
Sun, 10 Oct 2010 17:06:33 -0700 (PDT)
Received: from ellison.1015granger.net (adsl-76-241-169-38.dsl.sfldmi.sbcglobal.net [76.241.169.38])
by mx.google.com with ESMTPS id gy41sm6552605ibb.11.2010.10.10.17.06.31
(version=TLSv1/SSLv3 cipher=RC4-MD5);
Sun, 10 Oct 2010 17:06:32 -0700 (PDT)
From: Chuck Lever <chuck.lever@oracle.com>
Subject: [PATCH 15/15] mount.nfs: don't show "remount" flag in /etc/mtab
To: steved@redhat.com
Cc: linux-nfs@vger.kernel.org
Date: Sun, 10 Oct 2010 20:06:30 -0400
Message-ID: <20101011000630.6667.13971.stgit@ellison.1015granger.net>
In-Reply-To: <20101010234836.6667.4057.stgit@ellison.1015granger.net>
References: <20101010234836.6667.4057.stgit@ellison.1015granger.net>
User-Agent: StGIT/0.14.3
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Sender: linux-nfs-owner@vger.kernel.org
Precedence: bulk
List-ID: <linux-nfs.vger.kernel.org>
X-Mailing-List: linux-nfs@vger.kernel.org
X-Virus-Scanned: by amavisd-new at localhost
X-Spam-Status: No, score=-4.999 tagged_above=-20 required=5
tests=[BAYES_50=0.001, MY_LINUX=-1, RCVD_IN_DNSWL_MED=-4]
X-Spam-Score: -4.999
X-Spam-Level:
X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.2
Don't add the 'remount' option to /etc/mtab. This is the same
behavior as file systems that use the monolithic /sbin/mount command.
See the MS_NOMTAB macro in utils-linux-ng/mount/mount.c.
Note that mount(8) has MS_USERS and MS_USER in the "nomtab" category
as well, but mount.nfs needs to record those values so that unmounting
a user-mounted NFS file system can work.
While we're here, fix some white space damage in fix_opts_string().
This is a partial fix for:
https://bugzilla.linux-nfs.org/show_bug.cgi?id=188
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
utils/mount/mount.c | 4 ++--
utils/mount/mount_constants.h | 4 ++++
2 files changed, 6 insertions(+), 2 deletions(-)
--- nfs-utils-1.2.3.orig/utils/mount/mount.c
+++ nfs-utils-1.2.3/utils/mount/mount.c
@@ -209,7 +209,7 @@ static char *fix_opts_string(int flags,
}
if (flags & MS_USERS)
new_opts = xstrconcat3(new_opts, ",users", "");
-
+
for (om = opt_map; om->opt != NULL; om++) {
if (om->skip)
continue;
@@ -281,7 +281,7 @@ static int add_mtab(char *spec, char *mo
ment.mnt_fsname = spec;
ment.mnt_dir = mount_point;
ment.mnt_type = fstype;
- ment.mnt_opts = fix_opts_string(flags, opts);
+ ment.mnt_opts = fix_opts_string(flags & ~MS_NOMTAB, opts);
ment.mnt_freq = freq;
ment.mnt_passno = pass;
--- nfs-utils-1.2.3.orig/utils/mount/mount_constants.h
+++ nfs-utils-1.2.3/utils/mount/mount_constants.h
@@ -64,4 +64,8 @@ if we have a stack or plain mount - moun
#define MS_MGC_MSK 0xffff0000 /* magic flag number mask */
#endif
+/* Generic options that are prevented from appearing
+ * in the options field in /etc/mtab. */
+#define MS_NOMTAB (MS_REMOUNT)
+
#endif /* _NFS_UTILS_MOUNT_CONSTANTS_H */

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0419dfd7ed1949e77e3051cc8b923a8737ec6c4379c18cd08c79a4499aa612cf
size 8486

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Mon Oct 11 06:17:55 UTC 2010 - nfbrown@novell.com
- new upstream version 1.2.3, plus some upstream fix-up patches.
- new user 'statd' owns /var/lib/nfs so rpc.statd runs as non-root.
- New commands 'mountstats' and 'nfsiostat'
- ipv6 support enabled as it is believed to be complete.
-------------------------------------------------------------------
Wed Aug 11 04:35:05 UTC 2010 - nfbrown@novell.com

View File

@ -1,5 +1,5 @@
#
# spec file for package nfs-utils (Version 1.2.1)
# spec file for package nfs-utils (Version 1.2.3)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@ -26,8 +26,8 @@ BuildRequires: libevent
%endif
Url: http://nfs.sourceforge.net
Summary: Support Utilities for Kernel nfsd
Version: 1.2.1
Release: 8
Version: 1.2.3
Release: 1
Group: Productivity/Networking/NFS
License: GPLv2+
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -50,8 +50,10 @@ Source12: start-statd
Source13: nfs-utils.rpmlintrc
Patch0: nfs-utils-1.0.7-bind-syntax.patch
Patch1: warn-nfs-udp.patch
Patch2: nfs-utils-eperm-fallback.patch
Patch3: nfs-v2-disable.patch
Patch2: nfs-utils-clear-mountd-reg
Patch3: nfs-utils-allow-port-number-sharing
Patch4: nfs-utils-improve-v4-umount
Patch5: nfs-utils-fix-remount
%description
This package contains the NFS utilities. You can tune the number of
@ -132,6 +134,8 @@ Authors:
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
cp %{S:6} .
%build
@ -142,6 +146,7 @@ CFLAGS="$RPM_OPT_FLAGS -fPIE -fno-strict-aliasing" LDFLAGS="-pie" ./configure \
--disable-rquotad \
--enable-nfsv4 \
--enable-gss \
--enable-ipv6 \
--enable-mount \
--enable-mountconfig \
--with-krb5=/usr/lib/mit
@ -189,7 +194,13 @@ install -m 644 utils/mount/nfsmount.conf $RPM_BUILD_ROOT/etc/nfsmount.conf
%clean
rm -rf $RPM_BUILD_ROOT
%pre -n nfs-client
useradd -r -c 'NFS statd daemon' \
-s /sbin/nologin -d /var/lib/nfs -g nogroup statd &> /dev/null || :
%post -n nfs-client
chown statd:nogroup /var/lib/nfs
chown -R statd /var/lib/nfs/{state,sm,sm.bak} >& /dev/null || :
[ -x /sbin/mkinitrd_setup ] && mkinitrd_setup
%{fillup_and_insserv -Y -n nfs nfs}
%run_permissions
@ -201,6 +212,7 @@ rm -rf $RPM_BUILD_ROOT
%restart_on_update nfs
[ -x /sbin/mkinitrd_setup ] && mkinitrd_setup
%insserv_cleanup
#userdel statd &> /dev/null || :
%verifyscript -n nfs-client
%verify_permissions -e /sbin/mount.nfs
@ -229,6 +241,8 @@ rm -rf $RPM_BUILD_ROOT
/sbin/umount.nfs4
/usr/sbin/gss_clnt_send_err
/usr/sbin/gss_destroy_creds
/usr/sbin/mountstats
/usr/sbin/nfsiostat
/usr/sbin/nfsstat
/usr/sbin/rcnfs
/usr/sbin/rpc.gssd
@ -238,7 +252,6 @@ rm -rf $RPM_BUILD_ROOT
/usr/sbin/showmount
/usr/sbin/sm-notify
/usr/sbin/start-statd
%{_mandir}/man5/idmapd.conf.5.gz
%{_mandir}/man5/nfsmount.conf.5.gz
%{_mandir}/man5/nfs.5.gz
%{_mandir}/man8/mount.nfs.8.gz
@ -255,13 +268,15 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man8/rpc.statd.8.gz
%{_mandir}/man8/rpcdebug.8.gz
%{_mandir}/man8/statd.8.gz
%{_mandir}/man8/mountstats.8.gz
%{_mandir}/man8/nfsiostat.8.gz
/var/adm/fillup-templates/sysconfig.nfs
%dir /var/lib/nfs
%attr(0700,statd,nogroup) %dir /var/lib/nfs
%dir /var/lib/nfs/rpc_pipefs
%dir /var/lib/nfs/v4recovery
%dir /var/lib/nfs/sm
%dir /var/lib/nfs/sm.bak
%ghost /var/lib/nfs/state
%attr(0700,statd,nogroup) %dir /var/lib/nfs/sm
%attr(0700,statd,nogroup) %dir /var/lib/nfs/sm.bak
%attr(0700,statd,nogroup) %ghost /var/lib/nfs/state
%config %attr(0644,root,root) /etc/sysconfig/SuSEfirewall2.d/services/nfs-client
%files -n nfs-kernel-server

View File

@ -1,66 +0,0 @@
Subject: Allow mountd to not listen for RPC calls when v2/v3 disabled
References: 598671
Mountd listens on 2 different versions for NFSv2 (MOUNTv1 and MOUNTv2)
and one for NFSv3 (MOUNTv3)
When --no-nfs-version requests an NFS version to be disabled, the
code actually disabled the MOUNT version. This works is several cases,
but requires --no-nfs-version 1 to completely disable NFSv2, which
is wrong.
So if we do disable 1, 2, and 3. mountd complain and won't run, it
is not possible to run just v4 - i.e. not listening for MOUNT requests
at all (as v4 doesn't need them).
So change the handling of "--no-nfs-version 2" it disable MOUNTv1 as well as
MOUNTv2, and allow mountd to continue running as long as one of
NFSv2 NFSv3 NFSv4 is enabled.
Signed-off-by: NeilBrown <neilb@suse.de>
diff --git a/utils/mountd/mountd.c b/utils/mountd/mountd.c
index a0a1f2d..5373d81 100644
--- a/utils/mountd/mountd.c
+++ b/utils/mountd/mountd.c
@@ -80,10 +80,10 @@ static int nfs_version = -1;
static void
unregister_services (void)
{
- if (nfs_version & 0x1)
+ if (nfs_version & (0x1 << 1)) {
pmap_unset (MOUNTPROG, MOUNTVERS);
- if (nfs_version & (0x1 << 1))
pmap_unset (MOUNTPROG, MOUNTVERS_POSIX);
+ }
if (nfs_version & (0x1 << 2))
pmap_unset (MOUNTPROG, MOUNTVERS_NFSV3);
}
@@ -712,8 +712,10 @@ main(int argc, char **argv)
usage(argv [0], 1);
}
- /* No more arguments allowed. */
- if (optind != argc || !(nfs_version & 0x7))
+ /* No more arguments allowed.
+ * Require at least one valid version (2, 3, or 4)
+ */
+ if (optind != argc || !(nfs_version & 0xE))
usage(argv [0], 1);
if (chdir(state_dir)) {
@@ -761,12 +763,12 @@ main(int argc, char **argv)
if (new_cache)
cache_open();
- if (nfs_version & 0x1)
+ if (nfs_version & (0x1 << 1)) {
rpc_init("mountd", MOUNTPROG, MOUNTVERS,
mount_dispatch, port);
- if (nfs_version & (0x1 << 1))
rpc_init("mountd", MOUNTPROG, MOUNTVERS_POSIX,
mount_dispatch, port);
+ }
if (nfs_version & (0x1 << 2))
rpc_init("mountd", MOUNTPROG, MOUNTVERS_NFSV3,
mount_dispatch, port);

View File

@ -4,18 +4,18 @@
utils/mount/stropts.c | 13 +++++++
3 files changed, 99 insertions(+)
--- nfs-utils-1.2.1.orig/utils/mount/nfs.man
+++ nfs-utils-1.2.1/utils/mount/nfs.man
@@ -497,6 +497,8 @@ Specifying
.B proto=udp
forces all traffic types to use UDP.
--- nfs-utils-1.2.3.orig/utils/mount/nfs.man
+++ nfs-utils-1.2.3/utils/mount/nfs.man
@@ -504,6 +504,8 @@ Specifying a netid that uses TCP forces
command and the NFS client to use TCP.
Specifying a netid that uses UDP forces all traffic types to use UDP.
.IP
+.B Before using NFS over UDP, please refer to the section WARNINGS below.
+.IP
If the
.B proto
mount option is not specified, the
@@ -511,6 +513,8 @@ The
@@ -518,6 +520,8 @@ The
option is an alternative to specifying
.BR proto=udp.
It is included for compatibility with other operating systems.
@ -24,7 +24,7 @@
.TP 1.5i
.B tcp
The
@@ -896,6 +900,8 @@ in a single frame) is advised. This r
@@ -932,6 +936,8 @@ in a single frame) is advised. This r
the loss of a single MTU-sized network frame results in the loss of
an entire large read or write request.
.P
@ -33,7 +33,7 @@
TCP is the default transport protocol used for all modern NFS
implementations. It performs well in almost every conceivable
network environment and provides excellent guarantees against data
@@ -1444,6 +1450,83 @@ of Access Control Lists that are semanti
@@ -1480,6 +1486,83 @@ of Access Control Lists that are semanti
NFS version 4 ACLs are not fully compatible with POSIX ACLs; as such,
some translation between the two is required
in an environment that mixes POSIX ACLs and NFS version 4.
@ -117,9 +117,9 @@
.SH FILES
.TP 1.5i
.I /etc/fstab
--- nfs-utils-1.2.1.orig/utils/mount/nfsmount.c
+++ nfs-utils-1.2.1/utils/mount/nfsmount.c
@@ -263,6 +263,9 @@ parse_options(char *old_opts, struct nfs
--- nfs-utils-1.2.3.orig/utils/mount/nfsmount.c
+++ nfs-utils-1.2.3/utils/mount/nfsmount.c
@@ -264,6 +264,9 @@ parse_options(char *old_opts, struct nfs
if (!strcmp(opteq+1, "udp")) {
nfs_pmap->pm_prot = IPPROTO_UDP;
mnt_pmap->pm_prot = IPPROTO_UDP;
@ -129,9 +129,9 @@
#if NFS_MOUNT_VERSION >= 2
data->flags &= ~NFS_MOUNT_TCP;
} else if (!strcmp(opteq+1, "tcp") &&
--- nfs-utils-1.2.1.orig/utils/mount/stropts.c
+++ nfs-utils-1.2.1/utils/mount/stropts.c
@@ -530,11 +530,24 @@ static int nfs_sys_mount(struct nfsmount
--- nfs-utils-1.2.3.orig/utils/mount/stropts.c
+++ nfs-utils-1.2.3/utils/mount/stropts.c
@@ -569,11 +569,24 @@ static int nfs_sys_mount(struct nfsmount
{
char *options = NULL;
int result;
@ -154,5 +154,5 @@
+ }
+
if (verbose)
printf(_("%s: trying text-based options '%s'\n"),
if (mi->fake)
return 1;