diff options
author | Günther Deschner <gd@samba.org> | 2008-07-18 15:01:21 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-07-18 17:23:12 +0200 |
commit | 3e5dabc9687f8af8d1938b6a7c8472edff7ecbbb (patch) | |
tree | ce037adae28e1f0c4ed55f0dc7dc911a60a95230 /source3/lib | |
parent | 10534fe878a1de3a41838ace8b796fee179913f4 (diff) | |
download | samba-3e5dabc9687f8af8d1938b6a7c8472edff7ecbbb.tar.gz samba-3e5dabc9687f8af8d1938b6a7c8472edff7ecbbb.tar.bz2 samba-3e5dabc9687f8af8d1938b6a7c8472edff7ecbbb.zip |
netapi: add libnetapi_samr_open_alias_queryinfo.
Guenther
(This used to be commit 401d6ce210817d9ab6915ed838e1495ae220559a)
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/netapi/localgroup.c | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/source3/lib/netapi/localgroup.c b/source3/lib/netapi/localgroup.c index d3a9aa1270..9237c2bdf4 100644 --- a/source3/lib/netapi/localgroup.c +++ b/source3/lib/netapi/localgroup.c @@ -73,6 +73,50 @@ static WERROR libnetapi_samr_lookup_and_open_alias(TALLOC_CTX *mem_ctx, /**************************************************************** ****************************************************************/ +static NTSTATUS libnetapi_samr_open_alias_queryinfo(TALLOC_CTX *mem_ctx, + struct rpc_pipe_client *pipe_cli, + struct policy_handle *handle, + uint32_t rid, + uint32_t access_rights, + enum samr_AliasInfoEnum level, + union samr_AliasInfo **alias_info) +{ + NTSTATUS status; + struct policy_handle alias_handle; + union samr_AliasInfo *_alias_info = NULL; + + ZERO_STRUCT(alias_handle); + + status = rpccli_samr_OpenAlias(pipe_cli, mem_ctx, + handle, + access_rights, + rid, + &alias_handle); + if (!NT_STATUS_IS_OK(status)) { + goto done; + } + + status = rpccli_samr_QueryAliasInfo(pipe_cli, mem_ctx, + &alias_handle, + level, + &_alias_info); + if (!NT_STATUS_IS_OK(status)) { + goto done; + } + + *alias_info = _alias_info; + + done: + if (is_valid_policy_hnd(&alias_handle)) { + rpccli_samr_Close(pipe_cli, mem_ctx, &alias_handle); + } + + return status; +} + +/**************************************************************** +****************************************************************/ + WERROR NetLocalGroupAdd_r(struct libnetapi_ctx *ctx, struct NetLocalGroupAdd *r) { |