diff options
author | Andreas Schneider <asn@samba.org> | 2019-01-11 13:43:24 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2019-01-28 10:29:19 +0100 |
commit | 90b338e86d0aadeabcc74ae7e4888d7a64e14633 (patch) | |
tree | 5707cf8bfec3796bced1dbf22835a8abed07be45 /source3/rpcclient | |
parent | d69fbf4150a5587b2dcdf00506279dfa27304d85 (diff) | |
download | samba-90b338e86d0aadeabcc74ae7e4888d7a64e14633.tar.gz |
s3:rpcclient: Use C99 initializer for cmd_set in cmd_samr
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Diffstat (limited to 'source3/rpcclient')
-rw-r--r-- | source3/rpcclient/cmd_samr.c | 377 |
1 files changed, 339 insertions, 38 deletions
diff --git a/source3/rpcclient/cmd_samr.c b/source3/rpcclient/cmd_samr.c index d55d1648c91..7e396f92a48 100644 --- a/source3/rpcclient/cmd_samr.c +++ b/source3/rpcclient/cmd_samr.c @@ -3369,42 +3369,343 @@ static NTSTATUS cmd_samr_get_dispinfo_idx(struct rpc_pipe_client *cli, struct cmd_set samr_commands[] = { - { "SAMR" }, - - { "queryuser", RPC_RTYPE_NTSTATUS, cmd_samr_query_user, NULL, &ndr_table_samr, NULL, "Query user info", "" }, - { "querygroup", RPC_RTYPE_NTSTATUS, cmd_samr_query_group, NULL, &ndr_table_samr, NULL, "Query group info", "" }, - { "queryusergroups", RPC_RTYPE_NTSTATUS, cmd_samr_query_usergroups, NULL, &ndr_table_samr, NULL, "Query user groups", "" }, - { "queryuseraliases", RPC_RTYPE_NTSTATUS, cmd_samr_query_useraliases, NULL, &ndr_table_samr, NULL, "Query user aliases", "" }, - { "querygroupmem", RPC_RTYPE_NTSTATUS, cmd_samr_query_groupmem, NULL, &ndr_table_samr, NULL, "Query group membership", "" }, - { "queryaliasmem", RPC_RTYPE_NTSTATUS, cmd_samr_query_aliasmem, NULL, &ndr_table_samr, NULL, "Query alias membership", "" }, - { "queryaliasinfo", RPC_RTYPE_NTSTATUS, cmd_samr_query_aliasinfo, NULL, &ndr_table_samr, NULL, "Query alias info", "" }, - { "deletealias", RPC_RTYPE_NTSTATUS, cmd_samr_delete_alias, NULL, &ndr_table_samr, NULL, "Delete an alias", "" }, - { "querydispinfo", RPC_RTYPE_NTSTATUS, cmd_samr_query_dispinfo, NULL, &ndr_table_samr, NULL, "Query display info", "" }, - { "querydispinfo2", RPC_RTYPE_NTSTATUS, cmd_samr_query_dispinfo2, NULL, &ndr_table_samr, NULL, "Query display info", "" }, - { "querydispinfo3", RPC_RTYPE_NTSTATUS, cmd_samr_query_dispinfo3, NULL, &ndr_table_samr, NULL, "Query display info", "" }, - { "querydominfo", RPC_RTYPE_NTSTATUS, cmd_samr_query_dominfo, NULL, &ndr_table_samr, NULL, "Query domain info", "" }, - { "enumdomusers", RPC_RTYPE_NTSTATUS, cmd_samr_enum_dom_users, NULL, &ndr_table_samr, NULL, "Enumerate domain users", "" }, - { "enumdomgroups", RPC_RTYPE_NTSTATUS, cmd_samr_enum_dom_groups, NULL, &ndr_table_samr, NULL, "Enumerate domain groups", "" }, - { "enumalsgroups", RPC_RTYPE_NTSTATUS, cmd_samr_enum_als_groups, NULL, &ndr_table_samr, NULL, "Enumerate alias groups", "" }, - { "enumdomains", RPC_RTYPE_NTSTATUS, cmd_samr_enum_domains, NULL, &ndr_table_samr, NULL, "Enumerate domains", "" }, - - { "createdomuser", RPC_RTYPE_NTSTATUS, cmd_samr_create_dom_user, NULL, &ndr_table_samr, NULL, "Create domain user", "" }, - { "createdomgroup", RPC_RTYPE_NTSTATUS, cmd_samr_create_dom_group, NULL, &ndr_table_samr, NULL, "Create domain group", "" }, - { "createdomalias", RPC_RTYPE_NTSTATUS, cmd_samr_create_dom_alias, NULL, &ndr_table_samr, NULL, "Create domain alias", "" }, - { "samlookupnames", RPC_RTYPE_NTSTATUS, cmd_samr_lookup_names, NULL, &ndr_table_samr, NULL, "Look up names", "" }, - { "samlookuprids", RPC_RTYPE_NTSTATUS, cmd_samr_lookup_rids, NULL, &ndr_table_samr, NULL, "Look up names", "" }, - { "deletedomgroup", RPC_RTYPE_NTSTATUS, cmd_samr_delete_dom_group, NULL, &ndr_table_samr, NULL, "Delete domain group", "" }, - { "deletedomuser", RPC_RTYPE_NTSTATUS, cmd_samr_delete_dom_user, NULL, &ndr_table_samr, NULL, "Delete domain user", "" }, - { "samquerysecobj", RPC_RTYPE_NTSTATUS, cmd_samr_query_sec_obj, NULL, &ndr_table_samr, NULL, "Query SAMR security object", "" }, - { "getdompwinfo", RPC_RTYPE_NTSTATUS, cmd_samr_get_dom_pwinfo, NULL, &ndr_table_samr, NULL, "Retrieve domain password info", "" }, - { "getusrdompwinfo", RPC_RTYPE_NTSTATUS, cmd_samr_get_usrdom_pwinfo, NULL, &ndr_table_samr, NULL, "Retrieve user domain password info", "" }, - - { "lookupdomain", RPC_RTYPE_NTSTATUS, cmd_samr_lookup_domain, NULL, &ndr_table_samr, NULL, "Lookup Domain Name", "" }, - { "chgpasswd", RPC_RTYPE_NTSTATUS, cmd_samr_chgpasswd, NULL, &ndr_table_samr, NULL, "Change user password", "" }, - { "chgpasswd2", RPC_RTYPE_NTSTATUS, cmd_samr_chgpasswd2, NULL, &ndr_table_samr, NULL, "Change user password", "" }, - { "chgpasswd3", RPC_RTYPE_NTSTATUS, cmd_samr_chgpasswd3, NULL, &ndr_table_samr, NULL, "Change user password", "" }, - { "getdispinfoidx", RPC_RTYPE_NTSTATUS, cmd_samr_get_dispinfo_idx, NULL, &ndr_table_samr, NULL, "Get Display Information Index", "" }, - { "setuserinfo", RPC_RTYPE_NTSTATUS, cmd_samr_setuserinfo, NULL, &ndr_table_samr, NULL, "Set user info", "" }, - { "setuserinfo2", RPC_RTYPE_NTSTATUS, cmd_samr_setuserinfo2, NULL, &ndr_table_samr, NULL, "Set user info2", "" }, - { NULL } + { + .name = "SAMR", + }, + + { + .name = "queryuser", + .returntype = RPC_RTYPE_NTSTATUS, + .ntfn = cmd_samr_query_user, + .wfn = NULL, + .table = &ndr_table_samr, + .rpc_pipe = NULL, + .description = "Query user info", + .usage = "", + }, + { + .name = "querygroup", + .returntype = RPC_RTYPE_NTSTATUS, + .ntfn = cmd_samr_query_group, + .wfn = NULL, + .table = &ndr_table_samr, + .rpc_pipe = NULL, + .description = "Query group info", + .usage = "", + }, + { + .name = "queryusergroups", + .returntype = RPC_RTYPE_NTSTATUS, + .ntfn = cmd_samr_query_usergroups, + .wfn = NULL, + .table = &ndr_table_samr, + .rpc_pipe = NULL, + .description = "Query user groups", + .usage = "", + }, + { + .name = "queryuseraliases", + .returntype = RPC_RTYPE_NTSTATUS, + .ntfn = cmd_samr_query_useraliases, + .wfn = NULL, + .table = &ndr_table_samr, + .rpc_pipe = NULL, + .description = "Query user aliases", + .usage = "", + }, + { + .name = "querygroupmem", + .returntype = RPC_RTYPE_NTSTATUS, + .ntfn = cmd_samr_query_groupmem, + .wfn = NULL, + .table = &ndr_table_samr, + .rpc_pipe = NULL, + .description = "Query group membership", + .usage = "", + }, + { + .name = "queryaliasmem", + .returntype = RPC_RTYPE_NTSTATUS, + .ntfn = cmd_samr_query_aliasmem, + .wfn = NULL, + .table = &ndr_table_samr, + .rpc_pipe = NULL, + .description = "Query alias membership", + .usage = "", + }, + { + .name = "queryaliasinfo", + .returntype = RPC_RTYPE_NTSTATUS, + .ntfn = cmd_samr_query_aliasinfo, + .wfn = NULL, + .table = &ndr_table_samr, + .rpc_pipe = NULL, + .description = "Query alias info", + .usage = "", + }, + { + .name = "deletealias", + .returntype = RPC_RTYPE_NTSTATUS, + .ntfn = cmd_samr_delete_alias, + .wfn = NULL, + .table = &ndr_table_samr, + .rpc_pipe = NULL, + .description = "Delete an alias", + .usage = "", + }, + { + .name = "querydispinfo", + .returntype = RPC_RTYPE_NTSTATUS, + .ntfn = cmd_samr_query_dispinfo, + .wfn = NULL, + .table = &ndr_table_samr, + .rpc_pipe = NULL, + .description = "Query display info", + .usage = "", + }, + { + .name = "querydispinfo2", + .returntype = RPC_RTYPE_NTSTATUS, + .ntfn = cmd_samr_query_dispinfo2, + .wfn = NULL, + .table = &ndr_table_samr, + .rpc_pipe = NULL, + .description = "Query display info", + .usage = "", + }, + { + .name = "querydispinfo3", + .returntype = RPC_RTYPE_NTSTATUS, + .ntfn = cmd_samr_query_dispinfo3, + .wfn = NULL, + .table = &ndr_table_samr, + .rpc_pipe = NULL, + .description = "Query display info", + .usage = "", + }, + { + .name = "querydominfo", + .returntype = RPC_RTYPE_NTSTATUS, + .ntfn = cmd_samr_query_dominfo, + .wfn = NULL, + .table = &ndr_table_samr, + .rpc_pipe = NULL, + .description = "Query domain info", + .usage = "", + }, + { + .name = "enumdomusers", + .returntype = RPC_RTYPE_NTSTATUS, + .ntfn = cmd_samr_enum_dom_users, + .wfn = NULL, + .table = &ndr_table_samr, + .rpc_pipe = NULL, + .description = "Enumerate domain users", + .usage = "", + }, + { + .name = "enumdomgroups", + .returntype = RPC_RTYPE_NTSTATUS, + .ntfn = cmd_samr_enum_dom_groups, + .wfn = NULL, + .table = &ndr_table_samr, + .rpc_pipe = NULL, + .description = "Enumerate domain groups", + .usage = "", + }, + { + .name = "enumalsgroups", + .returntype = RPC_RTYPE_NTSTATUS, + .ntfn = cmd_samr_enum_als_groups, + .wfn = NULL, + .table = &ndr_table_samr, + .rpc_pipe = NULL, + .description = "Enumerate alias groups", + .usage = "", + }, + { + .name = "enumdomains", + .returntype = RPC_RTYPE_NTSTATUS, + .ntfn = cmd_samr_enum_domains, + .wfn = NULL, + .table = &ndr_table_samr, + .rpc_pipe = NULL, + .description = "Enumerate domains", + .usage = "", + }, + + { + .name = "createdomuser", + .returntype = RPC_RTYPE_NTSTATUS, + .ntfn = cmd_samr_create_dom_user, + .wfn = NULL, + .table = &ndr_table_samr, + .rpc_pipe = NULL, + .description = "Create domain user", + .usage = "", + }, + { + .name = "createdomgroup", + .returntype = RPC_RTYPE_NTSTATUS, + .ntfn = cmd_samr_create_dom_group, + .wfn = NULL, + .table = &ndr_table_samr, + .rpc_pipe = NULL, + .description = "Create domain group", + .usage = "", + }, + { + .name = "createdomalias", + .returntype = RPC_RTYPE_NTSTATUS, + .ntfn = cmd_samr_create_dom_alias, + .wfn = NULL, + .table = &ndr_table_samr, + .rpc_pipe = NULL, + .description = "Create domain alias", + .usage = "", + }, + { + .name = "samlookupnames", + .returntype = RPC_RTYPE_NTSTATUS, + .ntfn = cmd_samr_lookup_names, + .wfn = NULL, + .table = &ndr_table_samr, + .rpc_pipe = NULL, + .description = "Look up names", + .usage = "", + }, + { + .name = "samlookuprids", + .returntype = RPC_RTYPE_NTSTATUS, + .ntfn = cmd_samr_lookup_rids, + .wfn = NULL, + .table = &ndr_table_samr, + .rpc_pipe = NULL, + .description = "Look up names", + .usage = "", + }, + { + .name = "deletedomgroup", + .returntype = RPC_RTYPE_NTSTATUS, + .ntfn = cmd_samr_delete_dom_group, + .wfn = NULL, + .table = &ndr_table_samr, + .rpc_pipe = NULL, + .description = "Delete domain group", + .usage = "", + }, + { + .name = "deletedomuser", + .returntype = RPC_RTYPE_NTSTATUS, + .ntfn = cmd_samr_delete_dom_user, + .wfn = NULL, + .table = &ndr_table_samr, + .rpc_pipe = NULL, + .description = "Delete domain user", + .usage = "", + }, + { + .name = "samquerysecobj", + .returntype = RPC_RTYPE_NTSTATUS, + .ntfn = cmd_samr_query_sec_obj, + .wfn = NULL, + .table = &ndr_table_samr, + .rpc_pipe = NULL, + .description = "Query SAMR security object", + .usage = "", + }, + { + .name = "getdompwinfo", + .returntype = RPC_RTYPE_NTSTATUS, + .ntfn = cmd_samr_get_dom_pwinfo, + .wfn = NULL, + .table = &ndr_table_samr, + .rpc_pipe = NULL, + .description = "Retrieve domain password info", + .usage = "", + }, + { + .name = "getusrdompwinfo", + .returntype = RPC_RTYPE_NTSTATUS, + .ntfn = cmd_samr_get_usrdom_pwinfo, + .wfn = NULL, + .table = &ndr_table_samr, + .rpc_pipe = NULL, + .description = "Retrieve user domain password info", + .usage = "", + }, + + { + .name = "lookupdomain", + .returntype = RPC_RTYPE_NTSTATUS, + .ntfn = cmd_samr_lookup_domain, + .wfn = NULL, + .table = &ndr_table_samr, + .rpc_pipe = NULL, + .description = "Lookup Domain Name", + .usage = "", + }, + { + .name = "chgpasswd", + .returntype = RPC_RTYPE_NTSTATUS, + .ntfn = cmd_samr_chgpasswd, + .wfn = NULL, + .table = &ndr_table_samr, + .rpc_pipe = NULL, + .description = "Change user password", + .usage = "", + }, + { + .name = "chgpasswd2", + .returntype = RPC_RTYPE_NTSTATUS, + .ntfn = cmd_samr_chgpasswd2, + .wfn = NULL, + .table = &ndr_table_samr, + .rpc_pipe = NULL, + .description = "Change user password", + .usage = "", + }, + { + .name = "chgpasswd3", + .returntype = RPC_RTYPE_NTSTATUS, + .ntfn = cmd_samr_chgpasswd3, + .wfn = NULL, + .table = &ndr_table_samr, + .rpc_pipe = NULL, + .description = "Change user password", + .usage = "", + }, + { + .name = "getdispinfoidx", + .returntype = RPC_RTYPE_NTSTATUS, + .ntfn = cmd_samr_get_dispinfo_idx, + .wfn = NULL, + .table = &ndr_table_samr, + .rpc_pipe = NULL, + .description = "Get Display Information Index", + .usage = "", + }, + { + .name = "setuserinfo", + .returntype = RPC_RTYPE_NTSTATUS, + .ntfn = cmd_samr_setuserinfo, + .wfn = NULL, + .table = &ndr_table_samr, + .rpc_pipe = NULL, + .description = "Set user info", + .usage = "", + }, + { + .name = "setuserinfo2", + .returntype = RPC_RTYPE_NTSTATUS, + .ntfn = cmd_samr_setuserinfo2, + .wfn = NULL, + .table = &ndr_table_samr, + .rpc_pipe = NULL, + .description = "Set user info2", + .usage = "", + }, + { + .name = NULL, + }, }; |