summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-02-01 13:48:19 +0100
committerGünther Deschner <gd@samba.org>2008-02-01 16:29:20 +0100
commit99ebfd810fb725e8449fb6ef82e074fb072e27cf (patch)
tree5c0490c218e67d88564cd0b4822bdf6ec0b696d1 /source3/utils
parent3e67d648a1d164b67cf390ae33e83fc9362e3179 (diff)
downloadsamba-99ebfd810fb725e8449fb6ef82e074fb072e27cf.tar.gz
samba-99ebfd810fb725e8449fb6ef82e074fb072e27cf.tar.bz2
samba-99ebfd810fb725e8449fb6ef82e074fb072e27cf.zip
Use rpccli_samr_CreateDomAlias() in net and rpcclient.
Guenther (This used to be commit 1248ec89d2d9a400f892f828126ce4e862de642f)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_rpc.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index eb21741a95..5ed56ba1bd 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -2005,6 +2005,8 @@ static NTSTATUS rpc_alias_add_internals(const DOM_SID *domain_sid,
POLICY_HND connect_pol, domain_pol, alias_pol;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
ALIAS_INFO_CTR alias_info;
+ struct lsa_String alias_name;
+ uint32_t rid = 0;
if (argc != 1) {
d_printf("Alias name must be specified\n");
@@ -2012,6 +2014,8 @@ static NTSTATUS rpc_alias_add_internals(const DOM_SID *domain_sid,
return NT_STATUS_OK;
}
+ init_lsa_String(&alias_name, argv[0]);
+
/* Get sam policy handle */
result = rpccli_samr_connect(pipe_hnd, mem_ctx, MAXIMUM_ALLOWED_ACCESS,
@@ -2029,8 +2033,12 @@ static NTSTATUS rpc_alias_add_internals(const DOM_SID *domain_sid,
/* Create the group */
- result = rpccli_samr_create_dom_alias(pipe_hnd, mem_ctx, &domain_pol,
- argv[0], &alias_pol);
+ result = rpccli_samr_CreateDomAlias(pipe_hnd, mem_ctx,
+ &domain_pol,
+ &alias_name,
+ MAXIMUM_ALLOWED_ACCESS,
+ &alias_pol,
+ &rid);
if (!NT_STATUS_IS_OK(result)) goto done;
if (strlen(opt_comment) == 0) goto done;