summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuergen Daubert <jue@jue.li>2019-05-15 17:07:39 +0200
committerJuergen Daubert <jue@jue.li>2019-05-15 17:07:39 +0200
commit786d2a15eecbd17ef1ac69e654bb437605878d0a (patch)
treef822afa0a6262b527934d4c99468cbd0cbe34437
parentb7c41110f436c6df2bd18d6cc105a1eca8333b40 (diff)
downloadopt-786d2a15eecbd17ef1ac69e654bb437605878d0a.tar.gz
opt-786d2a15eecbd17ef1ac69e654bb437605878d0a.tar.xz
nfs-utils: update to 2.3.4
-rw-r--r--nfs-utils/.footprint5
-rw-r--r--nfs-utils/.signature14
-rw-r--r--nfs-utils/Pkgfile15
-rw-r--r--nfs-utils/mountd_segfault.patch92
-rw-r--r--nfs-utils/nfsdcld36
-rw-r--r--nfs-utils/nfsserver3
-rw-r--r--nfs-utils/rpc.statd5
7 files changed, 155 insertions, 15 deletions
diff --git a/nfs-utils/.footprint b/nfs-utils/.footprint
index edcd6beb4..69e5c5dfc 100644
--- a/nfs-utils/.footprint
+++ b/nfs-utils/.footprint
@@ -7,6 +7,7 @@ drwxr-xr-x root/root etc/exports.d/
drwxr-xr-x root/root etc/rc.d/
-rwxr-xr-x root/root etc/rc.d/nfs
-rwxr-xr-x root/root etc/rc.d/nfsclient
+-rwxr-xr-x root/root etc/rc.d/nfsdcld
-rwxr-xr-x root/root etc/rc.d/nfsserver
-rwxr-xr-x root/root etc/rc.d/rpc.idmapd
-rwxr-xr-x root/root etc/rc.d/rpc.mountd
@@ -15,8 +16,8 @@ drwxr-xr-x root/root etc/rc.d/
drwxr-xr-x root/root sbin/
-r-s--x--x root/root sbin/mount.nfs
lrwxrwxrwx root/root sbin/mount.nfs4 -> mount.nfs
+-rwxr-xr-x root/root sbin/nfsdcld
-rwxr-xr-x root/root sbin/nfsdcltrack
--rwxr-xr-x root/root sbin/osd_login
lrwxrwxrwx root/root sbin/umount.nfs -> mount.nfs
lrwxrwxrwx root/root sbin/umount.nfs4 -> mount.nfs
drwxr-xr-x root/root usr/
@@ -76,6 +77,7 @@ drwxr-xr-x root/root usr/share/man/man8/
-rw-r--r-- root/root usr/share/man/man8/mountstats.8.gz
-rw-r--r-- root/root usr/share/man/man8/nfsconf.8.gz
-rw-r--r-- root/root usr/share/man/man8/nfsd.8.gz
+-rw-r--r-- root/root usr/share/man/man8/nfsdcld.8.gz
-rw-r--r-- root/root usr/share/man/man8/nfsdcltrack.8.gz
-rw-r--r-- root/root usr/share/man/man8/nfsidmap.8.gz
-rw-r--r-- root/root usr/share/man/man8/nfsiostat.8.gz
@@ -94,6 +96,7 @@ drwxr-xr-x root/root var/
drwxr-xr-x root/root var/lib/
drwxr-xr-x nobody/root var/lib/nfs/
-rw-r--r-- root/root var/lib/nfs/etab (EMPTY)
+drwxr-xr-x root/root var/lib/nfs/nfsdcld/
drwxr-xr-x root/root var/lib/nfs/nfsdcltrack/
-rw-r--r-- root/root var/lib/nfs/rmtab (EMPTY)
drwxr-xr-x root/root var/lib/nfs/rpc_pipefs/
diff --git a/nfs-utils/.signature b/nfs-utils/.signature
index 3354b1a58..c823c80e6 100644
--- a/nfs-utils/.signature
+++ b/nfs-utils/.signature
@@ -1,14 +1,16 @@
untrusted comment: verify with /etc/ports/opt.pub
-RWSE3ohX2g5d/eLH6aBvIhg9+bCQkfry5xuqvqR7GPpQ2IKc70lYdTsmw0ofwXeQFef8FpP8mhrIzyQOAzm7ivmHTwto+dUCAwQ=
-SHA256 (Pkgfile) = 33063499fba0e39b11edb8f3c226fd3a7a25d55b7022445630be00f93a018a08
-SHA256 (.footprint) = 05d8594f7869ef649d07d5bb567a01285ca73b66a100115dc89d88e19919ebb5
-SHA256 (nfs-utils-2.3.3.tar.xz) = f68b34793831b05f1fd5760d6bdec92772c7684177586a99a61e7b444f336322
+RWSE3ohX2g5d/fLC+G7VhbvFQdbZY1XGu29jJE1T6mOxWvp5uzOFB2egNuBUcDCtzMfdBENvfXtBAKRHz26TYQazR0NDixiYvA0=
+SHA256 (Pkgfile) = bbc8ef05ee5628d697218a1f8428278f64cd1edf46137ff093946eb4dfb9441c
+SHA256 (.footprint) = 6e26f43089fdf8b1b3b0608168cd4a7e30c14f89b43ea353b57405619ecc40da
+SHA256 (nfs-utils-2.3.4.tar.xz) = f8328ba386087a9926edd89f78a319ff55418a0e734dbf5f50350f465f0896cd
SHA256 (exports) = 9556615724e66fbe6e7a2bfd740db4c5399a6abafab8cce868975f6926548eec
SHA256 (idmapd.conf) = 2759ea36eff3397c39b534ee34752e02f60976160d66570ae19dbbbb5c00ee53
SHA256 (nfs) = 3ab2824ff5cbe4498faf6cbbbea19793d96bd80c48b9c18c0939938b18ab0217
SHA256 (nfsclient) = 325ba4b960f290fa1431f5c6145417832902e49d39203fe896012376bae1452e
-SHA256 (nfsserver) = 66ab1f3f85bfc56ede050c7f094ba7b2897b7ffd96a2fe9a5cd377d9b473655a
+SHA256 (nfsserver) = dd2b16473db568c0e3375d0b5f215adafa1015ca029b94b654b1f0b48c9fb3fa
SHA256 (rpc.idmapd) = 93b32d0f4f33544a3bbd82e1f4a52e218dad48f7c06dfe08521d47d7c6a4cf96
-SHA256 (rpc.statd) = d60fde1af3250ac8d9b66246ce04d133f133da7e31f4df8969781acb21f34c2f
+SHA256 (rpc.statd) = 764b99273b59839d44a7e05c20d863206df06f5e7e5cb5cedf9da1db624395b9
SHA256 (rpc.mountd) = a6aaaadc054df03a9e6500fdf8b2fc6669d78825daff2c68e52e4d9eb2e0509c
SHA256 (rpc.nfsd) = 12d0936472011db6928e5c0526ac510217a0601863a012e8a1ea565e3c1721de
+SHA256 (nfsdcld) = 5dcefb370bcfb79c0091b27021281aea8b372a6078cd55f549729d4402746be4
+SHA256 (mountd_segfault.patch) = 2cff9229583cc98782631b4dbd32c612340eaafc5d330e112484ee95ca8e13bc
diff --git a/nfs-utils/Pkgfile b/nfs-utils/Pkgfile
index 031cf490b..ef956b771 100644
--- a/nfs-utils/Pkgfile
+++ b/nfs-utils/Pkgfile
@@ -1,37 +1,40 @@
# Description: NFS utilities
# URL: http://nfs.sourceforge.net/
# Maintainer: Juergen Daubert, jue at crux dot nu
-# Depends on: util-linux libcap rpcbind libevent keyutils sqlite3
+# Depends on: libdevmapper util-linux libcap rpcbind libevent keyutils sqlite3
name=nfs-utils
-version=2.3.3
+version=2.3.4
release=1
source=(https://www.kernel.org/pub/linux/utils/$name/$version/$name-$version.tar.xz
exports idmapd.conf
- nfs nfsclient nfsserver rpc.idmapd rpc.statd rpc.mountd rpc.nfsd)
+ nfs nfsclient nfsserver rpc.idmapd rpc.statd rpc.mountd rpc.nfsd nfsdcld
+ mountd_segfault.patch)
build () {
cd $name-$version
+ patch -p1 -i $SRC/mountd_segfault.patch
+
./configure --prefix=/usr \
--sysconfdir=/etc \
--with-statedir=/var/lib/nfs \
--without-tcp-wrappers \
--disable-gss \
- --enable-libmount-mount
+ --enable-libmount-mount
make
make DESTDIR=$PKG install
install -d $PKG/etc/rc.d
- install -m 755 $SRC/nfs{,client,server} $PKG/etc/rc.d/
+ install -m 755 $SRC/nfs{,client,server,dcld} $PKG/etc/rc.d/
install -m 755 $SRC/rpc.* $PKG/etc/rc.d/
install -m 644 $SRC/{exports,idmapd.conf} $PKG/etc/
install -m 644 utils/mount/nfsmount.conf $PKG/etc/
install -m 644 nfs.conf $PKG/etc/
- install -d $PKG/var/lib/nfs/{rpc_pipefs,v4recovery,nfsdcltrack}
+ install -d $PKG/var/lib/nfs/{rpc_pipefs,v4recovery,nfsdcltrack,nfsdcld}
install -d $PKG/etc/exports.d
# force rpc.statd to run as user nobody
diff --git a/nfs-utils/mountd_segfault.patch b/nfs-utils/mountd_segfault.patch
new file mode 100644
index 000000000..d7a0d48c1
--- /dev/null
+++ b/nfs-utils/mountd_segfault.patch
@@ -0,0 +1,92 @@
+From linux-nfs Tue May 14 15:10:15 2019
+From: Chuck Lever <chuck.lever () oracle ! com>
+Date: Tue, 14 May 2019 15:10:15 +0000
+To: linux-nfs
+Subject: [PATCH v2] Fix mountd segfault
+Message-Id: <20190514150755.12543.64896.stgit () oracle-102 ! nfsv4bat ! org>
+X-MARC-Message: https://marc.info/?l=linux-nfs&m=155784661918502
+
+After commit 8f459a072f93 ("Remove abuse of ai_canonname") the
+ai_canonname field in addrinfo structs returned from
+host_reliable_addrinfo() is always NULL. This results in mountd
+segfaults when there are netgroups or hostname wildcards in
+/etc/exports.
+
+Add an extra DNS query in check_wildcard() and check_netgroup() to
+obtain the client's canonical hostname instead of dereferencing
+the NULL pointer.
+
+Reported-by: Mark Wagner <mark@lanfear.net>
+Fixes: 8f459a072f93 ("Remove abuse of ai_canonname")
+Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
+---
+
+Changes since v1:
+- Added similar fix for check_netgroup
+- Restructured exit/error paths in check_wildcard
+
+ support/export/client.c | 32 +++++++++++++++++++++-----------
+ 1 file changed, 21 insertions(+), 11 deletions(-)
+
+diff --git a/support/export/client.c b/support/export/client.c
+index a1fba01..ea4f89d 100644
+--- a/support/export/client.c
++++ b/support/export/client.c
+@@ -608,24 +608,36 @@ check_subnetwork(const nfs_client *clp, const struct addrinfo *ai)
+ static int
+ check_wildcard(const nfs_client *clp, const struct addrinfo *ai)
+ {
+- char *cname = clp->m_hostname;
+- char *hname = ai->ai_canonname;
++ char *hname, *cname = clp->m_hostname;
+ struct hostent *hp;
+ char **ap;
++ int match;
+
+- if (wildmat(hname, cname))
+- return 1;
++ match = 0;
++
++ hname = host_canonname(ai->ai_addr);
++ if (hname == NULL)
++ goto out;
++
++ if (wildmat(hname, cname)) {
++ match = 1;
++ goto out;
++ }
+
+ /* See if hname aliases listed in /etc/hosts or nis[+]
+ * match the requested wildcard */
+ hp = gethostbyname(hname);
+ if (hp != NULL) {
+ for (ap = hp->h_aliases; *ap; ap++)
+- if (wildmat(*ap, cname))
+- return 1;
++ if (wildmat(*ap, cname)) {
++ match = 1;
++ goto out;
++ }
+ }
+
+- return 0;
++out:
++ free(hname);
++ return match;
+ }
+
+ /*
+@@ -645,11 +657,9 @@ check_netgroup(const nfs_client *clp, const struct addrinfo *ai)
+
+ match = 0;
+
+- hname = strdup(ai->ai_canonname);
+- if (hname == NULL) {
+- xlog(D_GENERAL, "%s: no memory for strdup", __func__);
++ hname = host_canonname(ai->ai_addr);
++ if (hname == NULL)
+ goto out;
+- }
+
+ /* First, try to match the hostname without
+ * splitting off the domain */
diff --git a/nfs-utils/nfsdcld b/nfs-utils/nfsdcld
new file mode 100644
index 000000000..f38c59cc5
--- /dev/null
+++ b/nfs-utils/nfsdcld
@@ -0,0 +1,36 @@
+#!/bin/sh
+#
+# /etc/rc.d/rpc.statd: start/stop statd daemon
+#
+
+SSD=/sbin/start-stop-daemon
+PROG=/sbin/nfsdcld
+PID=/var/run/nfsdcld
+OPTS="--foreground"
+
+case $1 in
+start)
+ $SSD --start -bmC --pidfile $PID --exec $PROG -- $OPTS
+ ;;
+stop)
+ $SSD --stop --remove-pidfile --retry 10 --pidfile $PID
+ ;;
+restart)
+ $0 stop
+ $0 start
+ ;;
+status)
+ $SSD --status --pidfile $PID
+ case $? in
+ 0) echo "$PROG is running with pid $(cat $PID)" ;;
+ 1) echo "$PROG is not running but the pid file $PID exists" ;;
+ 3) echo "$PROG is not running" ;;
+ 4) echo "Unable to determine the program status" ;;
+ esac
+ ;;
+*)
+ echo "usage: $0 [start|stop|restart|status]"
+ ;;
+esac
+
+# End of file
diff --git a/nfs-utils/nfsserver b/nfs-utils/nfsserver
index 09ec88bb5..de62efebd 100644
--- a/nfs-utils/nfsserver
+++ b/nfs-utils/nfsserver
@@ -12,11 +12,13 @@ start)
/etc/rc.d/rpc.mountd start
/etc/rc.d/rpc.nfsd start
/usr/sbin/sm-notify
+ /etc/rc.d/nfsdcld start
;;
stop)
/etc/rc.d/rpc.nfsd stop
/etc/rc.d/rpc.mountd stop
/usr/sbin/exportfs -au
+ /etc/rc.d/nfsdcld stop
/bin/umount $NFSD
;;
restart)
@@ -26,6 +28,7 @@ restart)
status)
/etc/rc.d/rpc.mountd status
/etc/rc.d/rpc.nfsd status
+ /etc/rc.d/nfsdcld status
;;
*)
echo "usage: $0 [start|stop|restart|status]"
diff --git a/nfs-utils/rpc.statd b/nfs-utils/rpc.statd
index 6acf45b90..de594d095 100644
--- a/nfs-utils/rpc.statd
+++ b/nfs-utils/rpc.statd
@@ -5,6 +5,7 @@
SSD=/sbin/start-stop-daemon
PROG=/usr/sbin/rpc.statd
+NAME=rpc.statd
PID=/var/run/rpc.statd.pid
OPTS="--no-notify"
@@ -13,14 +14,14 @@ start)
$SSD --start --pidfile $PID --exec $PROG -- $OPTS
;;
stop)
- $SSD --stop --retry 10 --pidfile $PID
+ $SSD --stop --retry 10 --pidfile $PID --name $NAME
;;
restart)
$0 stop
$0 start
;;
status)
- $SSD --status --pidfile $PID
+ $SSD --status --pidfile $PID --name $NAME
case $? in
0) echo "$PROG is running with pid $(cat $PID)" ;;
1) echo "$PROG is not running but the pid file $PID exists" ;;

Generated by cgit