[SCM] Samba Shared Repository - branch v3-3-test updated -
release-3-2-0pre2-3304-gc0fea9c
Günther Deschner
gd at samba.org
Fri Jul 18 14:47:35 GMT 2008
The branch, v3-3-test has been updated
via c0fea9c4d0d3d297972c052c17b9be6d0530e098 (commit)
via 55035d7240bd163abb155239029a03f399c8f41f (commit)
via 42c44d18eeb4d37e7c2e1209c421b3ec3a07ae28 (commit)
from b0c44d7e6cf321f84bd7b9cdb25635304bbfea81 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-3-test
- Log -----------------------------------------------------------------
commit c0fea9c4d0d3d297972c052c17b9be6d0530e098
Author: Günther Deschner <gd at samba.org>
Date: Fri Jul 18 01:11:32 2008 +0200
netapi: fix NetGroupGetInfo() against NT4.
Guenther
commit 55035d7240bd163abb155239029a03f399c8f41f
Author: Günther Deschner <gd at samba.org>
Date: Fri Jul 18 01:11:08 2008 +0200
netapi: fix NetGroupDel() against NT4.
Guenther
commit 42c44d18eeb4d37e7c2e1209c421b3ec3a07ae28
Author: Günther Deschner <gd at samba.org>
Date: Fri Jul 18 01:10:31 2008 +0200
netapi: fix NetUserAdd() against NT4.
Guenther
-----------------------------------------------------------------------
Summary of changes:
source/lib/netapi/group.c | 16 ++++++++++++++--
source/lib/netapi/user.c | 15 +++++++++++++++
2 files changed, 29 insertions(+), 2 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/lib/netapi/group.c b/source/lib/netapi/group.c
index d28e757..f856ec0 100644
--- a/source/lib/netapi/group.c
+++ b/source/lib/netapi/group.c
@@ -313,11 +313,13 @@ WERROR NetGroupDel_r(struct libnetapi_ctx *ctx,
goto done;
}
+#if 0
+ /* breaks against NT4 */
if (!(info->attributes.attributes & SE_GROUP_ENABLED)) {
werr = WERR_ACCESS_DENIED;
goto done;
}
-
+#endif
status = rpccli_samr_QueryGroupMember(pipe_cli, ctx,
&group_handle,
&rid_array);
@@ -657,6 +659,7 @@ WERROR NetGroupGetInfo_r(struct libnetapi_ctx *ctx,
struct samr_Ids rids;
struct samr_Ids types;
union samr_GroupInfo *info = NULL;
+ bool group_info_all = false;
ZERO_STRUCT(connect_handle);
ZERO_STRUCT(domain_handle);
@@ -719,13 +722,22 @@ WERROR NetGroupGetInfo_r(struct libnetapi_ctx *ctx,
&group_handle,
GROUPINFOALL2,
&info);
+ if (NT_STATUS_EQUAL(status, NT_STATUS_INVALID_INFO_CLASS)) {
+ status = rpccli_samr_QueryGroupInfo(pipe_cli, ctx,
+ &group_handle,
+ GROUPINFOALL,
+ &info);
+ group_info_all = true;
+ }
+
if (!NT_STATUS_IS_OK(status)) {
werr = ntstatus_to_werror(status);
goto done;
}
werr = map_group_info_to_buffer(ctx, r->in.level,
- &info->all2, domain_sid, rids.ids[0],
+ group_info_all ? &info->all : &info->all2,
+ domain_sid, rids.ids[0],
r->out.buf);
if (!W_ERROR_IS_OK(werr)) {
goto done;
diff --git a/source/lib/netapi/user.c b/source/lib/netapi/user.c
index 0d8065d..3827047 100644
--- a/source/lib/netapi/user.c
+++ b/source/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,
--
Samba Shared Repository
More information about the samba-cvs
mailing list