- New upstream version 1.2.5 - This adds a new binary

blkmapd with man page,  This is part of PNFS support.

OBS-URL: https://build.opensuse.org/package/show/Base:System/nfs-utils?expand=0&rev=56
This commit is contained in:
Neil Brown 2011-09-25 08:31:49 +00:00 committed by Git OBS Bridge
parent 0ee893353b
commit 5e8971e11c
8 changed files with 14 additions and 174 deletions

View File

@ -1,34 +0,0 @@
From c4c6126f05713afe46c0e99647d7a07dd1fc2ebb Mon Sep 17 00:00:00 2001
From: Masatake YAMATO <yamato@redhat.com>
Date: Tue, 12 Jul 2011 10:00:01 -0400
Subject: [PATCH] exportfs: closing fd associated with /proc/fs/nfsd/export_features
The fd associated with /proc/fs/nfsd/export_features opened in
get_export_features is not closed.
Acked-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
---
support/nfs/exports.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/support/nfs/exports.c b/support/nfs/exports.c
index c250383..c96500f 100644
--- a/support/nfs/exports.c
+++ b/support/nfs/exports.c
@@ -784,8 +784,9 @@ struct export_features *get_export_features(void)
fd = open(path, O_RDONLY);
if (fd == -1)
goto good;
- fd = read(fd, buf, 50);
- if (fd == -1)
+ c = read(fd, buf, 50);
+ close(fd);
+ if (c == -1)
goto err;
c = sscanf(buf, "%x %x", &ef.flags, &ef.secinfo_flags);
if (c != 2)
--
1.7.3.4

View File

