From: Andreas Schneider Date: Mon, 19 Jan 2009 15:26:07 +0000 (+0100) Subject: Avoid flooding of syslog with failing pam_putenv messages. X-Git-Tag: samba-4.0.0alpha6~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=aa79f76b0cfcf402bdf955cdf8356d619ace0b68;p=thirdparty%2Fsamba.git Avoid flooding of syslog with failing pam_putenv messages. Signed-off-by: Andreas Schneider Signed-off-by: Günther Deschner --- diff --git a/nsswitch/pam_winbind.c b/nsswitch/pam_winbind.c index d049bdb1e7d..62d72c291b2 100644 --- a/nsswitch/pam_winbind.c +++ b/nsswitch/pam_winbind.c @@ -2428,7 +2428,7 @@ out: * Delete the krb5 ccname variable from the PAM environment * if it was set by winbind. */ - if (ctx->ctrl & WINBIND_KRB5_AUTH) { + if ((ctx->ctrl & WINBIND_KRB5_AUTH) && pam_getenv(pamh, "KRB5CCNAME")) { pam_putenv(pamh, "KRB5CCNAME"); }