summaryrefslogtreecommitdiff
path: root/source3/lib/netapi
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-07-18 01:10:31 +0200
committerGünther Deschner <gd@samba.org>2008-07-18 16:46:46 +0200
commitd711db5811ccd8a56df5600770689b3c8fbc00e1 (patch)
tree29e049602b62bbc4279a20530d9ddbd53ca7c7e8 /source3/lib/netapi
parenta5e1a7a9f706a7173168b1e6466212c4b2c3e3e7 (diff)
downloadsamba-d711db5811ccd8a56df5600770689b3c8fbc00e1.tar.gz
samba-d711db5811ccd8a56df5600770689b3c8fbc00e1.tar.bz2
samba-d711db5811ccd8a56df5600770689b3c8fbc00e1.zip
netapi: fix NetUserAdd() against NT4.
Guenther (This used to be commit 42c44d18eeb4d37e7c2e1209c421b3ec3a07ae28)
Diffstat (limited to 'source3/lib/netapi')
-rw-r--r--source3/lib/netapi/user.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source3/lib/netapi/user.c b/source3/lib/netapi/user.c
index 0d8065dd7f..382704769d 100644
--- a/source3/lib/netapi/user.c
+++ b/source3/lib/netapi/user.c
@@ -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,