summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-07-18 01:11:32 +0200
committerGünther Deschner <gd@samba.org>2008-07-18 16:47:05 +0200
commitf09df9b1869b7d95d7399b13b79ecf1f14b02f07 (patch)
tree409f220e6ffac1c8b8b6ff6012f3cb1cbebf5b09
parent0f966cfd8a123dcc6fcbd95c209b004b2b260ba6 (diff)
downloadsamba-f09df9b1869b7d95d7399b13b79ecf1f14b02f07.tar.gz
samba-f09df9b1869b7d95d7399b13b79ecf1f14b02f07.tar.bz2
samba-f09df9b1869b7d95d7399b13b79ecf1f14b02f07.zip
netapi: fix NetGroupGetInfo() against NT4.
Guenther (This used to be commit c0fea9c4d0d3d297972c052c17b9be6d0530e098)
-rw-r--r--source3/lib/netapi/group.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/source3/lib/netapi/group.c b/source3/lib/netapi/group.c
index 6d9ed18b68..f856ec0a13 100644
--- a/source3/lib/netapi/group.c
+++ b/source3/lib/netapi/group.c
@@ -659,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);
@@ -721,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;