From 6d759164936f0973084607018f78b7f14d98a680 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: May 07 2019 19:24:41 +0000 Subject: import nfs-utils-2.3.3-14.el8_0 --- diff --git a/SOURCES/nfs-utils-2.3.3-statd-no-notify.patch b/SOURCES/nfs-utils-2.3.3-statd-no-notify.patch new file mode 100644 index 0000000..e29d2e4 --- /dev/null +++ b/SOURCES/nfs-utils-2.3.3-statd-no-notify.patch @@ -0,0 +1,105 @@ +commit 5394f939b591e65fec37a6bee826c13620d3f39b +Author: Justin Mitchell +Date: Mon Mar 4 11:53:09 2019 -0500 + + Add nfs.conf equivalent for the statd --no-notify cmdline option + + Also cleaned up how nfs.conf is read. + + Signed-off-by: Justin Mitchell + Signed-off-by: Steve Dickson + +diff --git a/nfs.conf b/nfs.conf +index f1ebfdb..d332375 100644 +--- a/nfs.conf ++++ b/nfs.conf +@@ -62,6 +62,7 @@ + # name= + # state-directory-path=/var/lib/nfs/statd + # ha-callout= ++# no-notify=0 + # + [sm-notify] + # debug=0 +diff --git a/utils/statd/statd.c b/utils/statd/statd.c +index 2cc6cf3..1467380 100644 +--- a/utils/statd/statd.c ++++ b/utils/statd/statd.c +@@ -238,6 +238,39 @@ static void set_nlm_port(char *type, int port) + fprintf(stderr, "%s: failed to open %s: %s\n", + name_p, pathbuf, strerror(errno)); + } ++int port = 0, out_port = 0; ++int nlm_udp = 0, nlm_tcp = 0; ++ ++inline static void ++read_nfsconf(char **argv) ++{ ++ char *s; ++ ++ conf_init_file(NFS_CONFFILE); ++ xlog_from_conffile("statd"); ++ ++ out_port = conf_get_num("statd", "outgoing-port", out_port); ++ port = conf_get_num("statd", "port", port); ++ ++ MY_NAME = conf_get_str("statd", "name"); ++ if (MY_NAME) ++ run_mode |= STATIC_HOSTNAME; ++ ++ s = conf_get_str("statd", "state-directory-path"); ++ if (s && !nsm_setup_pathnames(argv[0], s)) ++ exit(1); ++ ++ s = conf_get_str("statd", "ha-callout"); ++ if (s) ++ ha_callout_prog = s; ++ ++ nlm_tcp = conf_get_num("lockd", "port", nlm_tcp); ++ /* udp defaults to the same as tcp ! */ ++ nlm_udp = conf_get_num("lockd", "udp-port", nlm_tcp); ++ ++ if (conf_get_bool("statd", "no-notify", false)) ++ run_mode |= MODE_NO_NOTIFY; ++} + + /* + * Entry routine/main loop. +@@ -245,11 +278,8 @@ static void set_nlm_port(char *type, int port) + int main (int argc, char **argv) + { + extern char *optarg; +- char *s; + int pid; + int arg; +- int port = 0, out_port = 0; +- int nlm_udp = 0, nlm_tcp = 0; + struct rlimit rlim; + int notify_sockfd; + char *env; +@@ -275,23 +305,8 @@ int main (int argc, char **argv) + /* Set hostname */ + MY_NAME = NULL; + +- conf_init_file(NFS_CONFFILE); +- xlog_from_conffile("statd"); +- out_port = conf_get_num("statd", "outgoing-port", out_port); +- port = conf_get_num("statd", "port", port); +- MY_NAME = conf_get_str("statd", "name"); +- if (MY_NAME) +- run_mode |= STATIC_HOSTNAME; +- s = conf_get_str("statd", "state-directory-path"); +- if (s && !nsm_setup_pathnames(argv[0], s)) +- exit(1); +- s = conf_get_str("statd", "ha-callout"); +- if (s) +- ha_callout_prog = s; +- +- nlm_tcp = conf_get_num("lockd", "port", nlm_tcp); +- /* udp defaults to the same as tcp ! */ +- nlm_udp = conf_get_num("lockd", "udp-port", nlm_tcp); ++ /* Read nfs.conf */ ++ read_nfsconf(argv); + + /* Process command line switches */ + while ((arg = getopt_long(argc, argv, "h?vVFNH:dn:p:o:P:LT:U:", longopts, NULL)) != EOF) { diff --git a/SOURCES/nfsconvert.py b/SOURCES/nfsconvert.py index dd240ee..da2f621 100644 --- a/SOURCES/nfsconvert.py +++ b/SOURCES/nfsconvert.py @@ -82,9 +82,9 @@ CONV_MOUNTD = {'-g': (CONF_NFS, 'mountd', 'manage-gids', '1'), } # options for statd found in STATDARG -OPTS_STATD = 'o:p:T:U:n:P:H:' +OPTS_STATD = 'o:p:T:U:n:P:H:L' LONG_STATD = ['outgoing-port=', 'port=', 'name=', 'state-directory-path=', - 'ha-callout=', 'nlm-port=', 'nlm-udp-port='] + 'ha-callout=', 'nlm-port=', 'nlm-udp-port=', 'no-notify'] CONV_STATD = {'-o': (CONF_NFS, 'statd', 'outgoing-port', '$1'), '-p': (CONF_NFS, 'statd', 'port', '$1'), '-T': (CONF_NFS, 'lockd', 'port', '$1'), @@ -92,6 +92,7 @@ CONV_STATD = {'-o': (CONF_NFS, 'statd', 'outgoing-port', '$1'), '-n': (CONF_NFS, 'statd', 'name', '$1'), '-P': (CONF_NFS, 'statd', 'state-directory-path', '$1'), '-H': (CONF_NFS, 'statd', 'ha-callout', '$1'), + '-L': (CONF_NFS, 'statd', 'no-notify', '1'), '--outgoing-port': (CONF_NFS, 'statd', 'outgoing-port', '$1'), '--port': (CONF_NFS, 'statd', 'port', '$1'), '--name': (CONF_NFS, 'statd', 'name', '$1'), @@ -99,6 +100,7 @@ CONV_STATD = {'-o': (CONF_NFS, 'statd', 'outgoing-port', '$1'), '--ha-callout': (CONF_NFS, 'statd', 'ha-callout', '$1'), '--nlm-port': (CONF_NFS, 'lockd', 'port', '$1'), '--nlm-udp-port': (CONF_NFS, 'lockd', 'udp-port', '$1'), + '--no-notify': (CONF_NFS, 'statd', 'no-notify', '1'), } # options for sm-notify found in SMNOTIFYARGS diff --git a/SOURCES/nfsconvert.sh b/SOURCES/nfsconvert.sh index ce28562..f4e5b2d 100644 --- a/SOURCES/nfsconvert.sh +++ b/SOURCES/nfsconvert.sh @@ -36,3 +36,9 @@ fi # /usr/sbin/nfsconvert +# +# Make sure the modes are correct +# +if [ $? -eq 0 ]; then + chmod 644 /etc/nfs.conf +fi diff --git a/SPECS/nfs-utils.spec b/SPECS/nfs-utils.spec index 4101f67..a6c1b38 100644 --- a/SPECS/nfs-utils.spec +++ b/SPECS/nfs-utils.spec @@ -28,6 +28,11 @@ Patch006: nfs-utils-2.3.3-man-tcpwrappers.patch Patch007: nfs-utils-2.3.3-junction-update.patch Patch008: nfs-utils-2.3.3-gating-tests.patch +# +# RHEL 8.0-Z +# +Patch009: nfs-utils-2.3.3-statd-no-notify.patch + Patch100: nfs-utils-1.2.1-statdpath-man.patch Patch101: nfs-utils-1.2.1-exp-subtree-warn-off.patch Patch102: nfs-utils-1.2.5-idmap-errmsg.patch @@ -313,6 +318,10 @@ fi %{_libdir}/libnfsidmap.so %changelog +* Wed Apr 3 2019 Steve Dickson 2.3.3-14_0 +- Add nfs.conf equivalent for the statd --no-notify cmdline option (1690280) +- Correct the modes on /etc/nfs.conf after a conversion (bz 1690266) + * Wed Feb 13 2019 Steve Dickson 2.3.3-14 - Fix typo in checking for the 65534 uid/gid (bz 1655960)