diff options
author | 2009-06-15 13:31:56 +0000 | |
---|---|---|
committer | 2009-06-15 13:31:56 +0000 | |
commit | 83a20d36e8f8d528d20e5a5be376d4614f72d88a (patch) | |
tree | ac35ff74b145256165ca357247bb4b254cded000 /sys-auth/pam_mount/files | |
parent | Remove old. (diff) | |
download | gentoo-2-83a20d36e8f8d528d20e5a5be376d4614f72d88a.tar.gz gentoo-2-83a20d36e8f8d528d20e5a5be376d4614f72d88a.tar.bz2 gentoo-2-83a20d36e8f8d528d20e5a5be376d4614f72d88a.zip |
Add a patch to fix sudo segfault (bug #273785).
(Portage version: 2.2_rc33/cvs/Linux x86_64)
Diffstat (limited to 'sys-auth/pam_mount/files')
-rw-r--r-- | sys-auth/pam_mount/files/pam_mount-1.25-nullsetenv.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/sys-auth/pam_mount/files/pam_mount-1.25-nullsetenv.patch b/sys-auth/pam_mount/files/pam_mount-1.25-nullsetenv.patch new file mode 100644 index 000000000000..fe41263e87a6 --- /dev/null +++ b/sys-auth/pam_mount/files/pam_mount-1.25-nullsetenv.patch @@ -0,0 +1,34 @@ +Index: pam_mount-1.25/src/pam_mount.c +=================================================================== +--- pam_mount-1.25.orig/src/pam_mount.c ++++ pam_mount-1.25/src/pam_mount.c +@@ -445,7 +445,7 @@ PAM_EXTERN EXPORT_SYMBOL int pam_sm_open + { + struct vol *vol; + int ret; +- unsigned int krb5_set; ++ char *krb5; + char *system_authtok = NULL; + const void *tmp; + int getval; +@@ -461,8 +461,9 @@ PAM_EXTERN EXPORT_SYMBOL int pam_sm_open + * Get the Kerberos CCNAME so we can make it available to the + * mount command later on. + */ +- krb5_set = getenv("KRB5CCNAME") != NULL; +- if (setenv("KRB5CCNAME", pam_getenv(pamh, "KRB5CCNAME"), 1) < 0) ++ krb5 = pam_getenv(pamh, "KRB5CCNAME"); ++ if (krb5 != NULL && ++ setenv("KRB5CCNAME", krb5, 1) < 0) + l0g("KRB5CCNAME setenv failed\n"); + + /* Store initialized config as PAM data */ +@@ -539,7 +540,7 @@ PAM_EXTERN EXPORT_SYMBOL int pam_sm_open + } + } + memset(system_authtok, 0, strlen(system_authtok)); +- if (krb5_set) ++ if (krb5 != NULL) + unsetenv("KRB5CCNAME"); + modify_pm_count(&Config, Config.user, "1"); + envpath_restore(); |