From: Andreas Schneider Date: Mon, 20 Oct 2008 15:35:42 +0000 (+0200) Subject: Delete the krb5 ccname variable from the PAM environment if set. X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e7b0d1c984a37600a234c1f4c95b06e9b5898f30;p=thirdparty%2Fsamba.git 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. --- 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);