Fix bug #7589 - ntlm_auth fails to use cached credentials.
authorJeremy Allison <jra@samba.org>
Thu, 29 Jul 2010 19:44:00 +0000 (12:44 -0700)
committerJeremy Allison <jra@samba.org>
Thu, 29 Jul 2010 19:44:00 +0000 (12:44 -0700)
commit4f4303048260ca19a5feef6b9338add1a19fb53c
tree8e2854192835290f16ff5810dcf79b96a5b3a058
parente8d386704e4c126b979ffe6c8b588fb311cc2e34
Fix bug #7589 - ntlm_auth fails to use cached credentials.

In handling the WINBINDD_PAM_AUTH message winbindd canonicalizes a *copy*
of the mapped username, but fails to canonicalize the actual username
sent to the backend domain process. When "winbind default domain"
is set this can lead to credentials being cached with an index of
user: user, not DOMAIN\user. All other code paths that use
canonicalize_username() (WINBINDD_PAM_CHAUTHTOK, WINBINDD_PAM_LOGOFF)
correctly canonicalize the data sent to the backend. All calls
the can cause credentials to be looked up (PAM_CHAUTHTOK etc.)
correctly call canonicalize_username() to create the credential
lookup key.

Jeremy.
source3/winbindd/winbindd_pam_auth.c