diff options
author | Günther Deschner <gd@samba.org> | 2008-02-01 13:48:19 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-02-01 16:29:20 +0100 |
commit | 99ebfd810fb725e8449fb6ef82e074fb072e27cf (patch) | |
tree | 5c0490c218e67d88564cd0b4822bdf6ec0b696d1 /source3/rpcclient | |
parent | 3e67d648a1d164b67cf390ae33e83fc9362e3179 (diff) | |
download | samba-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/rpcclient')
-rw-r--r-- | source3/rpcclient/cmd_samr.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/source3/rpcclient/cmd_samr.c b/source3/rpcclient/cmd_samr.c index 93aca9f15f..7184023082 100644 --- a/source3/rpcclient/cmd_samr.c +++ b/source3/rpcclient/cmd_samr.c @@ -1624,16 +1624,17 @@ static NTSTATUS cmd_samr_create_dom_alias(struct rpc_pipe_client *cli, { POLICY_HND connect_pol, domain_pol, alias_pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - const char *alias_name; + struct lsa_String alias_name; uint32 access_mask = MAXIMUM_ALLOWED_ACCESS; + uint32_t rid = 0; if ((argc < 2) || (argc > 3)) { printf("Usage: %s aliasname [access mask]\n", argv[0]); return NT_STATUS_OK; } - alias_name = argv[1]; - + init_lsa_String(&alias_name, argv[1]); + if (argc > 2) sscanf(argv[2], "%x", &access_mask); @@ -1658,8 +1659,12 @@ static NTSTATUS cmd_samr_create_dom_alias(struct rpc_pipe_client *cli, /* Create domain user */ - result = rpccli_samr_create_dom_alias(cli, mem_ctx, &domain_pol, - alias_name, &alias_pol); + result = rpccli_samr_CreateDomAlias(cli, mem_ctx, + &domain_pol, + &alias_name, + MAXIMUM_ALLOWED_ACCESS, + &alias_pol, + &rid); if (!NT_STATUS_IS_OK(result)) goto done; |