summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_client/cli_dfs.c12
-rw-r--r--source3/rpc_client/cli_lsarpc.c5
-rw-r--r--source3/rpc_client/cli_netlogon.c2
-rw-r--r--source3/rpc_client/cli_spoolss.c17
-rw-r--r--source3/rpc_client/cli_srvsvc.c7
-rw-r--r--source3/rpc_parse/parse_dfs.c13
-rw-r--r--source3/rpc_parse/parse_spoolss.c14
-rw-r--r--source3/rpcclient/cmd_dfs.c16
-rw-r--r--source3/rpcclient/cmd_ds.c2
-rw-r--r--source3/rpcclient/cmd_netlogon.c12
-rw-r--r--source3/rpcclient/cmd_reg.c4
-rw-r--r--source3/rpcclient/cmd_spoolss.c66
-rw-r--r--source3/rpcclient/cmd_srvsvc.c8
-rw-r--r--source3/rpcclient/rpcclient.c4
-rw-r--r--source3/torture/samtest.c2
-rw-r--r--source3/torture/vfstest.c2
16 files changed, 97 insertions, 89 deletions
diff --git a/source3/rpc_client/cli_dfs.c b/source3/rpc_client/cli_dfs.c
index 7fc27b9c3b..2136b69df0 100644
--- a/source3/rpc_client/cli_dfs.c
+++ b/source3/rpc_client/cli_dfs.c
@@ -67,8 +67,8 @@ NTSTATUS cli_dfs_exist(struct cli_state *cli, TALLOC_CTX *mem_ctx,
}
NTSTATUS cli_dfs_add(struct cli_state *cli, TALLOC_CTX *mem_ctx,
- char *entrypath, char *servername, char *sharename,
- char *comment, uint32 flags)
+ const char *entrypath, const char *servername,
+ const char *sharename, const char *comment, uint32 flags)
{
prs_struct qbuf, rbuf;
DFS_Q_DFS_ADD q;
@@ -111,7 +111,8 @@ NTSTATUS cli_dfs_add(struct cli_state *cli, TALLOC_CTX *mem_ctx,
}
NTSTATUS cli_dfs_remove(struct cli_state *cli, TALLOC_CTX *mem_ctx,
- char *entrypath, char *servername, char *sharename)
+ const char *entrypath, const char *servername,
+ const char *sharename)
{
prs_struct qbuf, rbuf;
DFS_Q_DFS_REMOVE q;
@@ -153,8 +154,9 @@ NTSTATUS cli_dfs_remove(struct cli_state *cli, TALLOC_CTX *mem_ctx,
}
NTSTATUS cli_dfs_get_info(struct cli_state *cli, TALLOC_CTX *mem_ctx,
- char *entrypath, char *servername, char *sharename,
- uint32 info_level, DFS_INFO_CTR *ctr)
+ const char *entrypath, const char *servername,
+ const char *sharename, uint32 info_level,
+ DFS_INFO_CTR *ctr)
{
prs_struct qbuf, rbuf;
diff --git a/source3/rpc_client/cli_lsarpc.c b/source3/rpc_client/cli_lsarpc.c
index e878d02211..9002ad3d1b 100644
--- a/source3/rpc_client/cli_lsarpc.c
+++ b/source3/rpc_client/cli_lsarpc.c
@@ -805,7 +805,8 @@ NTSTATUS cli_lsa_enum_privilege(struct cli_state *cli, TALLOC_CTX *mem_ctx,
/** Get privilege name */
NTSTATUS cli_lsa_get_dispname(struct cli_state *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *pol, char *name, uint16 lang_id, uint16 lang_id_sys,
+ POLICY_HND *pol, const char *name,
+ uint16 lang_id, uint16 lang_id_sys,
fstring description, uint16 *lang_id_desc)
{
prs_struct qbuf, rbuf;
@@ -1050,7 +1051,7 @@ NTSTATUS cli_lsa_enum_privsaccount(struct cli_state *cli, TALLOC_CTX *mem_ctx,
/** Get a privilege value given its name */
NTSTATUS cli_lsa_lookupprivvalue(struct cli_state *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *pol, char *name, LUID *luid)
+ POLICY_HND *pol, const char *name, LUID *luid)
{
prs_struct qbuf, rbuf;
LSA_Q_LOOKUPPRIVVALUE q;
diff --git a/source3/rpc_client/cli_netlogon.c b/source3/rpc_client/cli_netlogon.c
index b5ad798755..cbb09803af 100644
--- a/source3/rpc_client/cli_netlogon.c
+++ b/source3/rpc_client/cli_netlogon.c
@@ -489,7 +489,7 @@ NTSTATUS cli_netlogon_sam_deltas(struct cli_state *cli, TALLOC_CTX *mem_ctx,
/* Logon domain user */
NTSTATUS cli_netlogon_sam_logon(struct cli_state *cli, TALLOC_CTX *mem_ctx,
- char *username, char *password,
+ const char *username, const char *password,
int logon_type)
{
prs_struct qbuf, rbuf;
diff --git a/source3/rpc_client/cli_spoolss.c b/source3/rpc_client/cli_spoolss.c
index a1aa6664c1..bb6ce1b998 100644
--- a/source3/rpc_client/cli_spoolss.c
+++ b/source3/rpc_client/cli_spoolss.c
@@ -1243,8 +1243,8 @@ WERROR cli_spoolss_addform(struct cli_state *cli, TALLOC_CTX *mem_ctx,
*/
WERROR cli_spoolss_setform(struct cli_state *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *handle, uint32 level, char *form_name,
- FORM *form)
+ POLICY_HND *handle, uint32 level,
+ const char *form_name, FORM *form)
{
prs_struct qbuf, rbuf;
SPOOL_Q_SETFORM q;
@@ -1305,8 +1305,8 @@ WERROR cli_spoolss_setform(struct cli_state *cli, TALLOC_CTX *mem_ctx,
WERROR cli_spoolss_getform(struct cli_state *cli, TALLOC_CTX *mem_ctx,
uint32 offered, uint32 *needed,
- POLICY_HND *handle, char *formname, uint32 level,
- FORM_1 *form)
+ POLICY_HND *handle, const char *formname,
+ uint32 level, FORM_1 *form)
{
prs_struct qbuf, rbuf;
SPOOL_Q_GETFORM q;
@@ -1377,7 +1377,7 @@ WERROR cli_spoolss_getform(struct cli_state *cli, TALLOC_CTX *mem_ctx,
*/
WERROR cli_spoolss_deleteform(struct cli_state *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *handle, char *form_name)
+ POLICY_HND *handle, const char *form_name)
{
prs_struct qbuf, rbuf;
SPOOL_Q_DELETEFORM q;
@@ -1899,7 +1899,7 @@ WERROR cli_spoolss_enddocprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx,
WERROR cli_spoolss_getprinterdata(struct cli_state *cli, TALLOC_CTX *mem_ctx,
uint32 offered, uint32 *needed,
- POLICY_HND *hnd, char *valuename,
+ POLICY_HND *hnd, const char *valuename,
REGISTRY_VALUE *value)
{
prs_struct qbuf, rbuf;
@@ -1953,8 +1953,9 @@ WERROR cli_spoolss_getprinterdata(struct cli_state *cli, TALLOC_CTX *mem_ctx,
WERROR cli_spoolss_getprinterdataex(struct cli_state *cli, TALLOC_CTX *mem_ctx,
uint32 offered, uint32 *needed,
- POLICY_HND *hnd, char *keyname,
- char *valuename, REGISTRY_VALUE *value)
+ POLICY_HND *hnd, const char *keyname,
+ const char *valuename,
+ REGISTRY_VALUE *value)
{
prs_struct qbuf, rbuf;
SPOOL_Q_GETPRINTERDATAEX q;
diff --git a/source3/rpc_client/cli_srvsvc.c b/source3/rpc_client/cli_srvsvc.c
index b6c6b377ff..6cd18f2e43 100644
--- a/source3/rpc_client/cli_srvsvc.c
+++ b/source3/rpc_client/cli_srvsvc.c
@@ -230,9 +230,10 @@ WERROR cli_srvsvc_net_share_del(struct cli_state *cli, TALLOC_CTX *mem_ctx,
}
WERROR cli_srvsvc_net_share_add(struct cli_state *cli, TALLOC_CTX *mem_ctx,
- char *netname, uint32 type, char *remark,
- uint32 perms, uint32 max_uses, uint32 num_uses,
- char *path, char *passwd)
+ const char *netname, uint32 type,
+ const char *remark, uint32 perms,
+ uint32 max_uses, uint32 num_uses,
+ const char *path, const char *passwd)
{
prs_struct qbuf, rbuf;
SRV_Q_NET_SHARE_ADD q;
diff --git a/source3/rpc_parse/parse_dfs.c b/source3/rpc_parse/parse_dfs.c
index ccd6d429fa..6f13500359 100644
--- a/source3/rpc_parse/parse_dfs.c
+++ b/source3/rpc_parse/parse_dfs.c
@@ -76,8 +76,8 @@ BOOL dfs_io_r_dfs_exist(const char *desc, DFS_R_DFS_EXIST *q_d, prs_struct *ps,
Make a DFS_Q_DFS_REMOVE structure
*******************************************************************/
-BOOL init_dfs_q_dfs_remove(DFS_Q_DFS_REMOVE *q_d, char *entrypath,
- char *servername, char *sharename)
+BOOL init_dfs_q_dfs_remove(DFS_Q_DFS_REMOVE *q_d, const char *entrypath,
+ const char *servername, const char *sharename)
{
DEBUG(5,("init_dfs_q_dfs_remove\n"));
init_unistr2(&q_d->DfsEntryPath, entrypath, strlen(entrypath)+1);
@@ -149,8 +149,9 @@ BOOL dfs_io_r_dfs_remove(const char *desc, DFS_R_DFS_REMOVE *r_d, prs_struct *ps
Make a DFS_Q_DFS_ADD structure
*******************************************************************/
-BOOL init_dfs_q_dfs_add(DFS_Q_DFS_ADD *q_d, char *entrypath, char *servername,
- char *sharename, char *comment, uint32 flags)
+BOOL init_dfs_q_dfs_add(DFS_Q_DFS_ADD *q_d, const char *entrypath,
+ const char *servername, const char *sharename,
+ const char *comment, uint32 flags)
{
DEBUG(5,("init_dfs_q_dfs_add\n"));
q_d->ptr_DfsEntryPath = q_d->ptr_ServerName = q_d->ptr_ShareName = 1;
@@ -231,8 +232,8 @@ BOOL dfs_io_r_dfs_add(const char *desc, DFS_R_DFS_ADD *r_d, prs_struct *ps, int
return True;
}
-BOOL init_dfs_q_dfs_get_info(DFS_Q_DFS_GET_INFO *q_d, char *entrypath,
- char *servername, char *sharename,
+BOOL init_dfs_q_dfs_get_info(DFS_Q_DFS_GET_INFO *q_d, const char *entrypath,
+ const char *servername, const char *sharename,
uint32 info_level)
{
DEBUG(5,("init_dfs_q2_get_info\n"));
diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c
index a34740f9ff..47737908f0 100644
--- a/source3/rpc_parse/parse_spoolss.c
+++ b/source3/rpc_parse/parse_spoolss.c
@@ -1202,7 +1202,7 @@ BOOL make_spoolss_q_deleteprinterdriver(
BOOL make_spoolss_q_getprinterdata(SPOOL_Q_GETPRINTERDATA *q_u,
const POLICY_HND *handle,
- char *valuename, uint32 size)
+ const char *valuename, uint32 size)
{
if (q_u == NULL) return False;
@@ -1221,7 +1221,8 @@ BOOL make_spoolss_q_getprinterdata(SPOOL_Q_GETPRINTERDATA *q_u,
BOOL make_spoolss_q_getprinterdataex(SPOOL_Q_GETPRINTERDATAEX *q_u,
const POLICY_HND *handle,
- char *keyname, char *valuename, uint32 size)
+ const char *keyname,
+ const char *valuename, uint32 size)
{
if (q_u == NULL) return False;
@@ -7503,7 +7504,7 @@ BOOL make_spoolss_q_addform(SPOOL_Q_ADDFORM *q_u, POLICY_HND *handle,
********************************************************************/
BOOL make_spoolss_q_setform(SPOOL_Q_SETFORM *q_u, POLICY_HND *handle,
- int level, char *form_name, FORM *form)
+ int level, const char *form_name, FORM *form)
{
memcpy(&q_u->handle, handle, sizeof(POLICY_HND));
q_u->level = level;
@@ -7518,7 +7519,8 @@ BOOL make_spoolss_q_setform(SPOOL_Q_SETFORM *q_u, POLICY_HND *handle,
* init a structure.
********************************************************************/
-BOOL make_spoolss_q_deleteform(SPOOL_Q_DELETEFORM *q_u, POLICY_HND *handle, char *form)
+BOOL make_spoolss_q_deleteform(SPOOL_Q_DELETEFORM *q_u, POLICY_HND *handle,
+ const char *form)
{
memcpy(&q_u->handle, handle, sizeof(POLICY_HND));
init_unistr2(&q_u->name, form, strlen(form) + 1);
@@ -7530,8 +7532,8 @@ BOOL make_spoolss_q_deleteform(SPOOL_Q_DELETEFORM *q_u, POLICY_HND *handle, char
********************************************************************/
BOOL make_spoolss_q_getform(SPOOL_Q_GETFORM *q_u, POLICY_HND *handle,
- char *formname, uint32 level, NEW_BUFFER *buffer,
- uint32 offered)
+ const char *formname, uint32 level,
+ NEW_BUFFER *buffer, uint32 offered)
{
memcpy(&q_u->handle, handle, sizeof(POLICY_HND));
q_u->level = level;
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 */
diff --git a/source3/torture/samtest.c b/source3/torture/samtest.c
index a1ccec098b..0de2e5d288 100644
--- a/source3/torture/samtest.c
+++ b/source3/torture/samtest.c
@@ -73,7 +73,7 @@ static NTSTATUS cmd_conf(struct samtest_state *sam, TALLOC_CTX *mem_ctx,
/* Display help on commands */
static NTSTATUS cmd_help(struct samtest_state *st, TALLOC_CTX *mem_ctx,
- int argc, char **argv)
+ int argc, const char **argv)
{
struct cmd_list *tmp;
struct cmd_set *tmp_set;
diff --git a/source3/torture/vfstest.c b/source3/torture/vfstest.c
index fd1f83109e..04f31656d3 100644
--- a/source3/torture/vfstest.c
+++ b/source3/torture/vfstest.c
@@ -124,7 +124,7 @@ static NTSTATUS cmd_conf(struct vfs_state *vfs, TALLOC_CTX *mem_ctx,
/* Display help on commands */
static NTSTATUS cmd_help(struct vfs_state *vfs, TALLOC_CTX *mem_ctx,
- int argc, char **argv)
+ int argc, const char **argv)
{
struct cmd_list *tmp;
struct cmd_set *tmp_set;