@ -1,44 +0,0 @@
From 151a82d9c80315caff7081f16916d1913a67033a Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@redhat.com>
Date: Wed, 3 Aug 2011 15:12:53 -0400
Subject: [PATCH] mount: fix for libmount from util-linux >= 2.20
The function mnt_fs_set_fs_options() has been removed from the final
version of the libmount API.
Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
---
utils/mount/mount_libmount.c | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/utils/mount/mount_libmount.c b/utils/mount/mount_libmount.c
index 6dd6484..cf6e58c 100644
--- a/utils/mount/mount_libmount.c
+++ b/utils/mount/mount_libmount.c
@@ -61,10 +61,19 @@ int nomtab;
* managed by libmount at all. We have to use "mount attributes" that are
* private for mount.<type> helpers.
*/
-static void store_mount_options(struct libmnt_fs *fs, const char *opts)
+static void store_mount_options(struct libmnt_fs *fs, const char *nfs_opts)
{
- mnt_fs_set_fs_options(fs, opts); /* for mtab */
- mnt_fs_set_attributes(fs, opts); /* for non-mtab systems */
+ char *o = NULL;
+
+ mnt_fs_set_attributes(fs, nfs_opts); /* for non-mtab systems */
+
+ /* for mtab create a new options list */
+ mnt_optstr_append_option(&o, mnt_fs_get_vfs_options(fs), NULL);
+ mnt_optstr_append_option(&o, nfs_opts, NULL);
+ mnt_optstr_append_option(&o, mnt_fs_get_user_options(fs), NULL);
+
+ mnt_fs_set_options(fs, o);
+ free(o);
}
/*
--
1.7.3.4

View File

@ -1,31 +0,0 @@
From 64a21e6c9dd29416fcd903a3f0eaf18d717907dc Mon Sep 17 00:00:00 2001
From: Matthew Treinish <treinish@linux.vnet.ibm.com>
Date: Wed, 3 Aug 2011 13:10:14 -0400
Subject: [PATCH] mountd: Fixed strcmp usage in in insert groups.
Fixed the usage of strcmp in the duplicate check in insert groups.
Fixes an issue with showmount and other commands that required
the group information.
Signed-off-by: Matthew Treinish <treinish@linux.vnet.ibm.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
---
utils/mountd/mountd.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/utils/mountd/mountd.c b/utils/mountd/mountd.c
index 035624c..bcf5080 100644
--- a/utils/mountd/mountd.c
+++ b/utils/mountd/mountd.c
@@ -633,7 +633,7 @@ static void insert_group(struct exportnode *e, char *newname)
struct groupnode *g;
for (g = e->ex_groups; g; g = g->gr_next)
- if (strcmp(g->gr_name, newname))
+ if (!strcmp(g->gr_name, newname))
return;
g = xmalloc(sizeof(*g));
--
1.7.3.4

View File

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

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

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

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Sun Sep 25 08:28:53 UTC 2011 - nfbrown@suse.com
- New upstream version 1.2.5 - This adds a new binary
blkmapd with man page, This is part of PNFS support.
-------------------------------------------------------------------
Thu Aug 18 07:48:27 UTC 2011 - nfbrown@novell.com

View File

@ -18,7 +18,8 @@
Name: nfs-utils
BuildRequires: e2fsprogs-devel gcc-c++ krb5-devel libgssglue-devel librpcsecgss libtirpc-devel nfsidmap-devel pkgconfig tcpd-devel
BuildRequires: e2fsprogs-devel gcc-c++ krb5-devel libgssglue-devel >= 0.3 librpcsecgss libtirpc-devel nfsidmap-devel >= 0.24 pkgconfig tcpd-devel
BuildRequires: device-mapper-devel
BuildRequires: libmount-devel
%if 0%{?suse_version} > 1100
BuildRequires: libevent-devel
@ -27,7 +28,7 @@ BuildRequires: libevent
%endif
Url: http://nfs.sourceforge.net
Summary: Support Utilities for Kernel nfsd
Version: 1.2.4
Version: 1.2.5
Release: 1
Group: Productivity/Networking/NFS
License: GPLv2+
@ -53,11 +54,6 @@ Source12: start-statd
Source13: nfs-utils.rpmlintrc
Patch0: nfs-utils-1.0.7-bind-syntax.patch
Patch1: warn-nfs-udp.patch
Patch2: exportfs-closing-fd-associated-with-proc-fs-nfsd-exp.patch
Patch3: mountd-Fixed-strcmp-usage-in-in-insert-groups.patch
Patch4: mount-fix-for-libmount-from-util-linux-2.20.patch
Patch5: rpc.statd-Bind-downcall-socket-to-loopback-address.patch
Patch6: Statd-should-always-chdir-to-its-state-directory.patch
Suggests: python-base
%description
@ -137,11 +133,6 @@ Authors:
%setup -q -n nfs-utils-%{version} -a 1
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
cp %{S:6} .
%build
@ -282,6 +273,7 @@ fi
/usr/sbin/showmount
/usr/sbin/sm-notify
/usr/sbin/start-statd
/usr/sbin/blkmapd
%{_mandir}/man5/nfsmount.conf.5.gz
%{_mandir}/man5/nfs.5.gz
%{_mandir}/man8/mount.nfs.8.gz
@ -301,6 +293,7 @@ fi
%{_mandir}/man8/statd.8.gz
%{_mandir}/man8/mountstats.8.gz
%{_mandir}/man8/nfsiostat.8.gz
%{_mandir}/man8/blkmapd.8.gz
/var/adm/fillup-templates/sysconfig.nfs
%attr(0711,statd,nogroup) %dir /var/lib/nfs
%dir /var/lib/nfs/rpc_pipefs

View File

@ -1,50 +0,0 @@
From c7e224a75f480f955532c96937a5d58cc6e10272 Mon Sep 17 00:00:00 2001
From: Chuck Lever <chuck.lever@oracle.com>
Date: Wed, 3 Aug 2011 13:22:52 -0400
Subject: [PATCH] rpc.statd: Bind downcall socket to loopback address
In the past, rpc.statd posted SM_NOTIFY requests using the same socket
it used for sending downcalls to the kernel. To receive replies from
remote hosts, the socket was bound to INADDR_ANY.
With commit f113db52 "Remove notify functionality from statd in
favour of sm-notify" (Mar 20, 2007), the downcall socket is no longer
used for sending requests to remote hosts. However, the downcall
socket is still bound to INADDR_ANY.
Thus a remote host can inject data on this socket since it is an
unconnected UDP socket listening for RPC replies. Thanks to f113db52,
the port number of this socket is no longer controlled by a command
line option, making it difficult to firewall.
We have demonstrated that data injection on this socket can result in
a DoS by causing rpc.statd to consume CPU and log bandwidth, but so
far we have not found a breach.
To prevent unwanted data injection, bind this socket to the loopback
address.
BugLink: https://bugzilla.linux-nfs.org/show_bug.cgi?id=177
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
---
utils/statd/rmtcall.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/utils/statd/rmtcall.c b/utils/statd/rmtcall.c
index 0e52fe2..4ecb03c 100644
--- a/utils/statd/rmtcall.c
+++ b/utils/statd/rmtcall.c
@@ -85,7 +85,7 @@ statd_get_socket(void)
memset(&sin, 0, sizeof(sin));
sin.sin_family = AF_INET;
- sin.sin_addr.s_addr = INADDR_ANY;
+ sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
if (bindresvport(sockfd, &sin) < 0) {
xlog(D_GENERAL, "%s: can't bind to reserved port",
--
1.7.3.4