diff options
author | Tim Potter <tpot@samba.org> | 2003-02-25 23:51:56 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2003-02-25 23:51:56 +0000 |
commit | 1788f806e7655aa37cff22eaa6f3f424fb779274 (patch) | |
tree | 16c744459ddde80a0ec131ecb0bdcee586dfb9c6 /source3/rpcclient | |
parent | f5394078d974a938c6e619ec6f2d565c028d6cf1 (diff) | |
download | samba-1788f806e7655aa37cff22eaa6f3f424fb779274.tar.gz samba-1788f806e7655aa37cff22eaa6f3f424fb779274.tar.xz samba-1788f806e7655aa37cff22eaa6f3f424fb779274.zip |
Merge: const fixes.
(This used to be commit a20aba09996e470425a151271237f2d48a8302af)
Diffstat (limited to 'source3/rpcclient')
-rw-r--r-- | source3/rpcclient/cmd_dfs.c | 16 | ||||
-rw-r--r-- | source3/rpcclient/cmd_ds.c | 2 | ||||
-rw-r--r-- | source3/rpcclient/cmd_lsarpc.c | 28 | ||||
-rw-r--r-- | source3/rpcclient/cmd_netlogon.c | 12 | ||||
-rw-r--r-- | source3/rpcclient/cmd_reg.c | 4 | ||||
-rw-r--r-- | source3/rpcclient/cmd_samr.c | 36 | ||||
-rw-r--r-- | source3/rpcclient/cmd_spoolss.c | 75 | ||||
-rw-r--r-- | source3/rpcclient/cmd_srvsvc.c | 8 | ||||
-rw-r--r-- | source3/rpcclient/rpcclient.h | 4 |
9 files changed, 97 insertions, 88 deletions
diff --git a/source3/rpcclient/cmd_dfs.c b/source3/rpcclient/cmd_dfs.c index e3c4b77645d..715174c8245 100644 --- a/source3/rpcclient/cmd_dfs.c +++ b/source3/rpcclient/cmd_dfs.c @@ -25,7 +25,7 @@ /* Check DFS is supported by the remote server */ static NTSTATUS cmd_dfs_exist(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { BOOL dfs_exists; NTSTATUS result; @@ -44,10 +44,10 @@ static NTSTATUS cmd_dfs_exist(struct cli_state *cli, TALLOC_CTX *mem_ctx, } static NTSTATUS cmd_dfs_add(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { NTSTATUS result; - char *entrypath, *servername, *sharename, *comment; + const char *entrypath, *servername, *sharename, *comment; uint32 flags = 0; if (argc != 5) { @@ -68,10 +68,10 @@ static NTSTATUS cmd_dfs_add(struct cli_state *cli, TALLOC_CTX *mem_ctx, } static NTSTATUS cmd_dfs_remove(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { NTSTATUS result; - char *entrypath, *servername, *sharename; + const char *entrypath, *servername, *sharename; if (argc != 4) { printf("Usage: %s entrypath servername sharename\n", argv[0]); @@ -169,7 +169,7 @@ static void display_dfs_info_ctr(DFS_INFO_CTR *ctr) /* Enumerate dfs shares */ static NTSTATUS cmd_dfs_enum(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { DFS_INFO_CTR ctr; NTSTATUS result; @@ -192,10 +192,10 @@ static NTSTATUS cmd_dfs_enum(struct cli_state *cli, TALLOC_CTX *mem_ctx, } static NTSTATUS cmd_dfs_getinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { NTSTATUS result; - char *entrypath, *servername, *sharename; + const char *entrypath, *servername, *sharename; uint32 info_level = 1; DFS_INFO_CTR ctr; diff --git a/source3/rpcclient/cmd_ds.c b/source3/rpcclient/cmd_ds.c index 946015c1e31..9de6d6a9ec9 100644 --- a/source3/rpcclient/cmd_ds.c +++ b/source3/rpcclient/cmd_ds.c @@ -26,7 +26,7 @@ static NTSTATUS cmd_ds_dsrole_getprimarydominfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, - char **argv) + const char **argv) { NTSTATUS result; DS_DOMINFO_CTR ctr; diff --git a/source3/rpcclient/cmd_lsarpc.c b/source3/rpcclient/cmd_lsarpc.c index 57ec09ef63f..6053dec7920 100644 --- a/source3/rpcclient/cmd_lsarpc.c +++ b/source3/rpcclient/cmd_lsarpc.c @@ -64,7 +64,7 @@ done: static NTSTATUS cmd_lsa_query_info_policy(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, - char **argv) + const char **argv) { POLICY_HND pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; @@ -134,7 +134,7 @@ static NTSTATUS cmd_lsa_query_info_policy(struct cli_state *cli, static NTSTATUS cmd_lsa_lookup_names(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, - char **argv) + const char **argv) { POLICY_HND pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; @@ -179,7 +179,7 @@ static NTSTATUS cmd_lsa_lookup_names(struct cli_state *cli, /* Resolve a list of SIDs to a list of names */ static NTSTATUS cmd_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { POLICY_HND pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; @@ -246,7 +246,7 @@ static NTSTATUS cmd_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx, static NTSTATUS cmd_lsa_enum_trust_dom(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, - char **argv) + const char **argv) { POLICY_HND pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; @@ -300,8 +300,8 @@ static NTSTATUS cmd_lsa_enum_trust_dom(struct cli_state *cli, /* Enumerates privileges */ static NTSTATUS cmd_lsa_enum_privilege(struct cli_state *cli, - TALLOC_CTX *mem_ctx, int argc, - char **argv) + TALLOC_CTX *mem_ctx, int argc, + const char **argv) { POLICY_HND pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; @@ -354,7 +354,7 @@ static NTSTATUS cmd_lsa_enum_privilege(struct cli_state *cli, static NTSTATUS cmd_lsa_get_dispname(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, - char **argv) + const char **argv) { POLICY_HND pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; @@ -391,8 +391,8 @@ static NTSTATUS cmd_lsa_get_dispname(struct cli_state *cli, /* Enumerate the LSA SIDS */ static NTSTATUS cmd_lsa_enum_sids(struct cli_state *cli, - TALLOC_CTX *mem_ctx, int argc, - char **argv) + TALLOC_CTX *mem_ctx, int argc, + const char **argv) { POLICY_HND pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; @@ -445,7 +445,7 @@ static NTSTATUS cmd_lsa_enum_sids(struct cli_state *cli, static NTSTATUS cmd_lsa_enum_privsaccounts(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, - char **argv) + const char **argv) { POLICY_HND dom_pol; POLICY_HND user_pol; @@ -500,7 +500,7 @@ static NTSTATUS cmd_lsa_enum_privsaccounts(struct cli_state *cli, static NTSTATUS cmd_lsa_enum_acct_rights(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, - char **argv) + const char **argv) { POLICY_HND dom_pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; @@ -622,8 +622,8 @@ static NTSTATUS cmd_lsa_remove_acct_rights(struct cli_state *cli, /* Get a privilege value given its name */ static NTSTATUS cmd_lsa_lookupprivvalue(struct cli_state *cli, - TALLOC_CTX *mem_ctx, int argc, - char **argv) + TALLOC_CTX *mem_ctx, int argc, + const char **argv) { POLICY_HND pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; @@ -658,7 +658,7 @@ static NTSTATUS cmd_lsa_lookupprivvalue(struct cli_state *cli, static NTSTATUS cmd_lsa_query_secobj(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, - char **argv) + const char **argv) { POLICY_HND pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; diff --git a/source3/rpcclient/cmd_netlogon.c b/source3/rpcclient/cmd_netlogon.c index 53a926d52bd..407bff3735f 100644 --- a/source3/rpcclient/cmd_netlogon.c +++ b/source3/rpcclient/cmd_netlogon.c @@ -24,7 +24,7 @@ static NTSTATUS cmd_netlogon_logon_ctrl2(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, - char **argv) + const char **argv) { uint32 query_level = 1; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; @@ -47,7 +47,7 @@ static NTSTATUS cmd_netlogon_logon_ctrl2(struct cli_state *cli, static NTSTATUS cmd_netlogon_logon_ctrl(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, - char **argv) + const char **argv) { #if 0 uint32 query_level = 1; @@ -143,7 +143,7 @@ static void display_sam_sync(uint32 num_deltas, SAM_DELTA_HDR *hdr_deltas, static NTSTATUS cmd_netlogon_sam_sync(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, - char **argv) + const char **argv) { NTSTATUS result = NT_STATUS_UNSUCCESSFUL; unsigned char trust_passwd[16]; @@ -204,7 +204,7 @@ static NTSTATUS cmd_netlogon_sam_sync(struct cli_state *cli, static NTSTATUS cmd_netlogon_sam_deltas(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, - char **argv) + const char **argv) { NTSTATUS result = NT_STATUS_UNSUCCESSFUL; unsigned char trust_passwd[16]; @@ -266,12 +266,12 @@ static NTSTATUS cmd_netlogon_sam_deltas(struct cli_state *cli, static NTSTATUS cmd_netlogon_sam_logon(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, - char **argv) + const char **argv) { unsigned char trust_passwd[16]; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; int logon_type = NET_LOGON_TYPE; - char *username, *password; + const char *username, *password; uint32 neg_flags = 0x000001ff; int auth_level = 2; diff --git a/source3/rpcclient/cmd_reg.c b/source3/rpcclient/cmd_reg.c index 5d29b4c51ab..19c0e7f71f0 100644 --- a/source3/rpcclient/cmd_reg.c +++ b/source3/rpcclient/cmd_reg.c @@ -895,7 +895,7 @@ static void cmd_reg_get_key_sec(struct client_info *info) nt registry shutdown ****************************************************************************/ static NTSTATUS cmd_reg_shutdown(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { NTSTATUS result = NT_STATUS_UNSUCCESSFUL; fstring msg; @@ -950,7 +950,7 @@ abort a shutdown ****************************************************************************/ static NTSTATUS cmd_reg_abort_shutdown(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, - char **argv) + const char **argv) { NTSTATUS result = NT_STATUS_UNSUCCESSFUL; diff --git a/source3/rpcclient/cmd_samr.c b/source3/rpcclient/cmd_samr.c index 9e8d105c46e..6ca33e19e70 100644 --- a/source3/rpcclient/cmd_samr.c +++ b/source3/rpcclient/cmd_samr.c @@ -264,7 +264,7 @@ static NTSTATUS try_samr_connects(struct cli_state *cli, TALLOC_CTX *mem_ctx, */ static NTSTATUS cmd_samr_query_user(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { POLICY_HND connect_pol, domain_pol, user_pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; @@ -373,7 +373,7 @@ static void display_group_info_ctr(GROUP_INFO_CTR *ctr) */ static NTSTATUS cmd_samr_query_group(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { POLICY_HND connect_pol, domain_pol, group_pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; @@ -435,7 +435,7 @@ done: static NTSTATUS cmd_samr_query_usergroups(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { POLICY_HND connect_pol, domain_pol, @@ -499,8 +499,8 @@ static NTSTATUS cmd_samr_query_usergroups(struct cli_state *cli, /* Query aliases a user is a member of */ static NTSTATUS cmd_samr_query_useraliases(struct cli_state *cli, - TALLOC_CTX *mem_ctx, - int argc, char **argv) + TALLOC_CTX *mem_ctx, + int argc, const char **argv) { POLICY_HND connect_pol, domain_pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; @@ -568,7 +568,7 @@ static NTSTATUS cmd_samr_query_useraliases(struct cli_state *cli, static NTSTATUS cmd_samr_query_groupmem(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { POLICY_HND connect_pol, domain_pol, group_pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; @@ -630,7 +630,7 @@ static NTSTATUS cmd_samr_query_groupmem(struct cli_state *cli, static NTSTATUS cmd_samr_enum_dom_groups(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { POLICY_HND connect_pol, domain_pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; @@ -703,7 +703,7 @@ static NTSTATUS cmd_samr_enum_dom_groups(struct cli_state *cli, static NTSTATUS cmd_samr_enum_als_groups(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { POLICY_HND connect_pol, domain_pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; @@ -785,7 +785,7 @@ static NTSTATUS cmd_samr_enum_als_groups(struct cli_state *cli, static NTSTATUS cmd_samr_query_aliasmem(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { POLICY_HND connect_pol, domain_pol, alias_pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; @@ -859,7 +859,7 @@ static NTSTATUS cmd_samr_query_aliasmem(struct cli_state *cli, static NTSTATUS cmd_samr_query_dispinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { POLICY_HND connect_pol, domain_pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; @@ -993,7 +993,7 @@ static NTSTATUS cmd_samr_query_dispinfo(struct cli_state *cli, static NTSTATUS cmd_samr_query_dominfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { POLICY_HND connect_pol, domain_pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; @@ -1063,11 +1063,11 @@ static NTSTATUS cmd_samr_query_dominfo(struct cli_state *cli, static NTSTATUS cmd_samr_create_dom_user(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { POLICY_HND connect_pol, domain_pol, user_pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - char *acct_name; + const char *acct_name; uint16 acb_info; uint32 unknown, user_rid; uint32 access_mask = MAXIMUM_ALLOWED_ACCESS; @@ -1119,7 +1119,7 @@ static NTSTATUS cmd_samr_create_dom_user(struct cli_state *cli, static NTSTATUS cmd_samr_lookup_names(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { NTSTATUS result = NT_STATUS_UNSUCCESSFUL; POLICY_HND connect_pol, domain_pol; @@ -1189,7 +1189,7 @@ static NTSTATUS cmd_samr_lookup_names(struct cli_state *cli, static NTSTATUS cmd_samr_lookup_rids(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { NTSTATUS result = NT_STATUS_UNSUCCESSFUL; POLICY_HND connect_pol, domain_pol; @@ -1246,7 +1246,7 @@ static NTSTATUS cmd_samr_lookup_rids(struct cli_state *cli, static NTSTATUS cmd_samr_delete_dom_user(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { NTSTATUS result = NT_STATUS_UNSUCCESSFUL; POLICY_HND connect_pol, domain_pol, user_pol; @@ -1315,7 +1315,7 @@ static NTSTATUS cmd_samr_delete_dom_user(struct cli_state *cli, */ static NTSTATUS cmd_samr_query_sec_obj(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { POLICY_HND connect_pol, domain_pol, user_pol, *pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; @@ -1392,7 +1392,7 @@ done: static NTSTATUS cmd_samr_get_dom_pwinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { NTSTATUS result = NT_STATUS_UNSUCCESSFUL; uint16 unk_0, unk_1, unk_2; diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c index 0ec94c99795..9f6f539e190 100644 --- a/source3/rpcclient/cmd_spoolss.c +++ b/source3/rpcclient/cmd_spoolss.c @@ -41,6 +41,15 @@ static const struct table_node archi_table[]= { {NULL, "", -1 } }; +/** + * @file + * + * rpcclient module for SPOOLSS rpc pipe. + * + * This generally just parses and checks command lines, and then calls + * a cli_spoolss function. + **/ + /**************************************************************************** function to do the mapping between the long architecture name and the short one. @@ -77,7 +86,7 @@ BOOL get_short_archi(char *short_archi, const char *long_archi) */ static NTSTATUS cmd_spoolss_not_implemented(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { printf ("(*) This command is not currently implemented.\n"); return NT_STATUS_OK; @@ -89,7 +98,7 @@ static NTSTATUS cmd_spoolss_not_implemented(struct cli_state *cli, */ static NTSTATUS cmd_spoolss_open_printer_ex(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { WERROR werror; fstring printername; @@ -291,7 +300,7 @@ static void display_print_info_3(PRINTER_INFO_3 *i3) static NTSTATUS cmd_spoolss_enum_printers(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { WERROR result; uint32 info_level = 1; @@ -396,7 +405,7 @@ static void display_port_info_2(PORT_INFO_2 *i2) static NTSTATUS cmd_spoolss_enum_ports(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, - char **argv) + const char **argv) { WERROR result; uint32 needed, info_level = 1; @@ -448,7 +457,7 @@ static NTSTATUS cmd_spoolss_enum_ports(struct cli_state *cli, */ static NTSTATUS cmd_spoolss_setprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { POLICY_HND pol; WERROR result; @@ -518,7 +527,7 @@ static NTSTATUS cmd_spoolss_setprinter(struct cli_state *cli, */ static NTSTATUS cmd_spoolss_getprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { POLICY_HND pol; WERROR result; @@ -637,7 +646,7 @@ static void display_reg_value(REGISTRY_VALUE value) */ static NTSTATUS cmd_spoolss_getprinterdata(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { POLICY_HND pol; WERROR result; @@ -646,7 +655,7 @@ static NTSTATUS cmd_spoolss_getprinterdata(struct cli_state *cli, servername, user; uint32 needed; - char *valuename; + const char *valuename; REGISTRY_VALUE value; if (argc != 3) { @@ -681,7 +690,7 @@ static NTSTATUS cmd_spoolss_getprinterdata(struct cli_state *cli, /* Get printer info */ result = cli_spoolss_getprinterdata(cli, mem_ctx, 0, &needed, - &pol, valuename, &value); + &pol, valuename, &value); if (W_ERROR_V(result) == ERRmoredata) result = cli_spoolss_getprinterdata( @@ -708,7 +717,7 @@ static NTSTATUS cmd_spoolss_getprinterdata(struct cli_state *cli, */ static NTSTATUS cmd_spoolss_getprinterdataex(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { POLICY_HND pol; WERROR result; @@ -717,7 +726,7 @@ static NTSTATUS cmd_spoolss_getprinterdataex(struct cli_state *cli, servername, user; uint32 needed; - char *valuename, *keyname; + const char *valuename, *keyname; REGISTRY_VALUE value; if (argc != 4) { @@ -893,7 +902,7 @@ static void display_print_driver_3(DRIVER_INFO_3 *i1) */ static NTSTATUS cmd_spoolss_getdriver(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { POLICY_HND pol; WERROR werror; @@ -983,7 +992,7 @@ static NTSTATUS cmd_spoolss_getdriver(struct cli_state *cli, */ static NTSTATUS cmd_spoolss_enum_drivers(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { WERROR werror; uint32 info_level = 1; @@ -1071,7 +1080,7 @@ static void display_printdriverdir_1(DRIVER_DIRECTORY_1 *i1) */ static NTSTATUS cmd_spoolss_getdriverdir(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { WERROR result; fstring env; @@ -1136,7 +1145,7 @@ void set_drv_info_3_env (DRIVER_INFO_3 *info, const char *arch) wrapper for strtok to get the next parameter from a delimited list. Needed to handle the empty parameter string denoted by "NULL" *************************************************************************/ -static char* get_driver_3_param (char* str, const char* delim, UNISTR* dest) +static char* get_driver_3_param (const char* str, const char* delim, UNISTR* dest) { char *ptr; @@ -1166,7 +1175,7 @@ static char* get_driver_3_param (char* str, const char* delim, UNISTR* dest) static BOOL init_drv_info_3_members ( TALLOC_CTX *mem_ctx, DRIVER_INFO_3 *info, - char *args + const char *args ) { char *str, *str2; @@ -1215,7 +1224,7 @@ static BOOL init_drv_info_3_members ( static NTSTATUS cmd_spoolss_addprinterdriver(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { WERROR result; uint32 level = 3; @@ -1268,7 +1277,7 @@ static NTSTATUS cmd_spoolss_addprinterdriver(struct cli_state *cli, static NTSTATUS cmd_spoolss_addprinterex(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { WERROR result; uint32 level = 2; @@ -1325,7 +1334,7 @@ static NTSTATUS cmd_spoolss_addprinterex(struct cli_state *cli, static NTSTATUS cmd_spoolss_setdriver(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { POLICY_HND pol; WERROR result; @@ -1403,7 +1412,7 @@ done: static NTSTATUS cmd_spoolss_deletedriver(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { WERROR result; fstring servername; @@ -1445,7 +1454,7 @@ static NTSTATUS cmd_spoolss_deletedriver(struct cli_state *cli, static NTSTATUS cmd_spoolss_getprintprocdir(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { WERROR result; char *servername = NULL, *environment = NULL; @@ -1488,7 +1497,7 @@ static NTSTATUS cmd_spoolss_getprintprocdir(struct cli_state *cli, /* Add a form */ static NTSTATUS cmd_spoolss_addform(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { POLICY_HND handle; WERROR werror; @@ -1547,7 +1556,7 @@ static NTSTATUS cmd_spoolss_addform(struct cli_state *cli, TALLOC_CTX *mem_ctx, /* Set a form */ static NTSTATUS cmd_spoolss_setform(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { POLICY_HND handle; WERROR werror; @@ -1605,7 +1614,7 @@ static NTSTATUS cmd_spoolss_setform(struct cli_state *cli, TALLOC_CTX *mem_ctx, /* Get a form */ static NTSTATUS cmd_spoolss_getform(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { POLICY_HND handle; WERROR werror; @@ -1669,7 +1678,7 @@ static NTSTATUS cmd_spoolss_getform(struct cli_state *cli, TALLOC_CTX *mem_ctx, static NTSTATUS cmd_spoolss_deleteform(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, - char **argv) + const char **argv) { POLICY_HND handle; WERROR werror; @@ -1716,7 +1725,7 @@ static NTSTATUS cmd_spoolss_deleteform(struct cli_state *cli, static NTSTATUS cmd_spoolss_enum_forms(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, - char **argv) + const char **argv) { POLICY_HND handle; WERROR werror; @@ -1784,7 +1793,7 @@ static NTSTATUS cmd_spoolss_enum_forms(struct cli_state *cli, static NTSTATUS cmd_spoolss_setprinterdata(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { WERROR result; uint32 needed; @@ -1903,7 +1912,7 @@ static void display_job_info_2(JOB_INFO_2 *job) static NTSTATUS cmd_spoolss_enum_jobs(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, - char **argv) + const char **argv) { WERROR result; uint32 needed, level = 1, num_jobs, i; @@ -1978,7 +1987,7 @@ done: static NTSTATUS cmd_spoolss_enum_data( struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, - char **argv) + const char **argv) { WERROR result; uint32 i=0, val_needed, data_needed; @@ -2037,14 +2046,14 @@ done: static NTSTATUS cmd_spoolss_enum_data_ex( struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, - char **argv) + const char **argv) { WERROR result; uint32 needed, i; BOOL got_hnd = False; pstring printername; fstring servername, user; - char *keyname = NULL; + const char *keyname = NULL; POLICY_HND hnd; REGVAL_CTR ctr; @@ -2102,7 +2111,7 @@ done: static NTSTATUS cmd_spoolss_enum_printerkey( struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, - char **argv) + const char **argv) { WERROR result; uint32 needed, returned; @@ -2174,7 +2183,7 @@ done: static NTSTATUS cmd_spoolss_rffpcnex(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, - char **argv) + const char **argv) { fstring servername, printername; POLICY_HND hnd; diff --git a/source3/rpcclient/cmd_srvsvc.c b/source3/rpcclient/cmd_srvsvc.c index 10fdfd74374..8597c7bc2ec 100644 --- a/source3/rpcclient/cmd_srvsvc.c +++ b/source3/rpcclient/cmd_srvsvc.c @@ -181,7 +181,7 @@ static void display_srv_info_102(SRV_INFO_102 *sv102) /* Server query info */ static NTSTATUS cmd_srvsvc_srv_query_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { uint32 info_level = 101; SRV_INFO_CTR ctr; @@ -248,7 +248,7 @@ static void display_share_info_2(SRV_SHARE_INFO_2 *info2) static NTSTATUS cmd_srvsvc_net_share_enum(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { uint32 info_level = 2; SRV_SHARE_INFO_CTR ctr; @@ -294,7 +294,7 @@ static NTSTATUS cmd_srvsvc_net_share_enum(struct cli_state *cli, static NTSTATUS cmd_srvsvc_net_remote_tod(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { TIME_OF_DAY_INFO tod; WERROR result; @@ -316,7 +316,7 @@ static NTSTATUS cmd_srvsvc_net_remote_tod(struct cli_state *cli, static NTSTATUS cmd_srvsvc_net_file_enum(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { uint32 info_level = 3; SRV_FILE_INFO_CTR ctr; diff --git a/source3/rpcclient/rpcclient.h b/source3/rpcclient/rpcclient.h index 3276a62437a..1bd3c1a6417 100644 --- a/source3/rpcclient/rpcclient.h +++ b/source3/rpcclient/rpcclient.h @@ -24,8 +24,8 @@ struct cmd_set { const char *name; - NTSTATUS (*fn)(struct cli_state*, TALLOC_CTX *mem_ctx, int argc, - char **argv); + NTSTATUS (*fn)(struct cli_state *cli, TALLOC_CTX *mem_ctx, int argc, + const char **argv); int pipe_idx; const char *description; const char *usage; |