diff options
author | Günther Deschner <gd@samba.org> | 2008-02-01 13:42:28 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-02-01 16:29:20 +0100 |
commit | cc1350a3532f600e5710052138f58476a0a0ae03 (patch) | |
tree | 6b0b45d5478839e0fe2e1fb154011b8807851a87 /source3/rpcclient | |
parent | 6e74a5dba33f8be671fddce367ef341c9c2fe6bc (diff) | |
download | samba-cc1350a3532f600e5710052138f58476a0a0ae03.tar.gz samba-cc1350a3532f600e5710052138f58476a0a0ae03.tar.bz2 samba-cc1350a3532f600e5710052138f58476a0a0ae03.zip |
Use rpccli_samr_CreateDomainGroup() in net and rpcclient.
Guenther
(This used to be commit 7b7b10adcaa94de3fed9b5e925eeee714ffd1c50)
Diffstat (limited to 'source3/rpcclient')
-rw-r--r-- | source3/rpcclient/cmd_samr.c | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/source3/rpcclient/cmd_samr.c b/source3/rpcclient/cmd_samr.c index 7184023082..f77a5d8891 100644 --- a/source3/rpcclient/cmd_samr.c +++ b/source3/rpcclient/cmd_samr.c @@ -1554,6 +1554,11 @@ static NTSTATUS cmd_samr_create_dom_user(struct rpc_pipe_client *cli, return result; } +static void init_lsa_String(struct lsa_String *name, const char *s) +{ + name->string = s; +} + /* Create domain group */ static NTSTATUS cmd_samr_create_dom_group(struct rpc_pipe_client *cli, @@ -1562,16 +1567,17 @@ static NTSTATUS cmd_samr_create_dom_group(struct rpc_pipe_client *cli, { POLICY_HND connect_pol, domain_pol, group_pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - const char *grp_name; + struct lsa_String grp_name; uint32 access_mask = MAXIMUM_ALLOWED_ACCESS; + uint32_t rid = 0; if ((argc < 2) || (argc > 3)) { printf("Usage: %s groupname [access mask]\n", argv[0]); return NT_STATUS_OK; } - grp_name = argv[1]; - + init_lsa_String(&grp_name, argv[1]); + if (argc > 2) sscanf(argv[2], "%x", &access_mask); @@ -1595,10 +1601,12 @@ static NTSTATUS cmd_samr_create_dom_group(struct rpc_pipe_client *cli, goto done; /* Create domain user */ - - result = rpccli_samr_create_dom_group(cli, mem_ctx, &domain_pol, - grp_name, MAXIMUM_ALLOWED_ACCESS, - &group_pol); + result = rpccli_samr_CreateDomainGroup(cli, mem_ctx, + &domain_pol, + &grp_name, + MAXIMUM_ALLOWED_ACCESS, + &group_pol, + &rid); if (!NT_STATUS_IS_OK(result)) goto done; @@ -2141,11 +2149,6 @@ static NTSTATUS cmd_samr_get_usrdom_pwinfo(struct rpc_pipe_client *cli, return result; } -static void init_lsa_String(struct lsa_String *name, const char *s) -{ - name->string = s; -} - static NTSTATUS cmd_samr_get_dom_pwinfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, int argc, const char **argv) |