1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-25 06:04:04 +03:00

netapi: fix NetUserAdd() against NT4.

Guenther
This commit is contained in:
Günther Deschner 2008-07-18 01:10:31 +02:00
parent b0c44d7e6c
commit 42c44d18ee

View File

@ -241,6 +241,21 @@ WERROR NetUserAdd_r(struct libnetapi_ctx *ctx,
&user_handle,
25,
user_info);
if (NT_STATUS_EQUAL(status, NT_STATUS(DCERPC_FAULT_INVALID_TAG))) {
user_info->info23.info = info25.info;
encode_pw_buffer(user_info->info23.password.data,
info1->usri1_password, STR_UNICODE);
SamOEMhashBlob(user_info->info23.password.data, 516,
&cli->user_session_key);
status = rpccli_samr_SetUserInfo2(pipe_cli, ctx,
&user_handle,
23,
user_info);
}
} else {
user_info->info21 = info25.info;
status = rpccli_samr_SetUserInfo(pipe_cli, ctx,