r22730: Fix password changes via pam_winbindd when using "winbind normalize names"
authorGerald Carter <jerry@samba.org>
Sun, 6 May 2007 22:22:47 +0000 (22:22 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:21:51 +0000 (12:21 -0500)
and the username has been munged.  Make sure to munge it back before
performing the change_password() request.

source/nsswitch/winbindd_pam.c

index 3fcb09419865326d630b45b5e38cdf4e73e3fe78..9f2b6045d26d038f672d4d400ef8e5d498b34e52 100644 (file)
@@ -1976,6 +1976,8 @@ void winbindd_pam_chauthtok(struct winbindd_cli_state *state)
 
        /* Setup crap */
 
+       ws_name_return( state->request.data.auth.user, WB_REPLACE_CHAR );
+
        if (!canonicalize_username(state->request.data.chauthtok.user, domain, user)) {
                set_auth_errors(&state->response, NT_STATUS_NO_SUCH_USER);
                DEBUG(5, ("winbindd_pam_chauthtok: canonicalize_username %s failed with %s"