From 39c344a27fbe1a66281aa36e49e4049286cea0f0 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 18 Jul 2008 20:10:37 +0200 Subject: netapi: fix NetLocalGroupAdd. Guenther (This used to be commit d4594a7a03381fb251c9f8caf4c70e1ed97674b6) --- source3/lib/netapi/localgroup.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'source3/lib/netapi') diff --git a/source3/lib/netapi/localgroup.c b/source3/lib/netapi/localgroup.c index fe36d86b05..57067621b7 100644 --- a/source3/lib/netapi/localgroup.c +++ b/source3/lib/netapi/localgroup.c @@ -209,6 +209,8 @@ WERROR NetLocalGroupAdd_r(struct libnetapi_ctx *ctx, goto done; } + init_lsa_String(&lsa_account_name, alias_name); + status = rpccli_samr_CreateDomAlias(pipe_cli, ctx, &domain_handle, &lsa_account_name, @@ -786,6 +788,13 @@ WERROR NetLocalGroupEnum_r(struct libnetapi_ctx *ctx, return WERR_UNKNOWN_LEVEL; } + if (r->out.total_entries) { + *r->out.total_entries = 0; + } + if (r->out.entries_read) { + *r->out.entries_read = 0; + } + ZERO_STRUCT(connect_handle); ZERO_STRUCT(builtin_handle); ZERO_STRUCT(domain_handle); @@ -836,6 +845,10 @@ WERROR NetLocalGroupEnum_r(struct libnetapi_ctx *ctx, goto done; } + if (r->out.total_entries) { + *r->out.total_entries += builtin_info->info2.num_aliases; + } + status = rpccli_samr_QueryDomainInfo(pipe_cli, ctx, &domain_handle, 2, @@ -845,6 +858,10 @@ WERROR NetLocalGroupEnum_r(struct libnetapi_ctx *ctx, goto done; } + if (r->out.total_entries) { + *r->out.total_entries += domain_info->info2.num_aliases; + } + status = rpccli_samr_EnumDomainAliases(pipe_cli, ctx, &builtin_handle, r->in.resume_handle, -- cgit