diff options
Diffstat (limited to 'utils/gssd/gssd.c')
-rw-r--r-- | utils/gssd/gssd.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/utils/gssd/gssd.c b/utils/gssd/gssd.c index fdad153..611ef1a 100644 --- a/utils/gssd/gssd.c +++ b/utils/gssd/gssd.c @@ -46,6 +46,7 @@ #include <unistd.h> #include <err.h> +#include <errno.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -161,6 +162,18 @@ main(int argc, char *argv[]) } } + /* + * Some krb5 routines try to scrape info out of files in the user's + * home directory. This can easily deadlock when that homedir is on a + * kerberized NFS mount. By setting $HOME unconditionally to "/", we + * prevent this behavior in routines that use $HOME in preference to + * the results of getpw*. + */ + if (setenv("HOME", "/", 1)) { + printerr(1, "Unable to set $HOME: %s\n", strerror(errno)); + exit(1); + } + i = 0; ccachesearch[i++] = strtok(ccachedir, ":"); do { |