SHA256
1
0
forked from pool/pam_mount
pam_mount/pam_mount-1.27-fix-krb5-env.dif
OBS User autobuild 29b136c663 Accepting request 24760 from home:mcalmer:branches:openSUSE:11.2
Copy from home:mcalmer:branches:openSUSE:11.2/pam_mount based on submit request 24760 from user mcalmer

OBS-URL: https://build.opensuse.org/request/show/24760
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pam_mount?expand=0&rev=32
2009-11-20 13:35:27 +00:00

40 lines
1.2 KiB
Plaintext

Index: pam_mount-1.27/doc/changelog.txt
===================================================================
--- pam_mount-1.27.orig/doc/changelog.txt
+++ pam_mount-1.27/doc/changelog.txt
@@ -4,6 +4,7 @@ For details, see the history as recorded
Fixes:
- pam_mount: avoid crash in sudo by not calling setenv() with NULL
+- pam_mount: unwind krb5 environment info at the right time
- umount.crypt: do not remove entry from /etc/mtab twice
v1.27 (July 01 2009)
Index: pam_mount-1.27/src/pam_mount.c
===================================================================
--- pam_mount-1.27.orig/src/pam_mount.c
+++ pam_mount-1.27/src/pam_mount.c
@@ -550,9 +550,10 @@ PAM_EXTERN EXPORT_SYMBOL int pam_sm_open
ret = PAM_SERVICE_ERR;
}
}
- memset(system_authtok, 0, strlen(system_authtok));
- if (krb5 != NULL)
- unsetenv("KRB5CCNAME");
+ if (system_authtok != NULL) {
+ memset(system_authtok, 0, strlen(system_authtok));
+ free(system_authtok);
+ }
modify_pm_count(&Config, Config.user, "1");
envpath_restore();
if (getuid() == 0)
@@ -570,6 +571,8 @@ PAM_EXTERN EXPORT_SYMBOL int pam_sm_open
*/
ret = PAM_SUCCESS;
out:
+ if (krb5 != NULL)
+ unsetenv("KRB5CCNAME");
w4rn("done opening session (ret=%d)\n", ret);
common_exit();
return ret;