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;
}
}
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;