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/utils/net_rpc.c | |
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/utils/net_rpc.c')
-rw-r--r-- | source3/utils/net_rpc.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index 5ed56ba1bd..50f3310d96 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -1935,6 +1935,11 @@ static int rpc_group_delete(int argc, const char **argv) argc,argv); } +static void init_lsa_String(struct lsa_String *name, const char *s) +{ + name->string = s; +} + static NTSTATUS rpc_group_add_internals(const DOM_SID *domain_sid, const char *domain_name, struct cli_state *cli, @@ -1946,6 +1951,8 @@ static NTSTATUS rpc_group_add_internals(const DOM_SID *domain_sid, POLICY_HND connect_pol, domain_pol, group_pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; GROUP_INFO_CTR group_info; + struct lsa_String grp_name; + uint32_t rid = 0; if (argc != 1) { d_printf("Group name must be specified\n"); @@ -1953,6 +1960,8 @@ static NTSTATUS rpc_group_add_internals(const DOM_SID *domain_sid, return NT_STATUS_OK; } + init_lsa_String(&grp_name, argv[0]); + /* Get sam policy handle */ result = rpccli_samr_connect(pipe_hnd, mem_ctx, MAXIMUM_ALLOWED_ACCESS, @@ -1970,9 +1979,12 @@ static NTSTATUS rpc_group_add_internals(const DOM_SID *domain_sid, /* Create the group */ - result = rpccli_samr_create_dom_group(pipe_hnd, mem_ctx, &domain_pol, - argv[0], MAXIMUM_ALLOWED_ACCESS, - &group_pol); + result = rpccli_samr_CreateDomainGroup(pipe_hnd, mem_ctx, + &domain_pol, + &grp_name, + MAXIMUM_ALLOWED_ACCESS, + &group_pol, + &rid); if (!NT_STATUS_IS_OK(result)) goto done; if (strlen(opt_comment) == 0) goto done; |