summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Schneider <mail@cynapses.org>2008-10-20 17:35:42 +0200
committerKarolin Seeger <kseeger@samba.org>2008-10-23 10:52:52 +0200
commitddba89d7713923bfbf1c8492c5dc6c6d5b220f1e (patch)
tree9e4d504deeafafd58451307d39bcfbb2bb09d1d0
parent1d86b5e003effb4bb56ef9b0444da63a909fbc3c (diff)
downloadsamba-ddba89d7713923bfbf1c8492c5dc6c6d5b220f1e.tar.gz
samba-ddba89d7713923bfbf1c8492c5dc6c6d5b220f1e.tar.xz
samba-ddba89d7713923bfbf1c8492c5dc6c6d5b220f1e.zip
Delete the krb5 ccname variable from the PAM environment if set.
If winbind sets the KRB5CCNAME variable it should unset it when the cache gets destroyed. (cherry picked from commit e7b0d1c984a37600a234c1f4c95b06e9b5898f30)
-rw-r--r--source/nsswitch/pam_winbind.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/nsswitch/pam_winbind.c b/source/nsswitch/pam_winbind.c
index 95b3d23dd43..15b33e3a2fc 100644
--- a/source/nsswitch/pam_winbind.c
+++ b/source/nsswitch/pam_winbind.c
@@ -2358,6 +2358,13 @@ int pam_sm_close_session(pam_handle_t *pamh, int flags,
}
out:
+ /*
+ * Delete the krb5 ccname variable from the PAM environment
+ * if it was set by winbind.
+ */
+ if (ctx->ctrl & WINBIND_KRB5_AUTH) {
+ pam_putenv(pamh, "KRB5CCNAME");
+ }
_PAM_LOG_FUNCTION_LEAVE("pam_sm_close_session", ctx, retval);