nfs-utils: update to 2.4.1
This commit is contained in:
parent
c3404edda3
commit
2f5827bc25
@ -1,8 +1,8 @@
|
||||
untrusted comment: verify with /etc/ports/opt.pub
|
||||
RWSE3ohX2g5d/fLC+G7VhbvFQdbZY1XGu29jJE1T6mOxWvp5uzOFB2egNuBUcDCtzMfdBENvfXtBAKRHz26TYQazR0NDixiYvA0=
|
||||
SHA256 (Pkgfile) = bbc8ef05ee5628d697218a1f8428278f64cd1edf46137ff093946eb4dfb9441c
|
||||
RWSE3ohX2g5d/X66FtaM1kx9wW3dMjhJXq64+qGbNpWbt/tAjAXN+tjUzNqCW117ZZZBRjJBrq/n+sWIXjdmZF5i/r5tPj6GfQE=
|
||||
SHA256 (Pkgfile) = 1f2af8c42f3e577e753b73955e9973f3b8fa760403347432ce6021bae0963982
|
||||
SHA256 (.footprint) = 6e26f43089fdf8b1b3b0608168cd4a7e30c14f89b43ea353b57405619ecc40da
|
||||
SHA256 (nfs-utils-2.3.4.tar.xz) = f8328ba386087a9926edd89f78a319ff55418a0e734dbf5f50350f465f0896cd
|
||||
SHA256 (nfs-utils-2.4.1.tar.xz) = 85274ada94479b1beba9f8eeffd19f477c53a6710b9998d1192c807854087736
|
||||
SHA256 (exports) = 9556615724e66fbe6e7a2bfd740db4c5399a6abafab8cce868975f6926548eec
|
||||
SHA256 (idmapd.conf) = 2759ea36eff3397c39b534ee34752e02f60976160d66570ae19dbbbb5c00ee53
|
||||
SHA256 (nfs) = 3ab2824ff5cbe4498faf6cbbbea19793d96bd80c48b9c18c0939938b18ab0217
|
||||
@ -12,5 +12,4 @@ SHA256 (rpc.idmapd) = 93b32d0f4f33544a3bbd82e1f4a52e218dad48f7c06dfe08521d47d7c6
|
||||
SHA256 (rpc.statd) = 764b99273b59839d44a7e05c20d863206df06f5e7e5cb5cedf9da1db624395b9
|
||||
SHA256 (rpc.mountd) = a6aaaadc054df03a9e6500fdf8b2fc6669d78825daff2c68e52e4d9eb2e0509c
|
||||
SHA256 (rpc.nfsd) = 12d0936472011db6928e5c0526ac510217a0601863a012e8a1ea565e3c1721de
|
||||
SHA256 (nfsdcld) = 5dcefb370bcfb79c0091b27021281aea8b372a6078cd55f549729d4402746be4
|
||||
SHA256 (mountd_segfault.patch) = 2cff9229583cc98782631b4dbd32c612340eaafc5d330e112484ee95ca8e13bc
|
||||
SHA256 (nfsdcld) = 97f6078e72ac4c796652f89cfd76a224f71c3f987b3a67a7e18fe1fe4caf39b6
|
||||
|
@ -4,18 +4,16 @@
|
||||
# Depends on: libdevmapper util-linux libcap rpcbind libevent keyutils sqlite3
|
||||
|
||||
name=nfs-utils
|
||||
version=2.3.4
|
||||
version=2.4.1
|
||||
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 nfsdcld
|
||||
mountd_segfault.patch)
|
||||
nfs nfsclient nfsserver rpc.idmapd rpc.statd rpc.mountd rpc.nfsd nfsdcld)
|
||||
|
||||
build () {
|
||||
cd $name-$version
|
||||
|
||||
patch -p1 -i $SRC/mountd_segfault.patch
|
||||
|
||||
CONFIG_SHELL=/bin/bash \
|
||||
./configure --prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--with-statedir=/var/lib/nfs \
|
||||
|
@ -1,92 +0,0 @@
|
||||
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 */
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# /etc/rc.d/rpc.statd: start/stop statd daemon
|
||||
# /etc/rc.d/rpc.statd: start/stop NFSv4 Client Tracking Daemon
|
||||
#
|
||||
|
||||
SSD=/sbin/start-stop-daemon
|
||||
|
Loading…
x
Reference in New Issue
Block a user