From: Andreas Schneider Date: Mon, 20 Oct 2008 12:54:11 +0000 (+0200) Subject: Delete the krb5 ccname variable from the PAM environment if set. X-Git-Tag: samba-4.0.0alpha6~774^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e858cc20830bc395f71f5f76ca68476bf798155f;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/source3/nsswitch/pam_winbind.c b/source3/nsswitch/pam_winbind.c index 4cfd9001d6e..2967770d8d0 100644 --- a/source3/nsswitch/pam_winbind.c +++ b/source3/nsswitch/pam_winbind.c @@ -2740,6 +2740,14 @@ out: user, "wbcLogoffUser"); } + /* + * 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); TALLOC_FREE(ctx);