Delete the krb5 ccname variable from the PAM environment if set.
authorAndreas Schneider <anschneider@suse.de>
Mon, 20 Oct 2008 12:54:11 +0000 (14:54 +0200)
committerGünther Deschner <gd@samba.org>
Tue, 21 Oct 2008 13:26:39 +0000 (15:26 +0200)
If winbind sets the KRB5CCNAME variable it should unset it when
the cache gets destroyed.

source3/nsswitch/pam_winbind.c

index 4cfd9001d6e17e2d2769fbf98b75776823220feb..2967770d8d0493d72b523302049af7195799fb34 100644 (file)
@@ -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);