1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

Get the DOMAIN\username around the right way (I had username\domain...)

Push the unix username into utf8 for it's trip across the socket.

Andrew Bartlett
This commit is contained in:
Andrew Bartlett 0001-01-01 00:00:00 +00:00
parent 10b9976e0a
commit 3225f262b1
2 changed files with 6 additions and 4 deletions

View File

@ -382,12 +382,12 @@ enum winbindd_result winbindd_pam_auth_crap(struct winbindd_cli_state *state)
nt_domain = domain;
}
fill_domain_username(username_out, nt_username, nt_domain);
fill_domain_username(username_out, nt_domain, nt_username);
DEBUG(5, ("Setting unix username to [%s]\n", username_out));
state->response.extra_data = strdup(username_out);
if (!state->response.extra_data) {
/* this interface is in UTF8 */
if (push_utf8_allocate((char **)&state->response.extra_data, username_out) == -1) {
result = NT_STATUS_NO_MEMORY;
goto done;
}

View File

@ -305,7 +305,9 @@ static NTSTATUS contact_winbind_auth_crap(const char *username,
}
if (flags & WBFLAG_PAM_UNIX_NAME) {
*unix_name = response.extra_data;
if (pull_utf8_allocate(unix_name, (char *)response.extra_data) == -1) {
return NT_STATUS_NO_MEMORY;
}
}
return nt_status;