From 0c6d0c046bbd5b5210df7a7e6f3906861e89a8fc Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Feb 16 2016 10:36:41 +0000 Subject: import nfs-utils-1.3.0-0.21.el7_2 --- diff --git a/SOURCES/nfs-utils-1.3.0-hostpton-eainoname.patch b/SOURCES/nfs-utils-1.3.0-hostpton-eainoname.patch new file mode 100644 index 0000000..3484c1f --- /dev/null +++ b/SOURCES/nfs-utils-1.3.0-hostpton-eainoname.patch @@ -0,0 +1,26 @@ +commit 23d26f9c9fd94406d0c1f4365e6180d59b744861 +Author: Scott Mayhew +Date: Mon Nov 2 08:45:09 2015 -0500 + + exportfs: Restore the EAI_NONAME check in host_pton() + + Commit d89e3fc7 removed the EAI_NONAME check altogether instead of just + moving the NULL check. This causes exportfs -u to incorrectly exit + with 1 whenever there's more than one MCL_FQDN export in the exportlist. + + Signed-off-by: Scott Mayhew + Signed-off-by: Steve Dickson + +diff --git a/support/export/hostname.c b/support/export/hostname.c +index 169baa5..7a44d42 100644 +--- a/support/export/hostname.c ++++ b/support/export/hostname.c +@@ -134,6 +134,8 @@ host_pton(const char *paddr) + break; + } + return ai; ++ case EAI_NONAME: ++ break; + case EAI_SYSTEM: + xlog(D_GENERAL, "%s: failed to convert %s: (%d) %m", + __func__, paddr, errno); diff --git a/SOURCES/nfs-utils-1.3.0-rpcgssd-maccout-nocase.patch b/SOURCES/nfs-utils-1.3.0-rpcgssd-maccout-nocase.patch new file mode 100644 index 0000000..92e2d7d --- /dev/null +++ b/SOURCES/nfs-utils-1.3.0-rpcgssd-maccout-nocase.patch @@ -0,0 +1,66 @@ +diff --git a/utils/gssd/krb5_util.c b/utils/gssd/krb5_util.c +index 5fde091..990111d 100644 +--- a/utils/gssd/krb5_util.c ++++ b/utils/gssd/krb5_util.c +@@ -801,8 +801,10 @@ find_keytab_entry(krb5_context context, krb5_keytab kt, const char *tgtname, + char *default_realm = NULL; + char *realm; + char *k5err = NULL; +- int tried_all = 0, tried_default = 0; ++ int tried_all = 0, tried_default = 0, tried_upper = 0; + krb5_principal princ; ++ const char *notsetstr = "not set"; ++ char *adhostoverride; + + + /* Get full target hostname */ +@@ -820,13 +822,23 @@ find_keytab_entry(krb5_context context, krb5_keytab kt, const char *tgtname, + } + + /* Compute the active directory machine name HOST$ */ +- strcpy(myhostad, myhostname); +- for (i = 0; myhostad[i] != 0; ++i) { +- if (myhostad[i] == '.') break; +- myhostad[i] = toupper(myhostad[i]); ++ krb5_appdefault_string(context, "nfs", NULL, "ad_principal_name", ++ notsetstr, &adhostoverride); ++ if (strcmp(adhostoverride, notsetstr) != 0) { ++ printerr (1, ++ "AD host string overridden with \"%s\" from appdefaults\n", ++ adhostoverride); ++ /* No overflow: Windows cannot handle strings longer than 19 chars */ ++ strcpy(myhostad, adhostoverride); ++ free(adhostoverride); ++ } else { ++ strcpy(myhostad, myhostname); ++ for (i = 0; myhostad[i] != 0; ++i) { ++ if (myhostad[i] == '.') break; ++ } ++ myhostad[i] = '$'; ++ myhostad[i+1] = 0; + } +- myhostad[i] = '$'; +- myhostad[i+1] = 0; + + retval = get_full_hostname(myhostname, myhostname, sizeof(myhostname)); + if (retval) { +@@ -923,6 +935,19 @@ find_keytab_entry(krb5_context context, krb5_keytab kt, const char *tgtname, + k5err = gssd_k5_err_msg(context, code); + printerr(3, "%s while getting keytab entry for '%s'\n", + k5err, spn); ++ /* ++ * We tried the active directory machine account ++ * with the hostname part as-is and failed... ++ * convert it to uppercase and try again before ++ * moving on to the svcname ++ */ ++ if (strcmp(svcnames[j],"$") == 0 && !tried_upper) { ++ for (i = 0; myhostad[i] != '$'; ++i) { ++ myhostad[i] = toupper(myhostad[i]); ++ } ++ j--; ++ tried_upper = 1; ++ } + } else { + printerr(3, "Success getting keytab entry for '%s'\n",spn); + retval = 0; diff --git a/SPECS/nfs-utils.spec b/SPECS/nfs-utils.spec index cf8d7b8..3d5eb1c 100644 --- a/SPECS/nfs-utils.spec +++ b/SPECS/nfs-utils.spec @@ -51,6 +51,12 @@ Patch028: nfs-utils-1.3.0-gssd-noclear-retval.patch Patch029: nfs-utils-1.3.0-gssd-tgt-flood.patch Patch030: nfs-utils-1.3.0-systemd-decouple.patch +# +# RHEL7.2-Z +# +Patch031: nfs-utils-1.3.0-hostpton-eainoname.patch +Patch032: nfs-utils-1.3.0-rpcgssd-maccout-nocase.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.3-sm-notify-res_init.patch @@ -168,6 +174,10 @@ This package also contains the mount.nfs and umount.nfs program. %patch029 -p1 # 1266993 - restarting rpbind also restart the the nfs server %patch030 -p1 +# 1288435 - exportfs -u incorrectly exits with a 1 whenever... +%patch031 -p1 +# 1288433 - rpc.gssd should not assume that the machine account is in uppercase +%patch032 -p1 %patch100 -p1 %patch101 -p1 @@ -406,6 +416,10 @@ fi /sbin/umount.nfs4 %changelog +* Tue Dec 15 2015 Steve Dickson 1.3.0-0.21_2 +- exportfs: Restore the EAI_NONAME check in host_pton() (bz 1288435) +- gssd: Don't assume the machine account will be in uppercase (bz 1288433) + * Tue Sep 29 2015 Steve Dickson 1.3.0-0.21 - Stop gssd from flooding the KDC with TGT fetches (bz 1264999) - Decouple the start/stop of rpcbind with nfs-server and rpc-statd (bz 1266993)