diff options
author | Günther Deschner <gd@samba.org> | 2008-02-06 13:06:31 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-02-07 11:03:35 +0100 |
commit | 1500538ae816eedd0d31f6597db71f6410bfad91 (patch) | |
tree | 482ff30091e180b5950707b346c9029efad35b87 /source3 | |
parent | cdb5f49849270b2e1f687fd5cfcbc1461dfd2672 (diff) | |
download | samba-1500538ae816eedd0d31f6597db71f6410bfad91.tar.gz samba-1500538ae816eedd0d31f6597db71f6410bfad91.tar.bz2 samba-1500538ae816eedd0d31f6597db71f6410bfad91.zip |
Use rpccli_samr_SetGroupInfo() in net.
Guenther
(This used to be commit 5909e9f97179b125202c323a256add20c3db9e5f)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/utils/net_rpc.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index 68a8411b7c..560125b162 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -1983,7 +1983,7 @@ 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; + union samr_GroupInfo group_info; struct lsa_String grp_name; uint32_t rid = 0; @@ -2026,10 +2026,12 @@ static NTSTATUS rpc_group_add_internals(const DOM_SID *domain_sid, /* We've got a comment to set */ - group_info.switch_value1 = 4; - init_samr_group_info4(&group_info.group.info4, opt_comment); + init_lsa_String(&group_info.description, opt_comment); - result = rpccli_samr_set_groupinfo(pipe_hnd, mem_ctx, &group_pol, &group_info); + result = rpccli_samr_SetGroupInfo(pipe_hnd, mem_ctx, + &group_pol, + 4, + &group_info); if (!NT_STATUS_IS_OK(result)) goto done; done: @@ -3076,7 +3078,7 @@ static NTSTATUS rpc_group_rename_internals(const DOM_SID *domain_sid, NTSTATUS result; POLICY_HND connect_pol, domain_pol, group_pol; uint32 num_rids, *rids, *rid_types; - GROUP_INFO_CTR ctr; + union samr_GroupInfo group_info; if (argc != 2) { d_printf("Usage: 'net rpc group rename group newname'\n"); @@ -3126,12 +3128,12 @@ static NTSTATUS rpc_group_rename_internals(const DOM_SID *domain_sid, if (!NT_STATUS_IS_OK(result)) return result; - ZERO_STRUCT(ctr); - - ctr.switch_value1 = 2; - init_samr_group_info2(&ctr.group.info2, argv[1]); + init_lsa_String(&group_info.name, argv[1]); - result = rpccli_samr_set_groupinfo(pipe_hnd, mem_ctx, &group_pol, &ctr); + result = rpccli_samr_SetGroupInfo(pipe_hnd, mem_ctx, + &group_pol, + 2, + &group_info); if (!NT_STATUS_IS_OK(result)) return result; |