diff options
author | Tim Potter <tpot@samba.org> | 2003-02-25 23:34:57 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2003-02-25 23:34:57 +0000 |
commit | 991f6cc3c13cdeb8d7cf0dea25af29bbc7987c64 (patch) | |
tree | 7850ebfa4f31a0c63daa725b04cb109c261f3a40 /source3/rpcclient | |
parent | 7d581bebd437cd66000a1cac4b74b1ec4408f672 (diff) | |
download | samba-991f6cc3c13cdeb8d7cf0dea25af29bbc7987c64.tar.gz samba-991f6cc3c13cdeb8d7cf0dea25af29bbc7987c64.tar.bz2 samba-991f6cc3c13cdeb8d7cf0dea25af29bbc7987c64.zip |
More const fixes and flow on fixes from yesterday's const-fest.
(This used to be commit 018733eedd7897e6811e8461c07e3acf418c0e09)
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_netlogon.c | 12 | ||||
-rw-r--r-- | source3/rpcclient/cmd_reg.c | 4 | ||||
-rw-r--r-- | source3/rpcclient/cmd_spoolss.c | 66 | ||||
-rw-r--r-- | source3/rpcclient/cmd_srvsvc.c | 8 | ||||
-rw-r--r-- | source3/rpcclient/rpcclient.c | 4 |
7 files changed, 56 insertions, 56 deletions
diff --git a/source3/rpcclient/cmd_dfs.c b/source3/rpcclient/cmd_dfs.c index e3c4b77645..715174c824 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 946015c1e3..9de6d6a9ec 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_netlogon.c b/source3/rpcclient/cmd_netlogon.c index 53a926d52b..407bff3735 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 5d29b4c51a..19c0e7f71f 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_spoolss.c b/source3/rpcclient/cmd_spoolss.c index 66f2e8dc99..9f6f539e19 100644 --- a/source3/rpcclient/cmd_spoolss.c +++ b/source3/rpcclient/cmd_spoolss.c @@ -86,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; @@ -98,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; @@ -300,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; @@ -405,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; @@ -457,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; @@ -527,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; @@ -646,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; @@ -655,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) { @@ -690,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( @@ -717,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; @@ -726,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) { @@ -902,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; @@ -992,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; @@ -1080,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; @@ -1145,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; @@ -1175,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; @@ -1224,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; @@ -1277,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; @@ -1334,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; @@ -1412,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; @@ -1454,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; @@ -1497,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; @@ -1556,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; @@ -1614,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; @@ -1678,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; @@ -1725,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; @@ -1793,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; @@ -1912,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; @@ -1987,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; @@ -2046,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; @@ -2111,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; @@ -2183,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 10fdfd7437..8597c7bc2e 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.c b/source3/rpcclient/rpcclient.c index 5803055598..127506fb39 100644 --- a/source3/rpcclient/rpcclient.c +++ b/source3/rpcclient/rpcclient.c @@ -304,7 +304,7 @@ static NTSTATUS cmd_listcommands(struct cli_state *cli, TALLOC_CTX *mem_ctx, /* Display help on commands */ static NTSTATUS cmd_help(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { struct cmd_list *tmp; struct cmd_set *tmp_set; @@ -381,7 +381,7 @@ static NTSTATUS cmd_debuglevel(struct cli_state *cli, TALLOC_CTX *mem_ctx, } static NTSTATUS cmd_quit(struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, char **argv) + int argc, const char **argv) { exit(0); return NT_STATUS_OK; /* NOTREACHED */ |