Blame nfs-utils-1.2.8-gssd-home.patch
|
|
8a329e0 |
diff -up nfs-utils-1.2.8/utils/gssd/gssd.c.orig nfs-utils-1.2.8/utils/gssd/gssd.c
|
|
|
8a329e0 |
--- nfs-utils-1.2.8/utils/gssd/gssd.c.orig 2013-04-22 12:47:20.000000000 -0400
|
|
|
8a329e0 |
+++ nfs-utils-1.2.8/utils/gssd/gssd.c 2014-01-22 14:26:22.072929000 -0500
|
|
|
8a329e0 |
@@ -46,6 +46,7 @@
|
|
|
8a329e0 |
|
|
|
8a329e0 |
#include <unistd.h>
|
|
|
8a329e0 |
#include <err.h>
|
|
|
8a329e0 |
+#include <errno.h>
|
|
|
8a329e0 |
#include <stdio.h>
|
|
|
8a329e0 |
#include <stdlib.h>
|
|
|
8a329e0 |
#include <string.h>
|
|
|
8a329e0 |
@@ -159,6 +160,18 @@ main(int argc, char *argv[])
|
|
|
8a329e0 |
}
|
|
|
8a329e0 |
}
|
|
|
8a329e0 |
|
|
|
8a329e0 |
+ /*
|
|
|
8a329e0 |
+ * Some krb5 routines try to scrape info out of files in the user's
|
|
|
8a329e0 |
+ * home directory. This can easily deadlock when that homedir is on a
|
|
|
8a329e0 |
+ * kerberized NFS mount. By setting $HOME unconditionally to "/", we
|
|
|
8a329e0 |
+ * prevent this behavior in routines that use $HOME in preference to
|
|
|
8a329e0 |
+ * the results of getpw*.
|
|
|
8a329e0 |
+ */
|
|
|
8a329e0 |
+ if (setenv("HOME", "/", 1)) {
|
|
|
8a329e0 |
+ printerr(1, "Unable to set $HOME: %s\n", strerror(errno));
|
|
|
8a329e0 |
+ exit(1);
|
|
|
8a329e0 |
+ }
|
|
|
8a329e0 |
+
|
|
|
8a329e0 |
i = 0;
|
|
|
8a329e0 |
ccachesearch[i++] = strtok(ccachedir, ":");
|
|
|
8a329e0 |
do {
|