summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--source3/auth/auth.c4
-rw-r--r--source3/auth/pampass.c4
-rw-r--r--source3/client/client.c4
-rw-r--r--source3/client/clitar.c12
-rw-r--r--source3/client/smbspool.c4
-rw-r--r--source3/groupdb/mapping.c6
-rw-r--r--source3/include/auth.h6
-rw-r--r--source3/include/charset.h2
-rw-r--r--source3/include/includes.h2
-rw-r--r--source3/include/mapping.h4
-rw-r--r--source3/include/ntdomain.h4
-rw-r--r--source3/include/passdb.h2
-rw-r--r--source3/include/rpc_dce.h4
-rw-r--r--source3/include/rpc_reg.h2
-rw-r--r--source3/include/smb.h34
-rw-r--r--source3/intl/lang_tdb.c6
-rw-r--r--source3/lib/account_pol.c4
-rw-r--r--source3/lib/adt_tree.c2
-rw-r--r--source3/lib/charcnv.c12
-rw-r--r--source3/lib/genrand.c2
-rw-r--r--source3/lib/iconv.c12
-rw-r--r--source3/lib/messages.c2
-rw-r--r--source3/lib/pam_errors.c4
-rw-r--r--source3/lib/pidfile.c4
-rw-r--r--source3/lib/smbpasswd.c2
-rw-r--r--source3/lib/system.c2
-rw-r--r--source3/lib/util.c8
-rw-r--r--source3/lib/util_sid.c7
-rw-r--r--source3/lib/util_sock.c2
-rw-r--r--source3/lib/util_str.c4
-rw-r--r--source3/libads/disp_sec.c6
-rw-r--r--source3/libads/ldap.c4
-rw-r--r--source3/libads/ldap_printer.c6
-rw-r--r--source3/libsmb/asn1.c2
-rw-r--r--source3/libsmb/clidgram.c4
-rw-r--r--source3/libsmb/clientgen.c2
-rw-r--r--source3/libsmb/clierror.c6
-rw-r--r--source3/libsmb/clikrb5.c2
-rw-r--r--source3/libsmb/cliprint.c2
-rw-r--r--source3/libsmb/clirap.c6
-rw-r--r--source3/libsmb/clirap2.c2
-rw-r--r--source3/libsmb/clireadwrite.c5
-rw-r--r--source3/libsmb/doserr.c4
-rw-r--r--source3/libsmb/errormap.c6
-rw-r--r--source3/libsmb/nmblib.c8
-rw-r--r--source3/libsmb/nterr.c8
-rw-r--r--source3/libsmb/smberr.c12
-rw-r--r--source3/libsmb/unexpected.c4
-rw-r--r--source3/nmbd/nmbd_namelistdb.c4
-rw-r--r--source3/nmbd/nmbd_packets.c4
-rw-r--r--source3/nmbd/nmbd_processlogon.c4
-rw-r--r--source3/nmbd/nmbd_sendannounce.c2
-rw-r--r--source3/nmbd/nmbd_subnetdb.c2
-rw-r--r--source3/nmbd/nmbd_winsserver.c5
-rw-r--r--source3/nsswitch/wbinfo.c2
-rw-r--r--source3/nsswitch/winbindd.c2
-rw-r--r--source3/param/loadparm.c106
-rw-r--r--source3/param/params.c24
-rw-r--r--source3/passdb/passdb.c4
-rw-r--r--source3/passdb/pdb_interface.c6
-rw-r--r--source3/passdb/pdb_ldap.c2
-rw-r--r--source3/passdb/pdb_tdb.c2
-rw-r--r--source3/passdb/secrets.c2
-rw-r--r--source3/passdb/util_sam_sid.c16
-rw-r--r--source3/printing/lpq_parse.c8
-rw-r--r--source3/printing/nt_printing.c42
-rw-r--r--source3/printing/printing.c12
-rw-r--r--source3/registry/reg_objects.c4
-rw-r--r--source3/registry/reg_printing.c2
-rw-r--r--source3/rpc_client/cli_pipe.c2
-rw-r--r--source3/rpc_client/cli_spoolss.c16
-rw-r--r--source3/rpc_parse/parse_dfs.c24
-rw-r--r--source3/rpc_parse/parse_ds.c6
-rw-r--r--source3/rpc_parse/parse_lsa.c126
-rw-r--r--source3/rpc_parse/parse_misc.c68
-rw-r--r--source3/rpc_parse/parse_net.c92
-rw-r--r--source3/rpc_parse/parse_prs.c44
-rw-r--r--source3/rpc_parse/parse_reg.c80
-rw-r--r--source3/rpc_parse/parse_rpc.c44
-rw-r--r--source3/rpc_parse/parse_samr.c274
-rw-r--r--source3/rpc_parse/parse_sec.c10
-rw-r--r--source3/rpc_parse/parse_spoolss.c337
-rw-r--r--source3/rpc_parse/parse_srv.c212
-rw-r--r--source3/rpc_parse/parse_wks.c6
-rw-r--r--source3/rpc_server/srv_lsa.c2
-rw-r--r--source3/rpc_server/srv_netlog_nt.c6
-rw-r--r--source3/rpc_server/srv_pipe.c6
-rw-r--r--source3/rpc_server/srv_reg_nt.c4
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c30
-rw-r--r--source3/rpc_server/srv_srvsvc_nt.c4
-rw-r--r--source3/rpc_server/srv_util.c6
-rw-r--r--source3/rpcclient/cmd_samr.c2
-rw-r--r--source3/rpcclient/cmd_spoolss.c12
-rw-r--r--source3/rpcclient/rpcclient.h6
-rw-r--r--source3/smbd/build_options.c4
-rw-r--r--source3/smbd/connection.c6
-rw-r--r--source3/smbd/dir.c21
-rw-r--r--source3/smbd/filename.c6
-rw-r--r--source3/smbd/lanman.c37
-rw-r--r--source3/smbd/mangle.c4
-rw-r--r--source3/smbd/mangle_hash.c8
-rw-r--r--source3/smbd/negprot.c6
-rw-r--r--source3/smbd/nttrans.c2
-rw-r--r--source3/smbd/process.c4
-rw-r--r--source3/smbd/reply.c2
-rw-r--r--source3/smbd/server.c9
-rw-r--r--source3/smbd/utmp.c2
-rw-r--r--source3/smbd/vfs.c2
-rw-r--r--source3/tdb/tdbutil.c42
-rw-r--r--source3/torture/denytest.c20
-rw-r--r--source3/torture/locktest2.c2
-rw-r--r--source3/torture/masktest.c16
-rw-r--r--source3/torture/nsstest.c4
-rw-r--r--source3/torture/scanner.c16
-rw-r--r--source3/torture/torture.c62
-rw-r--r--source3/torture/vfstest.c4
-rw-r--r--source3/torture/vfstest.h6
-rw-r--r--source3/ubiqx/debugparse.c2
-rw-r--r--source3/ubiqx/debugparse.h2
-rw-r--r--source3/utils/editreg.c20
-rw-r--r--source3/utils/net.c16
-rw-r--r--source3/utils/net.h16
-rw-r--r--source3/utils/net_ads.c20
-rw-r--r--source3/utils/net_rap.c6
-rw-r--r--source3/utils/net_rpc.c23
-rw-r--r--source3/utils/net_time.c6
-rw-r--r--source3/utils/nmblookup.c4
-rw-r--r--source3/utils/ntlm_auth.c2
-rw-r--r--source3/utils/pdbedit.c28
-rw-r--r--source3/utils/profiles.c2
-rw-r--r--source3/utils/smbcacls.c14
-rw-r--r--source3/utils/smbcontrol.c6
-rw-r--r--source3/utils/smbpasswd.c4
-rw-r--r--source3/utils/testprns.c2
-rw-r--r--source3/web/cgi.c18
-rw-r--r--source3/web/statuspage.c2
-rw-r--r--source3/web/swat.c30
-rw-r--r--source3/wrepld/server.c2
138 files changed, 1225 insertions, 1215 deletions
diff --git a/source3/auth/auth.c b/source3/auth/auth.c
index dce14ed4687..3c4448445ab 100644
--- a/source3/auth/auth.c
+++ b/source3/auth/auth.c
@@ -25,7 +25,7 @@
/** List of various built-in authentication modules */
-const struct auth_init_function_entry builtin_auth_init_functions[] = {
+static const struct auth_init_function_entry builtin_auth_init_functions[] = {
{ "guest", auth_init_guest },
{ "rhosts", auth_init_rhosts },
{ "hostsequiv", auth_init_hostsequiv },
@@ -52,7 +52,7 @@ const struct auth_init_function_entry builtin_auth_init_functions[] = {
static const uint8 *get_ntlm_challenge(struct auth_context *auth_context)
{
DATA_BLOB challenge = data_blob(NULL, 0);
- char *challenge_set_by = NULL;
+ const char *challenge_set_by = NULL;
auth_methods *auth_method;
TALLOC_CTX *mem_ctx;
diff --git a/source3/auth/pampass.c b/source3/auth/pampass.c
index 1a3e55dd44f..045ceb7c729 100644
--- a/source3/auth/pampass.c
+++ b/source3/auth/pampass.c
@@ -65,7 +65,7 @@ typedef int (*smb_pam_conv_fn)(int, const struct pam_message **, struct pam_resp
PAM error handler.
*********************************************************************/
-static BOOL smb_pam_error_handler(pam_handle_t *pamh, int pam_error, char *msg, int dbglvl)
+static BOOL smb_pam_error_handler(pam_handle_t *pamh, int pam_error, const char *msg, int dbglvl)
{
if( pam_error != PAM_SUCCESS) {
@@ -83,7 +83,7 @@ static BOOL smb_pam_error_handler(pam_handle_t *pamh, int pam_error, char *msg,
*********************************************************************/
static BOOL smb_pam_nt_status_error_handler(pam_handle_t *pamh, int pam_error,
- char *msg, int dbglvl,
+ const char *msg, int dbglvl,
NTSTATUS *nt_status)
{
*nt_status = pam_to_nt_status(pam_error);
diff --git a/source3/client/client.c b/source3/client/client.c
index 76e07cb4f32..feb9e07d169 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -2057,9 +2057,9 @@ static BOOL list_servers(char *wk_grp)
*/
static struct
{
- char *name;
+ const char *name;
int (*fn)(void);
- char *description;
+ const char *description;
char compl_args[2]; /* Completion argument info */
} commands[] =
{
diff --git a/source3/client/clitar.c b/source3/client/clitar.c
index bf4b6e592ab..e8be5e04e7a 100644
--- a/source3/client/clitar.c
+++ b/source3/client/clitar.c
@@ -121,12 +121,12 @@ extern int get_total_size;
static int blocksize=20;
static int tarhandle;
-static void writetarheader(int f, char *aname, SMB_BIG_UINT size, time_t mtime,
- char *amode, unsigned char ftype);
+static void writetarheader(int f, const char *aname, SMB_BIG_UINT size, time_t mtime,
+ const char *amode, unsigned char ftype);
static void do_atar(char *rname,char *lname,file_info *finfo1);
static void do_tar(file_info *finfo);
static void oct_it(SMB_BIG_UINT value, int ndgs, char *p);
-static void fixtarname(char *tptr, char *fp, int l);
+static void fixtarname(char *tptr, const char *fp, int l);
static int dotarbuf(int f, char *b, int n);
static void dozerobuf(int f, int n);
static void dotareof(int f);
@@ -164,8 +164,8 @@ static char *string_create_s(int size)
/****************************************************************************
Write a tar header to buffer
****************************************************************************/
-static void writetarheader(int f, char *aname, SMB_BIG_UINT size, time_t mtime,
- char *amode, unsigned char ftype)
+static void writetarheader(int f, const char *aname, SMB_BIG_UINT size, time_t mtime,
+ const char *amode, unsigned char ftype)
{
union hblock hb;
int i, chk, l;
@@ -414,7 +414,7 @@ static void dotareof(int f)
/****************************************************************************
(Un)mangle DOS pathname, make nonabsolute
****************************************************************************/
-static void fixtarname(char *tptr, char *fp, int l)
+static void fixtarname(char *tptr, const char *fp, int l)
{
/* add a '.' to start of file name, convert from ugly dos \'s in path
* to lovely unix /'s :-} */
diff --git a/source3/client/smbspool.c b/source3/client/smbspool.c
index 4c90db4114b..c42cc7b91ff 100644
--- a/source3/client/smbspool.c
+++ b/source3/client/smbspool.c
@@ -52,8 +52,8 @@ static int smb_print(struct cli_state *, char *, FILE *);
int copies; /* Number of copies */
char uri[1024], /* URI */
*sep, /* Pointer to separator */
- *username, /* Username */
- *password, /* Password */
+ *password; /* Password */
+ const char *username, /* Username */
*server, /* Server name */
*printer; /* Printer name */
const char *workgroup; /* Workgroup */
diff --git a/source3/groupdb/mapping.c b/source3/groupdb/mapping.c
index 943183c061d..3809abc37a9 100644
--- a/source3/groupdb/mapping.c
+++ b/source3/groupdb/mapping.c
@@ -209,7 +209,7 @@ static BOOL default_group_mapping(void)
static BOOL init_group_mapping(void)
{
static pid_t local_pid;
- char *vstring = "INFO/version";
+ const char *vstring = "INFO/version";
int32 vers_id;
if (tdb && local_pid == sys_getpid())
@@ -293,8 +293,8 @@ BOOL add_mapping_entry(GROUP_MAP *map, int flag)
/****************************************************************************
initialise first time the mapping list
****************************************************************************/
-BOOL add_initial_entry(gid_t gid, fstring sid, enum SID_NAME_USE sid_name_use,
- fstring nt_name, fstring comment, PRIVILEGE_SET priv_set, uint32 systemaccount)
+BOOL add_initial_entry(gid_t gid, const char *sid, enum SID_NAME_USE sid_name_use,
+ const char *nt_name, const char *comment, PRIVILEGE_SET priv_set, uint32 systemaccount)
{
GROUP_MAP map;
diff --git a/source3/include/auth.h b/source3/include/auth.h
index 66b317d6433..846662d17c4 100644
--- a/source3/include/auth.h
+++ b/source3/include/auth.h
@@ -100,7 +100,7 @@ struct auth_context {
DATA_BLOB challenge;
/* Who set this up in the first place? */
- char *challenge_set_by;
+ const char *challenge_set_by;
struct auth_methods *challenge_set_method;
/* What order are the various methods in? Try to stop it changing under us */
@@ -118,7 +118,7 @@ struct auth_context {
typedef struct auth_methods
{
struct auth_methods *prev, *next;
- char *name; /* What name got this module */
+ const char *name; /* What name got this module */
NTSTATUS (*auth)(const struct auth_context *auth_context,
void *my_private_data,
@@ -144,7 +144,7 @@ typedef struct auth_methods
typedef NTSTATUS (*auth_init_function)(struct auth_context *, const char *, struct auth_methods **);
struct auth_init_function_entry {
- char *name;
+ const char *name;
/* Function to create a member of the authmethods list */
auth_init_function init;
diff --git a/source3/include/charset.h b/source3/include/charset.h
index d04f63abd1d..c56984ca7b2 100644
--- a/source3/include/charset.h
+++ b/source3/include/charset.h
@@ -30,7 +30,7 @@ typedef enum {CH_UCS2=0, CH_UNIX=1, CH_DISPLAY=2, CH_DOS=3, CH_UTF8=4} charset_t
* */
struct charset_functions {
- char *name;
+ const char *name;
size_t (*pull)(void *, char **inbuf, size_t *inbytesleft,
char **outbuf, size_t *outbytesleft);
size_t (*push)(void *, char **inbuf, size_t *inbytesleft,
diff --git a/source3/include/includes.h b/source3/include/includes.h
index 90477105576..9b199049622 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -797,7 +797,7 @@ typedef struct smb_wpasswd {
/* used in net.c */
struct functable {
- char *funcname;
+ const char *funcname;
int (*fn)(int argc, const char **argv);
};
diff --git a/source3/include/mapping.h b/source3/include/mapping.h
index d2fb89d1de7..d4f2d28e6a1 100644
--- a/source3/include/mapping.h
+++ b/source3/include/mapping.h
@@ -55,7 +55,7 @@ typedef struct _GROUP_MAP {
typedef struct _PRIVS {
uint32 se_priv;
- char *priv;
- char *description;
+ const char *priv;
+ const char *description;
} PRIVS;
diff --git a/source3/include/ntdomain.h b/source3/include/ntdomain.h
index 628035885e1..cf5bb5046c7 100644
--- a/source3/include/ntdomain.h
+++ b/source3/include/ntdomain.h
@@ -331,7 +331,7 @@ typedef struct smb_np_struct
struct api_struct
{
- char *name;
+ const char *name;
uint8 opnum;
BOOL (*fn) (pipes_struct *);
};
@@ -339,7 +339,7 @@ struct api_struct
typedef struct
{
uint32 rid;
- char *name;
+ const char *name;
} rid_name;
diff --git a/source3/include/passdb.h b/source3/include/passdb.h
index f1e15f614af..06409aa34eb 100644
--- a/source3/include/passdb.h
+++ b/source3/include/passdb.h
@@ -146,7 +146,7 @@ typedef NTSTATUS (*pdb_init_function)(struct pdb_context *,
const char *);
struct pdb_init_function_entry {
- char *name;
+ const char *name;
/* Function to create a member of the pdb_methods list */
pdb_init_function init;
struct pdb_init_function_entry *prev, *next;
diff --git a/source3/include/rpc_dce.h b/source3/include/rpc_dce.h
index 3e615dab80a..031f7de6d73 100644
--- a/source3/include/rpc_dce.h
+++ b/source3/include/rpc_dce.h
@@ -119,10 +119,10 @@ struct pipe_id_info
{
/* the names appear not to matter: the syntaxes _do_ matter */
- char *client_pipe;
+ const char *client_pipe;
RPC_IFACE abstr_syntax; /* this one is the abstract syntax id */
- char *server_pipe; /* this one is the secondary syntax name */
+ const char *server_pipe; /* this one is the secondary syntax name */
RPC_IFACE trans_syntax; /* this one is the primary syntax id */
};
diff --git a/source3/include/rpc_reg.h b/source3/include/rpc_reg.h
index 33134e8834d..46ec88283df 100644
--- a/source3/include/rpc_reg.h
+++ b/source3/include/rpc_reg.h
@@ -125,7 +125,7 @@ typedef struct {
} REGISTRY_OPS;
typedef struct {
- char *keyname; /* full path to name of key */
+ const char *keyname; /* full path to name of key */
REGISTRY_OPS *ops; /* registry function hooks */
} REGISTRY_HOOK;
diff --git a/source3/include/smb.h b/source3/include/smb.h
index b389020e238..60ab6be29ad 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -651,19 +651,19 @@ typedef struct sam_passwd
time_t pass_can_change_time; /* password can change time */
time_t pass_must_change_time; /* password must change time */
- char * username; /* UNIX username string */
- char * domain; /* Windows Domain name */
- char * nt_username; /* Windows username string */
- char * full_name; /* user's full name string */
- char * unix_home_dir; /* UNIX home directory string */
- char * home_dir; /* home directory string */
- char * dir_drive; /* home directory drive string */
- char * logon_script; /* logon script string */
- char * profile_path; /* profile path string */
- char * acct_desc ; /* user description string */
- char * workstations; /* login from workstations string */
- char * unknown_str ; /* don't know what this is, yet. */
- char * munged_dial ; /* munged path name and dial-back tel number */
+ const char * username; /* UNIX username string */
+ const char * domain; /* Windows Domain name */
+ const char * nt_username; /* Windows username string */
+ const char * full_name; /* user's full name string */
+ const char * unix_home_dir; /* UNIX home directory string */
+ const char * home_dir; /* home directory string */
+ const char * dir_drive; /* home directory drive string */
+ const char * logon_script; /* logon script string */
+ const char * profile_path; /* profile path string */
+ const char * acct_desc ; /* user description string */
+ const char * workstations; /* login from workstations string */
+ const char * unknown_str ; /* don't know what this is, yet. */
+ const char * munged_dial ; /* munged path name and dial-back tel number */
uid_t uid; /* this is a unix uid_t */
gid_t gid; /* this is a unix gid_t */
@@ -775,7 +775,7 @@ enum brl_type {READ_LOCK, WRITE_LOCK};
struct enum_list {
int value;
- char *name;
+ const char *name;
};
#define BRLOCK_FN_CAST() \
@@ -788,12 +788,12 @@ struct enum_list {
br_off start, br_off size)
struct parm_struct
{
- char *label;
+ const char *label;
parm_type type;
parm_class class;
void *ptr;
- BOOL (*special)(char *, char **);
- struct enum_list *enum_list;
+ BOOL (*special)(const char *, char **);
+ const struct enum_list *enum_list;
unsigned flags;
union {
BOOL bvalue;
diff --git a/source3/intl/lang_tdb.c b/source3/intl/lang_tdb.c
index 2c22d4ab5f7..87ef4e39c7b 100644
--- a/source3/intl/lang_tdb.c
+++ b/source3/intl/lang_tdb.c
@@ -75,9 +75,9 @@ static BOOL load_msg(const char *msg_file)
/* work out what language to use from locale variables */
-static char *get_lang(void)
+static const char *get_lang(void)
{
- char *vars[] = {"LANGUAGE", "LC_ALL", "LC_LANG", "LANG", NULL};
+ const char *vars[] = {"LANGUAGE", "LC_ALL", "LC_LANG", "LANG", NULL};
int i;
char *p;
@@ -123,7 +123,7 @@ BOOL lang_tdb_init(const char *lang)
/* if no lang then we don't translate */
if (!lang) return True;
- asprintf(&msg_path, "%s.msg", lib_path((char *)lang));
+ asprintf(&msg_path, "%s.msg", lib_path((const char *)lang));
if (stat(msg_path, &st) != 0) {
/* the msg file isn't available */
free(msg_path);
diff --git a/source3/lib/account_pol.c b/source3/lib/account_pol.c
index 6f51c916d71..2e619c0c6b3 100644
--- a/source3/lib/account_pol.c
+++ b/source3/lib/account_pol.c
@@ -31,7 +31,7 @@ static TDB_CONTEXT *tdb; /* used for driver files */
BOOL init_account_policy(void)
{
static pid_t local_pid;
- char *vstring = "INFO/version";
+ const char *vstring = "INFO/version";
uint32 version;
if (tdb && local_pid == sys_getpid())
@@ -67,7 +67,7 @@ BOOL init_account_policy(void)
static const struct {
int field;
- char *string;
+ const char *string;
} account_policy_names[] = {
{AP_MIN_PASSWORD_LEN, "min password length"},
{AP_PASSWORD_HISTORY, "password history"},
diff --git a/source3/lib/adt_tree.c b/source3/lib/adt_tree.c
index 2c18bb1198c..0bc224ec232 100644
--- a/source3/lib/adt_tree.c
+++ b/source3/lib/adt_tree.c
@@ -325,7 +325,7 @@ done:
Recursive routine to print out all children of a TREE_NODE
*************************************************************************/
-static void sorted_tree_print_children( TREE_NODE *node, int debug, char *path )
+static void sorted_tree_print_children( TREE_NODE *node, int debug, const char *path )
{
int i;
int num_children;
diff --git a/source3/lib/charcnv.c b/source3/lib/charcnv.c
index 04145fd17ab..3428377d952 100644
--- a/source3/lib/charcnv.c
+++ b/source3/lib/charcnv.c
@@ -30,9 +30,9 @@ static smb_iconv_t conv_handles[NUM_CHARSETS][NUM_CHARSETS];
Return the name of a charset to give to iconv().
****************************************************************************/
-static char *charset_name(charset_t ch)
+static const char *charset_name(charset_t ch)
{
- char *ret = NULL;
+ const char *ret = NULL;
if (ch == CH_UCS2) ret = "UCS-2LE";
else if (ch == CH_UNIX) ret = lp_unix_charset();
@@ -75,8 +75,8 @@ void init_iconv(void)
for (c1=0;c1<NUM_CHARSETS;c1++) {
for (c2=0;c2<NUM_CHARSETS;c2++) {
- char *n1 = charset_name((charset_t)c1);
- char *n2 = charset_name((charset_t)c2);
+ const char *n1 = charset_name((charset_t)c1);
+ const char *n2 = charset_name((charset_t)c2);
if (conv_handles[c1][c2] &&
strcmp(n1, conv_handles[c1][c2]->from_name) == 0 &&
strcmp(n2, conv_handles[c1][c2]->to_name) == 0)
@@ -140,7 +140,7 @@ size_t convert_string(charset_t from, charset_t to,
o_len=destlen;
retval = smb_iconv(descriptor, &inbuf, &i_len, &outbuf, &o_len);
if(retval==-1) {
- char *reason="unknown error";
+ const char *reason="unknown error";
switch(errno) {
case EINVAL:
reason="Incomplete multibyte sequence";
@@ -215,7 +215,7 @@ convert:
&inbuf, &i_len,
&outbuf, &o_len);
if(retval == -1) {
- char *reason="unknown error";
+ const char *reason="unknown error";
switch(errno) {
case EINVAL:
reason="Incomplete multibyte sequence";
diff --git a/source3/lib/genrand.c b/source3/lib/genrand.c
index fe756169a66..bc9f21c6403 100644
--- a/source3/lib/genrand.c
+++ b/source3/lib/genrand.c
@@ -101,7 +101,7 @@ static void get_random_stream(unsigned char *data, size_t datasize)
Note that the hash is not initialised.
*****************************************************************/
-static void do_filehash(char *fname, unsigned char *the_hash)
+static void do_filehash(const char *fname, unsigned char *the_hash)
{
unsigned char buf[1011]; /* deliberate weird size */
unsigned char tmp_md4[16];
diff --git a/source3/lib/iconv.c b/source3/lib/iconv.c
index e54a74864e1..5292e9cf0a6 100644
--- a/source3/lib/iconv.c
+++ b/source3/lib/iconv.c
@@ -29,12 +29,12 @@ static size_t ucs2hex_pull(void *,char **, size_t *, char **, size_t *);
static size_t ucs2hex_push(void *,char **, size_t *, char **, size_t *);
static size_t iconv_copy(void *,char **, size_t *, char **, size_t *);
-struct charset_functions builtin_functions[] = {
- {"UCS-2LE", iconv_copy, iconv_copy},
- {"UTF8", utf8_pull, utf8_push},
- {"ASCII", ascii_pull, ascii_push},
- {"UCS2-HEX", ucs2hex_pull, ucs2hex_push},
- {NULL, NULL, NULL}
+static struct charset_functions builtin_functions[] = {
+ {"UCS-2LE", iconv_copy, iconv_copy},
+ {"UTF8", utf8_pull, utf8_push},
+ {"ASCII", ascii_pull, ascii_push},
+ {"UCS2-HEX", ucs2hex_pull, ucs2hex_push},
+ {NULL, NULL, NULL}
};
static struct charset_functions *charsets = NULL;
diff --git a/source3/lib/messages.c b/source3/lib/messages.c
index 36a23e28ab9..8200b2f8c30 100644
--- a/source3/lib/messages.c
+++ b/source3/lib/messages.c
@@ -81,7 +81,7 @@ static void sig_usr1(void)
static void ping_message(int msg_type, pid_t src, void *buf, size_t len)
{
- char *msg = buf ? buf : "none";
+ const char *msg = buf ? buf : "none";
DEBUG(1,("INFO: Received PING message from PID %u [%s]\n",(unsigned int)src, msg));
message_send_pid(src, MSG_PONG, buf, len, True);
}
diff --git a/source3/lib/pam_errors.c b/source3/lib/pam_errors.c
index e1d02151a62..925441fb1d4 100644
--- a/source3/lib/pam_errors.c
+++ b/source3/lib/pam_errors.c
@@ -28,7 +28,7 @@
#endif
/* PAM -> NT_STATUS map */
-const static struct {
+static const struct {
int pam_code;
NTSTATUS ntstatus;
} pam_to_nt_status_map[] = {
@@ -58,7 +58,7 @@ const static struct {
};
/* NT_STATUS -> PAM map */
-const static struct {
+static const struct {
NTSTATUS ntstatus;
int pam_code;
} nt_status_to_pam_map[] = {
diff --git a/source3/lib/pidfile.c b/source3/lib/pidfile.c
index 393fb579944..16a12656b3a 100644
--- a/source3/lib/pidfile.c
+++ b/source3/lib/pidfile.c
@@ -28,7 +28,7 @@
/* return the pid in a pidfile. return 0 if the process (or pidfile)
does not exist */
-pid_t pidfile_pid(char *name)
+pid_t pidfile_pid(const char *name)
{
int fd;
char pidstr[20];
@@ -69,7 +69,7 @@ pid_t pidfile_pid(char *name)
}
/* create a pid file in the pid directory. open it and leave it locked */
-void pidfile_create(char *name)
+void pidfile_create(const char *name)
{
int fd;
char buf[20];
diff --git a/source3/lib/smbpasswd.c b/source3/lib/smbpasswd.c
index c27af5540b6..92ae1ffea26 100644
--- a/source3/lib/smbpasswd.c
+++ b/source3/lib/smbpasswd.c
@@ -60,7 +60,7 @@ BOOL smbpasswd_gethexpwd(char *p, unsigned char *pwd)
{
int i;
unsigned char lonybble, hinybble;
- char *hexchars = "0123456789ABCDEF";
+ const char *hexchars = "0123456789ABCDEF";
char *p1, *p2;
if (!p) return (False);
diff --git a/source3/lib/system.c b/source3/lib/system.c
index 873b8737d50..fed9b117ca7 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -1233,7 +1233,7 @@ int sys_dup2(int oldfd, int newfd)
Wrapper for Admin Logs.
****************************************************************************/
-void sys_adminlog(int priority, char *format_str, ...)
+void sys_adminlog(int priority, const char *format_str, ...)
{
va_list ap;
int ret;
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 0adfe34032d..39c58534cd4 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -676,7 +676,7 @@ smb_ucs2_t *unix_clean_path(const smb_ucs2_t *s)
Make a dir struct.
****************************************************************************/
-void make_dir_struct(char *buf,char *mask,char *fname,SMB_OFF_T size,int mode,time_t date)
+void make_dir_struct(char *buf, const char *mask, const char *fname,SMB_OFF_T size,int mode,time_t date)
{
char *p;
pstring mask2;
@@ -1398,7 +1398,7 @@ gid_t nametogid(const char *name)
Something really nasty happened - panic !
********************************************************************/
-void smb_panic(char *why)
+void smb_panic(const char *why)
{
char *cmd = lp_panic_action();
int result;
@@ -1463,7 +1463,7 @@ char *readdirname(DIR *p)
of a path matches a (possibly wildcarded) entry in a namelist.
********************************************************************/
-BOOL is_in_path(char *name, name_compare_entry *namelist)
+BOOL is_in_path(const char *name, name_compare_entry *namelist)
{
pstring last_component;
char *p;
@@ -2247,7 +2247,7 @@ BOOL ms_has_wild_w(const smb_ucs2_t *s)
of the ".." name.
*******************************************************************/
-BOOL mask_match(char *string, char *pattern, BOOL is_case_sensitive)
+BOOL mask_match(const char *string, char *pattern, BOOL is_case_sensitive)
{
fstring p2, s2;
diff --git a/source3/lib/util_sid.c b/source3/lib/util_sid.c
index edd59ae1094..824987f1892 100644
--- a/source3/lib/util_sid.c
+++ b/source3/lib/util_sid.c
@@ -79,9 +79,9 @@ NT_USER_TOKEN system_token = {
Lookup string names for SID types.
****************************************************************************/
-const static struct {
+static const struct {
enum SID_NAME_USE sid_type;
- char *string;
+ const char *string;
} sid_name_type[] = {
{SID_NAME_USER, "User"},
{SID_NAME_DOM_GRP, "Domain Group"},
@@ -181,7 +181,8 @@ NT_USER_TOKEN *get_system_token(void)
void split_domain_name(const char *fullname, char *domain, char *name)
{
pstring full_name;
- char *p, *sep;
+ const char *sep;
+ char *p;
sep = lp_winbind_separator();
diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c
index 2acb20861b9..e162e5cd771 100644
--- a/source3/lib/util_sock.c
+++ b/source3/lib/util_sock.c
@@ -43,7 +43,7 @@ BOOL is_a_socket(int fd)
enum SOCK_OPT_TYPES {OPT_BOOL,OPT_INT,OPT_ON};
typedef struct smb_socket_option {
- char *name;
+ const char *name;
int level;
int option;
int value;
diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c
index 7d056e98d2c..a76278e532f 100644
--- a/source3/lib/util_str.c
+++ b/source3/lib/util_str.c
@@ -576,7 +576,7 @@ size_t strhex_to_str(char *p, size_t len, const char *strhex)
size_t i;
size_t num_chars = 0;
unsigned char lonybble, hinybble;
- char *hexchars = "0123456789ABCDEF";
+ const char *hexchars = "0123456789ABCDEF";
char *p1 = NULL, *p2 = NULL;
for (i = 0; i < len && strhex[i] != 0; i++) {
@@ -958,7 +958,7 @@ void split_at_last_component(char *path, char *front, char sep, char *back)
Write an octal as a string.
****************************************************************************/
-char *octal_string(int i)
+const char *octal_string(int i)
{
static char ret[64];
if (i == -1)
diff --git a/source3/libads/disp_sec.c b/source3/libads/disp_sec.c
index a7b0bf6f07c..c9de447e698 100644
--- a/source3/libads/disp_sec.c
+++ b/source3/libads/disp_sec.c
@@ -22,7 +22,7 @@
static struct perm_mask_str {
uint32 mask;
- char *str;
+ const char *str;
} perms[] = {
{SEC_RIGHTS_FULL_CTRL, "[Full Control]"},
@@ -83,7 +83,7 @@ static void ads_disp_perms(uint32 type)
/* display ACE */
static void ads_disp_ace(SEC_ACE *sec_ace)
{
- char *access_type = "UNKNOWN";
+ const char *access_type = "UNKNOWN";
if (!sec_ace_object(sec_ace->type)) {
printf("------- ACE (type: 0x%02x, flags: 0x%02x, size: 0x%02x, mask: 0x%x)\n",
@@ -121,7 +121,7 @@ static void ads_disp_ace(SEC_ACE *sec_ace)
}
/* display ACL */
-static void ads_disp_acl(SEC_ACL *sec_acl, char *type)
+static void ads_disp_acl(SEC_ACL *sec_acl, const char *type)
{
if (!sec_acl)
printf("------- (%s) ACL not present\n", type);
diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c
index 1ed1da0b5d0..1743bc2dd61 100644
--- a/source3/libads/ldap.c
+++ b/source3/libads/ldap.c
@@ -1184,8 +1184,8 @@ static void dump_string(const char *field, char **values)
static BOOL ads_dump_field(char *field, void **values, void *data_area)
{
- struct {
- char *name;
+ const struct {
+ const char *name;
BOOL string;
void (*handler)(const char *, struct berval **);
} handlers[] = {
diff --git a/source3/libads/ldap_printer.c b/source3/libads/ldap_printer.c
index b2ee5f22655..87ea0588967 100644
--- a/source3/libads/ldap_printer.c
+++ b/source3/libads/ldap_printer.c
@@ -167,7 +167,7 @@ static BOOL map_multi_sz(TALLOC_CTX *ctx, ADS_MODLIST *mods,
}
struct valmap_to_ads {
- char *valname;
+ const char *valname;
BOOL (*fn)(TALLOC_CTX *, ADS_MODLIST *, const REGISTRY_VALUE *);
};
@@ -177,7 +177,7 @@ struct valmap_to_ads {
static void map_regval_to_ads(TALLOC_CTX *ctx, ADS_MODLIST *mods,
REGISTRY_VALUE *value)
{
- struct valmap_to_ads map[] = {
+ const struct valmap_to_ads map[] = {
{SPOOL_REG_ASSETNUMBER, map_sz},
{SPOOL_REG_BYTESPERMINUTE, map_dword},
{SPOOL_REG_DEFAULTPRIORITY, map_dword},
@@ -250,7 +250,7 @@ static void map_regval_to_ads(TALLOC_CTX *ctx, ADS_MODLIST *mods,
WERROR get_remote_printer_publishing_data(struct cli_state *cli,
TALLOC_CTX *mem_ctx,
ADS_MODLIST *mods,
- char *printer)
+ const char *printer)
{
WERROR result;
char *printername, *servername;
diff --git a/source3/libsmb/asn1.c b/source3/libsmb/asn1.c
index b7cfca41fbf..b9679278716 100644
--- a/source3/libsmb/asn1.c
+++ b/source3/libsmb/asn1.c
@@ -338,7 +338,7 @@ BOOL asn1_read_OID(ASN1_DATA *data, char **OID)
}
/* check that the next object ID is correct */
-BOOL asn1_check_OID(ASN1_DATA *data, char *OID)
+BOOL asn1_check_OID(ASN1_DATA *data, const char *OID)
{
char *id;
diff --git a/source3/libsmb/clidgram.c b/source3/libsmb/clidgram.c
index 8f4bdf7be6f..5ab6bef87b6 100644
--- a/source3/libsmb/clidgram.c
+++ b/source3/libsmb/clidgram.c
@@ -26,7 +26,7 @@
* cli_send_mailslot, send a mailslot for client code ...
*/
-int cli_send_mailslot(int dgram_sock, BOOL unique, char *mailslot,
+int cli_send_mailslot(int dgram_sock, BOOL unique, const char *mailslot,
char *buf, int len,
const char *srcname, int src_type,
const char *dstname, int dest_type,
@@ -100,7 +100,7 @@ int cli_send_mailslot(int dgram_sock, BOOL unique, char *mailslot,
/*
* cli_get_response: Get a response ...
*/
-int cli_get_response(int dgram_sock, BOOL unique, char *mailslot, char *buf, int bufsiz)
+int cli_get_response(int dgram_sock, BOOL unique, const char *mailslot, char *buf, int bufsiz)
{
struct packet_struct *packet;
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index c843d49d27b..ed1286d627d 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -327,7 +327,7 @@ void cli_shutdown(struct cli_state *cli)
Set socket options on a open connection.
****************************************************************************/
-void cli_sockopt(struct cli_state *cli, char *options)
+void cli_sockopt(struct cli_state *cli, const char *options)
{
set_socket_options(cli->fd, options);
}
diff --git a/source3/libsmb/clierror.c b/source3/libsmb/clierror.c
index f5281eb0475..12a7b5dba18 100644
--- a/source3/libsmb/clierror.c
+++ b/source3/libsmb/clierror.c
@@ -33,7 +33,7 @@
static const struct
{
int err;
- char *message;
+ const char *message;
} rap_errmap[] =
{
{5, "RAP5: User has insufficient privilege" },
@@ -62,7 +62,7 @@ static const struct
/****************************************************************************
return a description of an SMB error
****************************************************************************/
-static char *cli_smb_errstr(struct cli_state *cli)
+static const char *cli_smb_errstr(struct cli_state *cli)
{
return smb_dos_errstr(cli->inbuf);
}
@@ -73,7 +73,7 @@ static char *cli_smb_errstr(struct cli_state *cli)
in which case they can be safely ignored.
****************************************************************************/
-char *cli_errstr(struct cli_state *cli)
+const char *cli_errstr(struct cli_state *cli)
{
static fstring cli_error_message;
uint32 flgs2 = SVAL(cli->inbuf,smb_flg2), errnum;
diff --git a/source3/libsmb/clikrb5.c b/source3/libsmb/clikrb5.c
index 54a8a6ffe8b..a7b11d777ea 100644
--- a/source3/libsmb/clikrb5.c
+++ b/source3/libsmb/clikrb5.c
@@ -94,7 +94,7 @@ cleanup_princ:
/*
get a kerberos5 ticket for the given service
*/
-DATA_BLOB krb5_get_ticket(char *principal, time_t time_offset)
+DATA_BLOB krb5_get_ticket(const char *principal, time_t time_offset)
{
krb5_error_code retval;
krb5_data packet;
diff --git a/source3/libsmb/cliprint.c b/source3/libsmb/cliprint.c
index 92fbf02e918..bfa33bc5146 100644
--- a/source3/libsmb/cliprint.c
+++ b/source3/libsmb/cliprint.c
@@ -27,7 +27,7 @@
This function contains code to prevent core dumps if the server returns
invalid data.
*****************************************************************************/
-static char *fix_char_ptr(unsigned int datap, unsigned int converter,
+static const char *fix_char_ptr(unsigned int datap, unsigned int converter,
char *rdata, int rdrcnt)
{
if (datap == 0) { /* turn NULL pointers into zero length strings */
diff --git a/source3/libsmb/clirap.c b/source3/libsmb/clirap.c
index b4924fd7735..792a3e7aa0e 100644
--- a/source3/libsmb/clirap.c
+++ b/source3/libsmb/clirap.c
@@ -26,7 +26,7 @@
/****************************************************************************
Call a remote api on an arbitrary pipe. takes param, data and setup buffers.
****************************************************************************/
-BOOL cli_api_pipe(struct cli_state *cli, char *pipe_name,
+BOOL cli_api_pipe(struct cli_state *cli, const char *pipe_name,
uint16 *setup, uint32 setup_count, uint32 max_setup_count,
char *params, uint32 param_count, uint32 max_param_count,
char *data, uint32 data_count, uint32 max_data_count,
@@ -176,7 +176,7 @@ int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, co
char *sname = p;
int type = SVAL(p,14);
int comment_offset = IVAL(p,16) & 0xFFFF;
- char *cmnt = comment_offset?(rdata+comment_offset-converter):"";
+ const char *cmnt = comment_offset?(rdata+comment_offset-converter):"";
pstring s1, s2;
pull_ascii_pstring(s1, sname);
@@ -253,7 +253,7 @@ BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype,
for (i = 0;i < count;i++, p += 26) {
char *sname = p;
int comment_offset = (IVAL(p,22) & 0xFFFF)-converter;
- char *cmnt = comment_offset?(rdata+comment_offset):"";
+ const char *cmnt = comment_offset?(rdata+comment_offset):"";
pstring s1, s2;
if (comment_offset < 0 || comment_offset > rdrcnt) continue;
diff --git a/source3/libsmb/clirap2.c b/source3/libsmb/clirap2.c
index 9c3ec212d52..948e88061a5 100644
--- a/source3/libsmb/clirap2.c
+++ b/source3/libsmb/clirap2.c
@@ -128,7 +128,7 @@
pull_ascii_pstring(s, off?(r+off-c):"");\
} while(0)
-static char *make_header(char *param, uint16 apinum, char *reqfmt, char *datafmt)
+static char *make_header(char *param, uint16 apinum, const char *reqfmt, const char *datafmt)
{
PUTWORD(param,apinum);
if (reqfmt)
diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c
index d35b0dfdfd9..0715aa7f1a5 100644
--- a/source3/libsmb/clireadwrite.c
+++ b/source3/libsmb/clireadwrite.c
@@ -248,7 +248,8 @@ ssize_t cli_readraw(struct cli_state *cli, int fnum, char *buf, off_t offset, si
issue a single SMBwrite and don't wait for a reply
****************************************************************************/
-static BOOL cli_issue_write(struct cli_state *cli, int fnum, off_t offset, uint16 mode, char *buf,
+static BOOL cli_issue_write(struct cli_state *cli, int fnum, off_t offset,
+ uint16 mode, const char *buf,
size_t size, int i)
{
char *p;
@@ -319,7 +320,7 @@ static BOOL cli_issue_write(struct cli_state *cli, int fnum, off_t offset, uint1
ssize_t cli_write(struct cli_state *cli,
int fnum, uint16 write_mode,
- char *buf, off_t offset, size_t size)
+ const char *buf, off_t offset, size_t size)
{
int bwritten = 0;
int issued = 0;
diff --git a/source3/libsmb/doserr.c b/source3/libsmb/doserr.c
index 02db625685c..c9de4cf3199 100644
--- a/source3/libsmb/doserr.c
+++ b/source3/libsmb/doserr.c
@@ -24,7 +24,7 @@
typedef const struct
{
- char *dos_errstr;
+ const char *dos_errstr;
WERROR werror;
} werror_code_struct;
@@ -73,7 +73,7 @@ werror_code_struct dos_errs[] =
/*****************************************************************************
returns a DOS error message. not amazingly helpful, but better than a number.
*****************************************************************************/
-char *dos_errstr(WERROR werror)
+const char *dos_errstr(WERROR werror)
{
static pstring msg;
int idx = 0;
diff --git a/source3/libsmb/errormap.c b/source3/libsmb/errormap.c
index 8bd29b55c0a..09340caccd4 100644
--- a/source3/libsmb/errormap.c
+++ b/source3/libsmb/errormap.c
@@ -45,7 +45,7 @@
*/
/* NT status -> dos error map */
-const static struct {
+static const struct {
uint8 dos_class;
uint32 dos_code;
NTSTATUS ntstatus;
@@ -611,7 +611,7 @@ const static struct {
/* dos -> nt status error map */
-const static struct {
+static const struct {
uint8 dos_class;
uint32 dos_code;
NTSTATUS ntstatus;
@@ -866,7 +866,7 @@ const static struct {
};
/* errmap NTSTATUS->Win32 */
-const static struct {
+static const struct {
NTSTATUS ntstatus;
WERROR werror;
} ntstatus_to_werror_map[] = {
diff --git a/source3/libsmb/nmblib.c b/source3/libsmb/nmblib.c
index d38e2ff0ecf..30ce5b6b10c 100644
--- a/source3/libsmb/nmblib.c
+++ b/source3/libsmb/nmblib.c
@@ -25,7 +25,7 @@ int num_good_sends = 0;
int num_good_receives = 0;
static const struct opcode_names {
- char *nmb_opcode_name;
+ const char *nmb_opcode_name;
int opcode;
} nmb_header_opcode_names[] = {
{"Query", 0 },
@@ -57,7 +57,7 @@ static const char *lookup_opcode_name( int opcode )
/****************************************************************************
print out a res_rec structure
****************************************************************************/
-static void debug_nmb_res_rec(struct res_rec *res, char *hdr)
+static void debug_nmb_res_rec(struct res_rec *res, const char *hdr)
{
int i, j;
@@ -1005,7 +1005,7 @@ struct packet_struct *receive_nmb_packet(int fd, int t, int trn_id)
queue. The packet must be a reply packet and have the specified mailslot name
The timeout is in milliseconds
***************************************************************************/
-struct packet_struct *receive_dgram_packet(int fd, int t, char *mailslot_name)
+struct packet_struct *receive_dgram_packet(int fd, int t, const char *mailslot_name)
{
struct packet_struct *p;
@@ -1024,7 +1024,7 @@ struct packet_struct *receive_dgram_packet(int fd, int t, char *mailslot_name)
/****************************************************************************
see if a datagram has the right mailslot name
***************************************************************************/
-BOOL match_mailslot_name(struct packet_struct *p, char *mailslot_name)
+BOOL match_mailslot_name(struct packet_struct *p, const char *mailslot_name)
{
struct dgram_packet *dgram = &p->packet.dgram;
char *buf;
diff --git a/source3/libsmb/nterr.c b/source3/libsmb/nterr.c
index e494995f867..dbad05b91e5 100644
--- a/source3/libsmb/nterr.c
+++ b/source3/libsmb/nterr.c
@@ -24,7 +24,7 @@
typedef const struct
{
- char *nt_errstr;
+ const char *nt_errstr;
NTSTATUS nt_errcode;
} nt_err_code_struct;
@@ -575,7 +575,7 @@ nt_err_code_struct nt_err_desc[] =
/*****************************************************************************
returns an NT error message. not amazingly helpful, but better than a number.
*****************************************************************************/
-char *nt_errstr(NTSTATUS nt_code)
+const char *nt_errstr(NTSTATUS nt_code)
{
static pstring msg;
int idx = 0;
@@ -597,7 +597,7 @@ char *nt_errstr(NTSTATUS nt_code)
Print friendler version fo NT error code
***********************************************************************/
-char *get_friendly_nt_error_msg(NTSTATUS nt_code)
+const char *get_friendly_nt_error_msg(NTSTATUS nt_code)
{
int idx = 0;
@@ -617,7 +617,7 @@ char *get_friendly_nt_error_msg(NTSTATUS nt_code)
/*****************************************************************************
returns an NT_STATUS constant as a string for inclusion in autogen C code
*****************************************************************************/
-char *get_nt_error_c_code(NTSTATUS nt_code)
+const char *get_nt_error_c_code(NTSTATUS nt_code)
{
static pstring out;
int idx = 0;
diff --git a/source3/libsmb/smberr.c b/source3/libsmb/smberr.c
index 724c8edd545..82efbdb6898 100644
--- a/source3/libsmb/smberr.c
+++ b/source3/libsmb/smberr.c
@@ -37,9 +37,9 @@
typedef const struct
{
- char *name;
+ const char *name;
int code;
- char *message;
+ const char *message;
} err_code_struct;
/* Dos Error Messages */
@@ -142,7 +142,7 @@ err_code_struct hard_msgs[] = {
const struct
{
int code;
- char *class;
+ const char *class;
err_code_struct *err_msgs;
} err_classes[] = {
{0,"SUCCESS",NULL},
@@ -160,7 +160,7 @@ const struct
/****************************************************************************
return a SMB error name from a class and code
****************************************************************************/
-char *smb_dos_err_name(uint8 class, uint16 num)
+const char *smb_dos_err_name(uint8 class, uint16 num)
{
static pstring ret;
int i,j;
@@ -184,7 +184,7 @@ char *smb_dos_err_name(uint8 class, uint16 num)
/* Return a string for a DOS error */
-char *get_dos_error_msg(WERROR result)
+const char *get_dos_error_msg(WERROR result)
{
uint16 errnum;
@@ -196,7 +196,7 @@ char *get_dos_error_msg(WERROR result)
/****************************************************************************
return a SMB error class name as a string.
****************************************************************************/
-char *smb_dos_err_class(uint8 class)
+const char *smb_dos_err_class(uint8 class)
{
static pstring ret;
int i;
diff --git a/source3/libsmb/unexpected.c b/source3/libsmb/unexpected.c
index 4fc39144810..97d6071e714 100644
--- a/source3/libsmb/unexpected.c
+++ b/source3/libsmb/unexpected.c
@@ -110,7 +110,7 @@ void clear_unexpected(time_t t)
static struct packet_struct *matched_packet;
static int match_id;
static enum packet_type match_type;
-static char *match_name;
+static const char *match_name;
/****************************************************************************
tdb traversal fn to find a matching 137 packet
@@ -144,7 +144,7 @@ static int traverse_match(TDB_CONTEXT *ttdb, TDB_DATA kbuf, TDB_DATA dbuf, void
check for a particular packet in the unexpected packet queue
**************************************************************************/
struct packet_struct *receive_unexpected(enum packet_type packet_type, int id,
- char *mailslot_name)
+ const char *mailslot_name)
{
TDB_CONTEXT *tdb2;
diff --git a/source3/nmbd/nmbd_namelistdb.c b/source3/nmbd/nmbd_namelistdb.c
index 7ff2d4171e9..932d926a919 100644
--- a/source3/nmbd/nmbd_namelistdb.c
+++ b/source3/nmbd/nmbd_namelistdb.c
@@ -173,7 +173,7 @@ void update_name_ttl( struct name_record *namerec, int ttl )
* ************************************************************************** **
*/
struct name_record *add_name_to_subnet( struct subnet_record *subrec,
- char *name,
+ const char *name,
int type,
uint16 nb_flags,
int ttl,
@@ -525,7 +525,7 @@ void add_samba_names_to_subnet( struct subnet_record *subrec )
static void dump_subnet_namelist( struct subnet_record *subrec, XFILE *fp)
{
struct name_record *namerec;
- char *src_type;
+ const char *src_type;
struct tm *tm;
int i;
diff --git a/source3/nmbd/nmbd_packets.c b/source3/nmbd/nmbd_packets.c
index 894f6bb7d6d..d83cd10d0cb 100644
--- a/source3/nmbd/nmbd_packets.c
+++ b/source3/nmbd/nmbd_packets.c
@@ -887,7 +887,7 @@ void reply_netbios_packet(struct packet_struct *orig_packet,
struct res_rec answers;
struct nmb_packet *orig_nmb = &orig_packet->packet.nmb;
BOOL loopback_this_packet = False;
- char *packet_type = "unknown";
+ const char *packet_type = "unknown";
/* Check if we are sending to or from ourselves. */
if(ismyip(orig_packet->ip) && (orig_packet->port == global_nmb_port))
@@ -1929,7 +1929,7 @@ BOOL listen_for_packets(BOOL run_election)
/****************************************************************************
Construct and send a netbios DGRAM.
**************************************************************************/
-BOOL send_mailslot(BOOL unique, char *mailslot,char *buf,int len,
+BOOL send_mailslot(BOOL unique, const char *mailslot,char *buf,int len,
const char *srcname, int src_type,
const char *dstname, int dest_type,
struct in_addr dest_ip,struct in_addr src_ip,
diff --git a/source3/nmbd/nmbd_processlogon.c b/source3/nmbd/nmbd_processlogon.c
index 48fc8eabbf5..39724921a42 100644
--- a/source3/nmbd/nmbd_processlogon.c
+++ b/source3/nmbd/nmbd_processlogon.c
@@ -62,8 +62,8 @@ static void send_repl_message(uint32 low_serial)
Process a domain logon packet
**************************************************************************/
-void process_logon_packet(struct packet_struct *p,char *buf,int len,
- char *mailslot)
+void process_logon_packet(struct packet_struct *p, char *buf,int len,
+ const char *mailslot)
{
struct dgram_packet *dgram = &p->packet.dgram;
pstring my_name;
diff --git a/source3/nmbd/nmbd_sendannounce.c b/source3/nmbd/nmbd_sendannounce.c
index de05ee973ce..40d07aae168 100644
--- a/source3/nmbd/nmbd_sendannounce.c
+++ b/source3/nmbd/nmbd_sendannounce.c
@@ -33,7 +33,7 @@ extern BOOL found_lm_clients;
Send a browser reset packet.
**************************************************************************/
-void send_browser_reset(int reset_type, char *to_name, int to_type, struct in_addr to_ip)
+void send_browser_reset(int reset_type, const char *to_name, int to_type, struct in_addr to_ip)
{
pstring outbuf;
char *p;
diff --git a/source3/nmbd/nmbd_subnetdb.c b/source3/nmbd/nmbd_subnetdb.c
index 7875cd06b4e..62968264259 100644
--- a/source3/nmbd/nmbd_subnetdb.c
+++ b/source3/nmbd/nmbd_subnetdb.c
@@ -105,7 +105,7 @@ void close_subnet(struct subnet_record *subrec)
Create a subnet entry.
****************************************************************************/
-static struct subnet_record *make_subnet(char *name, enum subnet_type type,
+static struct subnet_record *make_subnet(const char *name, enum subnet_type type,
struct in_addr myip, struct in_addr bcast_ip,
struct in_addr mask_ip)
{
diff --git a/source3/nmbd/nmbd_winsserver.c b/source3/nmbd/nmbd_winsserver.c
index 87391b35df8..4ef476f8141 100644
--- a/source3/nmbd/nmbd_winsserver.c
+++ b/source3/nmbd/nmbd_winsserver.c
@@ -100,7 +100,7 @@ static void get_global_id_and_update(SMB_BIG_UINT *current_id, BOOL update)
/****************************************************************************
possibly call the WINS hook external program when a WINS change is made
*****************************************************************************/
-static void wins_hook(char *operation, struct name_record *namerec, int ttl)
+static void wins_hook(const char *operation, struct name_record *namerec, int ttl)
{
pstring command;
char *cmd = lp_wins_hook();
@@ -250,7 +250,8 @@ BOOL initialise_wins(void)
kbuf.dptr;
newkey = tdb_nextkey(tdb, kbuf), safe_free(kbuf.dptr), kbuf=newkey) {
- pstring name_type, name, ip_str;
+ fstring name_type;
+ pstring name, ip_str;
char *p;
int type = 0;
int nb_flags;
diff --git a/source3/nsswitch/wbinfo.c b/source3/nsswitch/wbinfo.c
index f03b0493def..720cf5822ca 100644
--- a/source3/nsswitch/wbinfo.c
+++ b/source3/nsswitch/wbinfo.c
@@ -573,7 +573,7 @@ static BOOL print_domain_groups(void)
static BOOL wbinfo_set_auth_user(char *username)
{
- char *password;
+ const char *password;
fstring user, domain;
/* Separate into user and password */
diff --git a/source3/nsswitch/winbindd.c b/source3/nsswitch/winbindd.c
index 61e585902ce..71e426e8182 100644
--- a/source3/nsswitch/winbindd.c
+++ b/source3/nsswitch/winbindd.c
@@ -207,7 +207,7 @@ static void sighup_handler(int signum)
struct dispatch_table {
enum winbindd_cmd cmd;
enum winbindd_result (*fn)(struct winbindd_cli_state *state);
- char *winbindd_cmd_name;
+ const char *winbindd_cmd_name;
};
static struct dispatch_table dispatch_table[] = {
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 621aa67e6ac..2cc16ee79b0 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -535,29 +535,29 @@ static int default_server_announce;
#define NUMPARAMETERS (sizeof(parm_table) / sizeof(struct parm_struct))
/* prototypes for the special type handlers */
-static BOOL handle_include(char *pszParmValue, char **ptr);
-static BOOL handle_copy(char *pszParmValue, char **ptr);
-static BOOL handle_vfs_object(char *pszParmValue, char **ptr);
-static BOOL handle_source_env(char *pszParmValue, char **ptr);
-static BOOL handle_netbios_name(char *pszParmValue, char **ptr);
-static BOOL handle_winbind_uid(char *pszParmValue, char **ptr);
-static BOOL handle_winbind_gid(char *pszParmValue, char **ptr);
-static BOOL handle_non_unix_account_range(char *pszParmValue, char **ptr);
-static BOOL handle_debug_list( char *pszParmValue, char **ptr );
-static BOOL handle_workgroup( char *pszParmValue, char **ptr );
-static BOOL handle_netbios_aliases( char *pszParmValue, char **ptr );
-static BOOL handle_netbios_scope( char *pszParmValue, char **ptr );
-
-static BOOL handle_ldap_machine_suffix ( char *pszParmValue, char **ptr );
-static BOOL handle_ldap_user_suffix ( char *pszParmValue, char **ptr );
-static BOOL handle_ldap_suffix ( char *pszParmValue, char **ptr );
-
-static BOOL handle_acl_compatibility(char *pszParmValue, char **ptr);
+static BOOL handle_include(const char *pszParmValue, char **ptr);
+static BOOL handle_copy(const char *pszParmValue, char **ptr);
+static BOOL handle_vfs_object(const char *pszParmValue, char **ptr);
+static BOOL handle_source_env(const char *pszParmValue, char **ptr);
+static BOOL handle_netbios_name(const char *pszParmValue, char **ptr);
+static BOOL handle_winbind_uid(const char *pszParmValue, char **ptr);
+static BOOL handle_winbind_gid(const char *pszParmValue, char **ptr);
+static BOOL handle_non_unix_account_range(const char *pszParmValue, char **ptr);
+static BOOL handle_debug_list( const char *pszParmValue, char **ptr );
+static BOOL handle_workgroup( const char *pszParmValue, char **ptr );
+static BOOL handle_netbios_aliases( const char *pszParmValue, char **ptr );
+static BOOL handle_netbios_scope( const char *pszParmValue, char **ptr );
+
+static BOOL handle_ldap_machine_suffix ( const char *pszParmValue, char **ptr );
+static BOOL handle_ldap_user_suffix ( const char *pszParmValue, char **ptr );
+static BOOL handle_ldap_suffix ( const char *pszParmValue, char **ptr );
+
+static BOOL handle_acl_compatibility(const char *pszParmValue, char **ptr);
static void set_server_role(void);
static void set_default_server_announce_type(void);
-static struct enum_list enum_protocol[] = {
+static const struct enum_list enum_protocol[] = {
{PROTOCOL_NT1, "NT1"},
{PROTOCOL_LANMAN2, "LANMAN2"},
{PROTOCOL_LANMAN1, "LANMAN1"},
@@ -567,7 +567,7 @@ static struct enum_list enum_protocol[] = {
{-1, NULL}
};
-static struct enum_list enum_security[] = {
+static const struct enum_list enum_security[] = {
{SEC_SHARE, "SHARE"},
{SEC_USER, "USER"},
{SEC_SERVER, "SERVER"},
@@ -578,7 +578,7 @@ static struct enum_list enum_security[] = {
{-1, NULL}
};
-static struct enum_list enum_printing[] = {
+static const struct enum_list enum_printing[] = {
{PRINT_SYSV, "sysv"},
{PRINT_AIX, "aix"},
{PRINT_HPUX, "hpux"},
@@ -597,7 +597,7 @@ static struct enum_list enum_printing[] = {
{-1, NULL}
};
-static struct enum_list enum_ldap_ssl[] = {
+static const struct enum_list enum_ldap_ssl[] = {
#ifdef WITH_LDAP_SAMCONFIG
{LDAP_SSL_ON, "Yes"},
{LDAP_SSL_ON, "yes"},
@@ -613,7 +613,7 @@ static struct enum_list enum_ldap_ssl[] = {
{-1, NULL}
};
-static struct enum_list enum_ldap_passwd_sync[] = {
+static const struct enum_list enum_ldap_passwd_sync[] = {
{LDAP_PASSWD_SYNC_ON, "Yes"},
{LDAP_PASSWD_SYNC_ON, "yes"},
{LDAP_PASSWD_SYNC_ON, "on"},
@@ -635,7 +635,7 @@ static struct enum_list enum_ldap_passwd_sync[] = {
#define ANNOUNCE_AS_WFW 3
#define ANNOUNCE_AS_NT_WORKSTATION 4
-static struct enum_list enum_announce_as[] = {
+static const struct enum_list enum_announce_as[] = {
{ANNOUNCE_AS_NT_SERVER, "NT"},
{ANNOUNCE_AS_NT_SERVER, "NT Server"},
{ANNOUNCE_AS_NT_WORKSTATION, "NT Workstation"},
@@ -644,13 +644,13 @@ static struct enum_list enum_announce_as[] = {
{-1, NULL}
};
-static struct enum_list enum_case[] = {
+static const struct enum_list enum_case[] = {
{CASE_LOWER, "lower"},
{CASE_UPPER, "upper"},
{-1, NULL}
};
-static struct enum_list enum_bool_auto[] = {
+static const struct enum_list enum_bool_auto[] = {
{False, "No"},
{False, "False"},
{False, "0"},
@@ -667,7 +667,7 @@ static struct enum_list enum_bool_auto[] = {
#define CSC_POLICY_PROGRAMS 2
#define CSC_POLICY_DISABLE 3
-static struct enum_list enum_csc_policy[] = {
+static const struct enum_list enum_csc_policy[] = {
{CSC_POLICY_MANUAL, "manual"},
{CSC_POLICY_DOCUMENTS, "documents"},
{CSC_POLICY_PROGRAMS, "programs"},
@@ -696,7 +696,7 @@ static struct enum_list enum_csc_policy[] = {
level security.
*/
-static struct enum_list enum_map_to_guest[] = {
+static const struct enum_list enum_map_to_guest[] = {
{NEVER_MAP_TO_GUEST, "Never"},
{MAP_TO_GUEST_ON_BAD_USER, "Bad User"},
{MAP_TO_GUEST_ON_BAD_PASSWORD, "Bad Password"},
@@ -1821,15 +1821,15 @@ FN_GLOBAL_INTEGER(lp_name_cache_timeout, &Globals.name_cache_timeout)
/* local prototypes */
-static int map_parameter(char *pszParmName);
+static int map_parameter(const char *pszParmName);
static BOOL set_boolean(BOOL *pb, const char *pszParmValue);
static int getservicebyname(const char *pszServiceName,
service * pserviceDest);
static void copy_service(service * pserviceDest,
service * pserviceSource, BOOL *pcopymapDest);
static BOOL service_ok(int iService);
-static BOOL do_parameter(char *pszParmName, char *pszParmValue);
-static BOOL do_section(char *pszSectionName);
+static BOOL do_parameter(const char *pszParmName, const char *pszParmValue);
+static BOOL do_section(const char *pszSectionName);
static void init_copymap(service * pservice);
/* This is a helper function for parametrical options support. */
@@ -2208,7 +2208,7 @@ int lp_add_service(const char *pszService, int iDefaultService)
Add the IPC service.
***************************************************************************/
-static BOOL lp_add_ipc(char *ipc_name, BOOL guest_ok)
+static BOOL lp_add_ipc(const char *ipc_name, BOOL guest_ok)
{
pstring comment;
int i = add_a_service(&sDefault, ipc_name);
@@ -2278,7 +2278,7 @@ BOOL lp_add_printer(const char *pszPrintername, int iDefaultService)
Returns False if the parameter string is not recognised, else TRUE.
***************************************************************************/
-static int map_parameter(char *pszParmName)
+static int map_parameter(const char *pszParmName)
{
int iIndex;
@@ -2566,7 +2566,7 @@ BOOL lp_file_list_changed(void)
Note: We must *NOT* use string_set() here as ptr points to global_myname.
***************************************************************************/
-static BOOL handle_netbios_name(char *pszParmValue, char **ptr)
+static BOOL handle_netbios_name(const char *pszParmValue, char **ptr)
{
pstring netbios_name;
@@ -2582,17 +2582,17 @@ static BOOL handle_netbios_name(char *pszParmValue, char **ptr)
return (True);
}
-static BOOL handle_workgroup(char *pszParmValue, char **ptr)
+static BOOL handle_workgroup(const char *pszParmValue, char **ptr)
{
return set_global_myworkgroup(pszParmValue);
}
-static BOOL handle_netbios_scope(char *pszParmValue, char **ptr)
+static BOOL handle_netbios_scope(const char *pszParmValue, char **ptr)
{
return set_global_scope(pszParmValue);
}
-static BOOL handle_netbios_aliases(char *pszParmValue, char **ptr)
+static BOOL handle_netbios_aliases(const char *pszParmValue, char **ptr)
{
Globals.szNetbiosAliases = str_list_make(pszParmValue, NULL);
return set_netbios_aliases((const char **)Globals.szNetbiosAliases);
@@ -2652,7 +2652,7 @@ static BOOL source_env(char **lines)
Handle the source environment operation.
***************************************************************************/
-static BOOL handle_source_env(char *pszParmValue, char **ptr)
+static BOOL handle_source_env(const char *pszParmValue, char **ptr)
{
pstring fname;
char *p = fname;
@@ -2692,7 +2692,7 @@ static BOOL handle_source_env(char *pszParmValue, char **ptr)
Handle the interpretation of the vfs object parameter.
*************************************************************************/
-static BOOL handle_vfs_object(char *pszParmValue, char **ptr)
+static BOOL handle_vfs_object(const char *pszParmValue, char **ptr)
{
/* Set string value */
@@ -2708,7 +2708,7 @@ static BOOL handle_vfs_object(char *pszParmValue, char **ptr)
Handle the include operation.
***************************************************************************/
-static BOOL handle_include(char *pszParmValue, char **ptr)
+static BOOL handle_include(const char *pszParmValue, char **ptr)
{
pstring fname;
pstrcpy(fname, pszParmValue);
@@ -2731,7 +2731,7 @@ static BOOL handle_include(char *pszParmValue, char **ptr)
Handle the interpretation of the copy parameter.
***************************************************************************/
-static BOOL handle_copy(char *pszParmValue, char **ptr)
+static BOOL handle_copy(const char *pszParmValue, char **ptr)
{
BOOL bRetval;
int iTemp;
@@ -2827,7 +2827,7 @@ BOOL lp_non_unix_account_range(uint32 *low, uint32 *high)
/* Do some simple checks on "winbind [ug]id" parameter values */
-static BOOL handle_winbind_uid(char *pszParmValue, char **ptr)
+static BOOL handle_winbind_uid(const char *pszParmValue, char **ptr)
{
uint32 low, high;
@@ -2844,7 +2844,7 @@ static BOOL handle_winbind_uid(char *pszParmValue, char **ptr)
return True;
}
-static BOOL handle_winbind_gid(char *pszParmValue, char **ptr)
+static BOOL handle_winbind_gid(const char *pszParmValue, char **ptr)
{
uint32 low, high;
@@ -2865,7 +2865,7 @@ static BOOL handle_winbind_gid(char *pszParmValue, char **ptr)
Do some simple checks on "non unix account range" parameter values.
***************************************************************************/
-static BOOL handle_non_unix_account_range(char *pszParmValue, char **ptr)
+static BOOL handle_non_unix_account_range(const char *pszParmValue, char **ptr)
{
uint32 low, high;
@@ -2886,7 +2886,7 @@ static BOOL handle_non_unix_account_range(char *pszParmValue, char **ptr)
Handle the DEBUG level list.
***************************************************************************/
-static BOOL handle_debug_list( char *pszParmValueIn, char **ptr )
+static BOOL handle_debug_list( const char *pszParmValueIn, char **ptr )
{
pstring pszParmValue;
@@ -2899,7 +2899,7 @@ static BOOL handle_debug_list( char *pszParmValueIn, char **ptr )
Handle the ldap machine suffix option.
***************************************************************************/
-static BOOL handle_ldap_machine_suffix( char *pszParmValue, char **ptr)
+static BOOL handle_ldap_machine_suffix( const char *pszParmValue, char **ptr)
{
pstring suffix;
@@ -2923,7 +2923,7 @@ static BOOL handle_ldap_machine_suffix( char *pszParmValue, char **ptr)
Handle the ldap user suffix option.
***************************************************************************/
-static BOOL handle_ldap_user_suffix( char *pszParmValue, char **ptr)
+static BOOL handle_ldap_user_suffix( const char *pszParmValue, char **ptr)
{
pstring suffix;
@@ -2948,7 +2948,7 @@ static BOOL handle_ldap_user_suffix( char *pszParmValue, char **ptr)
to be set as well.
***************************************************************************/
-static BOOL handle_ldap_suffix( char *pszParmValue, char **ptr)
+static BOOL handle_ldap_suffix( const char *pszParmValue, char **ptr)
{
pstring suffix;
pstring user_suffix;
@@ -2981,7 +2981,7 @@ static BOOL handle_ldap_suffix( char *pszParmValue, char **ptr)
return True;
}
-static BOOL handle_acl_compatibility(char *pszParmValue, char **ptr)
+static BOOL handle_acl_compatibility(const char *pszParmValue, char **ptr)
{
if (strequal(pszParmValue, "auto"))
string_set(ptr, "");
@@ -3027,7 +3027,7 @@ void *lp_local_ptr(int snum, void *ptr)
then assume we are in the globals.
***************************************************************************/
-BOOL lp_do_parameter(int snum, char *pszParmName, char *pszParmValue)
+BOOL lp_do_parameter(int snum, const char *pszParmName, const char *pszParmValue)
{
int parmnum, i, slen;
void *parm_ptr = NULL; /* where we are going to store the result */
@@ -3187,7 +3187,7 @@ BOOL lp_do_parameter(int snum, char *pszParmName, char *pszParmValue)
Process a parameter.
***************************************************************************/
-static BOOL do_parameter(char *pszParmName, char *pszParmValue)
+static BOOL do_parameter(const char *pszParmName, const char *pszParmValue)
{
if (!bInGlobalSection && bGlobalOnly)
return (True);
@@ -3328,7 +3328,7 @@ void init_locals(void)
Returns True on success, False on failure.
***************************************************************************/
-static BOOL do_section(char *pszSectionName)
+static BOOL do_section(const char *pszSectionName)
{
BOOL bRetval;
BOOL isglobal = ((strwicmp(pszSectionName, GLOBAL_NAME) == 0) ||
@@ -4068,7 +4068,7 @@ void lp_remove_service(int snum)
Copy a service.
********************************************************************/
-void lp_copy_service(int snum, char *new_name)
+void lp_copy_service(int snum, const char *new_name)
{
char *oldname = lp_servicename(snum);
do_section(new_name);
diff --git a/source3/param/params.c b/source3/param/params.c
index bc93a1fedfe..892e5476cc0 100644
--- a/source3/param/params.c
+++ b/source3/param/params.c
@@ -201,7 +201,7 @@ static int Continuation(char *line, int pos )
}
-static BOOL Section( myFILE *InFile, BOOL (*sfunc)(char *) )
+static BOOL Section( myFILE *InFile, BOOL (*sfunc)(const char *) )
/* ------------------------------------------------------------------------ **
* Scan a section name, and pass the name to function sfunc().
*
@@ -219,7 +219,7 @@ static BOOL Section( myFILE *InFile, BOOL (*sfunc)(char *) )
int c;
int i;
int end;
- char *func = "params.c:Section() -";
+ const char *func = "params.c:Section() -";
i = 0; /* <i> is the offset of the next free byte in bufr[] and */
end = 0; /* <end> is the current "end of string" offset. In most */
@@ -297,7 +297,7 @@ static BOOL Section( myFILE *InFile, BOOL (*sfunc)(char *) )
return( False );
} /* Section */
-static BOOL Parameter( myFILE *InFile, BOOL (*pfunc)(char *, char *), int c )
+static BOOL Parameter( myFILE *InFile, BOOL (*pfunc)(const char *, const char *), int c )
/* ------------------------------------------------------------------------ **
* Scan a parameter name and value, and pass these two fields to pfunc().
*
@@ -325,7 +325,7 @@ static BOOL Parameter( myFILE *InFile, BOOL (*pfunc)(char *, char *), int c )
int i = 0; /* Position within bufr. */
int end = 0; /* bufr[end] is current end-of-string. */
int vstart = 0; /* Starting position of the parameter value. */
- char *func = "params.c:Parameter() -";
+ const char *func = "params.c:Parameter() -";
/* Read the parameter name. */
while( 0 == vstart ) /* Loop until we've found the start of the value. */
@@ -445,8 +445,8 @@ static BOOL Parameter( myFILE *InFile, BOOL (*pfunc)(char *, char *), int c )
} /* Parameter */
static BOOL Parse( myFILE *InFile,
- BOOL (*sfunc)(char *),
- BOOL (*pfunc)(char *, char *) )
+ BOOL (*sfunc)(const char *),
+ BOOL (*pfunc)(const char *, const char *) )
/* ------------------------------------------------------------------------ **
* Scan & parse the input.
*
@@ -505,7 +505,7 @@ static BOOL Parse( myFILE *InFile,
return( True );
} /* Parse */
-static myFILE *OpenConfFile( char *FileName )
+static myFILE *OpenConfFile( const char *FileName )
/* ------------------------------------------------------------------------ **
* Open a configuration file.
*
@@ -516,7 +516,7 @@ static myFILE *OpenConfFile( char *FileName )
* ------------------------------------------------------------------------ **
*/
{
- char *func = "params.c:OpenConfFile() -";
+ const char *func = "params.c:OpenConfFile() -";
extern BOOL in_client;
int lvl = in_client?1:0;
myFILE *ret;
@@ -538,9 +538,9 @@ static myFILE *OpenConfFile( char *FileName )
return( ret );
} /* OpenConfFile */
-BOOL pm_process( char *FileName,
- BOOL (*sfunc)(char *),
- BOOL (*pfunc)(char *, char *) )
+BOOL pm_process( const char *FileName,
+ BOOL (*sfunc)(const char *),
+ BOOL (*pfunc)(const char *, const char *) )
/* ------------------------------------------------------------------------ **
* Process the named parameter file.
*
@@ -557,7 +557,7 @@ BOOL pm_process( char *FileName,
{
int result;
myFILE *InFile;
- char *func = "params.c:pm_process() -";
+ const char *func = "params.c:pm_process() -";
InFile = OpenConfFile( FileName ); /* Open the config file. */
if( NULL == InFile )
diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c
index ed5ddda4da3..e13f0e9dfba 100644
--- a/source3/passdb/passdb.c
+++ b/source3/passdb/passdb.c
@@ -304,7 +304,7 @@ NTSTATUS pdb_init_sam_pw(SAM_ACCOUNT **new_sam_acct, const struct passwd *pwd)
/**
* Free the contets of the SAM_ACCOUNT, but not the structure.
*
- * Also wipes the LM and NT hashes and plaintext passwrod from
+ * Also wipes the LM and NT hashes and plaintext password from
* memory.
*
* @param user SAM_ACCOUNT to free members of.
@@ -473,7 +473,7 @@ BOOL pdb_gethexpwd(const char *p, unsigned char *pwd)
{
int i;
unsigned char lonybble, hinybble;
- char *hexchars = "0123456789ABCDEF";
+ const char *hexchars = "0123456789ABCDEF";
char *p1, *p2;
if (!p)
diff --git a/source3/passdb/pdb_interface.c b/source3/passdb/pdb_interface.c
index 891a29148f5..778cb9425c1 100644
--- a/source3/passdb/pdb_interface.c
+++ b/source3/passdb/pdb_interface.c
@@ -25,8 +25,8 @@
#define DBGC_CLASS DBGC_PASSDB
/** List of various built-in passdb modules */
-const struct {
- char *name;
+static const struct {
+ const char *name;
/* Function to create a member of the pdb_methods list */
pdb_init_function init;
} builtin_pdb_init_functions[] = {
@@ -58,7 +58,7 @@ static void lazy_initialize_passdb()
}
}
-BOOL smb_register_passdb(char *name, pdb_init_function init, int version)
+BOOL smb_register_passdb(const char *name, pdb_init_function init, int version)
{
struct pdb_init_function_entry *entry = backends;
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c
index 884db4c26c6..7c3c6f1f1fe 100644
--- a/source3/passdb/pdb_ldap.c
+++ b/source3/passdb/pdb_ldap.c
@@ -728,7 +728,7 @@ static int ldapsam_search_one_user_by_rid (struct ldapsam_privates *ldap_state,
search an attribute and return the first value found.
******************************************************************/
static BOOL get_single_attribute (LDAP * ldap_struct, LDAPMessage * entry,
- char *attribute, pstring value)
+ const char *attribute, pstring value)
{
char **values;
diff --git a/source3/passdb/pdb_tdb.c b/source3/passdb/pdb_tdb.c
index 2aa2e504d7d..a1f786c8cdc 100644
--- a/source3/passdb/pdb_tdb.c
+++ b/source3/passdb/pdb_tdb.c
@@ -529,7 +529,7 @@ static NTSTATUS tdbsam_getsampwent(struct pdb_methods *my_methods, SAM_ACCOUNT *
NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
struct tdbsam_privates *tdb_state = (struct tdbsam_privates *)my_methods->private_data;
TDB_DATA data;
- char *prefix = USERPREFIX;
+ const char *prefix = USERPREFIX;
int prefixlen = strlen (prefix);
diff --git a/source3/passdb/secrets.c b/source3/passdb/secrets.c
index b93ea74d8bd..d30b13c3b6e 100644
--- a/source3/passdb/secrets.c
+++ b/source3/passdb/secrets.c
@@ -324,7 +324,7 @@ BOOL secrets_store_trust_account_password(const char *domain, uint8 new_pwd[16])
**/
BOOL secrets_store_trusted_domain_password(const char* domain, smb_ucs2_t *uni_dom_name,
- size_t uni_name_len, char* pwd,
+ size_t uni_name_len, const char* pwd,
DOM_SID sid)
{
struct trusted_dom_pass pass;
diff --git a/source3/passdb/util_sam_sid.c b/source3/passdb/util_sam_sid.c
index 0881531db81..6a7675a12aa 100644
--- a/source3/passdb/util_sam_sid.c
+++ b/source3/passdb/util_sam_sid.c
@@ -27,14 +27,14 @@
typedef struct _known_sid_users {
uint32 rid;
enum SID_NAME_USE sid_name_use;
- char *known_user_name;
+ const char *known_user_name;
} known_sid_users;
static struct sid_name_map_info
{
DOM_SID *sid;
- char *name;
- known_sid_users *known_users;
+ const char *name;
+ const known_sid_users *known_users;
} sid_name_map[MAX_SID_NAMES];
extern DOM_SID global_sid_Builtin; /* Local well-known domain */
@@ -46,16 +46,16 @@ extern DOM_SID global_sid_NT_Authority; /* NT Authority */
static BOOL sid_name_map_initialized = False;
/* static known_sid_users no_users[] = {{0, 0, NULL}}; */
-static known_sid_users everyone_users[] = {
+static const known_sid_users everyone_users[] = {
{ 0, SID_NAME_WKN_GRP, "Everyone" },
{0, (enum SID_NAME_USE)0, NULL}};
-static known_sid_users creator_owner_users[] = {
+static const known_sid_users creator_owner_users[] = {
{ 0, SID_NAME_WKN_GRP, "Creator Owner" },
{ 1, SID_NAME_WKN_GRP, "Creator Group" },
{0, (enum SID_NAME_USE)0, NULL}};
-static known_sid_users nt_authority_users[] = {
+static const known_sid_users nt_authority_users[] = {
{ 1, SID_NAME_ALIAS, "Dialup" },
{ 2, SID_NAME_ALIAS, "Network"},
{ 3, SID_NAME_ALIAS, "Batch"},
@@ -68,7 +68,7 @@ static known_sid_users nt_authority_users[] = {
{ 18, SID_NAME_ALIAS, "SYSTEM"},
{ 0, (enum SID_NAME_USE)0, NULL}};
-static known_sid_users builtin_groups[] = {
+static const known_sid_users builtin_groups[] = {
{ BUILTIN_ALIAS_RID_ADMINS, SID_NAME_ALIAS, "Administrators" },
{ BUILTIN_ALIAS_RID_USERS, SID_NAME_ALIAS, "Users" },
{ BUILTIN_ALIAS_RID_GUESTS, SID_NAME_ALIAS, "Guests" },
@@ -284,7 +284,7 @@ BOOL map_name_to_wellknown_sid(DOM_SID *sid, enum SID_NAME_USE *use, const char
init_sid_name_map();
for (i=0; sid_name_map[i].sid != NULL; i++) {
- known_sid_users *users = sid_name_map[i].known_users;
+ const known_sid_users *users = sid_name_map[i].known_users;
if (users == NULL)
continue;
diff --git a/source3/printing/lpq_parse.c b/source3/printing/lpq_parse.c
index 59a844689c8..4b91b8ac9a1 100644
--- a/source3/printing/lpq_parse.c
+++ b/source3/printing/lpq_parse.c
@@ -20,7 +20,7 @@
#include "includes.h"
-static char *Months[13] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun",
+static const char *Months[13] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "Err"};
@@ -947,9 +947,9 @@ static BOOL parse_lpq_os2(char *line,print_queue_struct *buf,BOOL first)
return(True);
}
-static char *stat0_strings[] = { "enabled", "online", "idle", "no entries", "free", "ready", NULL };
-static char *stat1_strings[] = { "offline", "disabled", "down", "off", "waiting", "no daemon", NULL };
-static char *stat2_strings[] = { "jam", "paper", "error", "responding", "not accepting", "not running", "turned off", NULL };
+static const char *stat0_strings[] = { "enabled", "online", "idle", "no entries", "free", "ready", NULL };
+static const char *stat1_strings[] = { "offline", "disabled", "down", "off", "waiting", "no daemon", NULL };
+static const char *stat2_strings[] = { "jam", "paper", "error", "responding", "not accepting", "not running", "turned off", NULL };
#ifdef DEVELOPER
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index 31f480a4ddd..f04992ac82a 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -77,7 +77,7 @@ STANDARD_MAPPING printserver_std_mapping = {
forms it wants and in the ORDER it wants them (note: DEVMODE papersize is an
array index). Letter is always first, so (for the current code) additions
always put things in the correct order. */
-static nt_forms_struct default_forms[] = {
+static const nt_forms_struct default_forms[] = {
{"Letter",0x1,0x34b5c,0x44368,0x0,0x0,0x34b5c,0x44368},
{"Letter Small",0x1,0x34b5c,0x44368,0x0,0x0,0x34b5c,0x44368},
{"Tabloid",0x1,0x44368,0x696b8,0x0,0x0,0x44368,0x696b8},
@@ -264,7 +264,7 @@ static BOOL upgrade_to_version_3(void)
BOOL nt_printing_init(void)
{
static pid_t local_pid;
- char *vstring = "INFO/version";
+ const char *vstring = "INFO/version";
if (tdb_drivers && tdb_printers && tdb_forms && local_pid == sys_getpid())
return True;
@@ -635,7 +635,7 @@ get the nt drivers list
traverse the database and look-up the matching names
****************************************************************************/
-int get_ntdrivers(fstring **list, char *architecture, uint32 version)
+int get_ntdrivers(fstring **list, const char *architecture, uint32 version)
{
int total=0;
fstring short_archi;
@@ -668,11 +668,11 @@ int get_ntdrivers(fstring **list, char *architecture, uint32 version)
function to do the mapping between the long architecture name and
the short one.
****************************************************************************/
-BOOL get_short_archi(char *short_archi, char *long_archi)
+BOOL get_short_archi(char *short_archi, const char *long_archi)
{
struct table {
- char *long_archi;
- char *short_archi;
+ const char *long_archi;
+ const char *short_archi;
};
struct table archi_table[]=
@@ -1714,7 +1714,7 @@ static uint32 add_a_printer_driver_6(NT_PRINTER_DRIVER_INFO_LEVEL_6 *driver)
/****************************************************************************
****************************************************************************/
-static WERROR get_a_printer_driver_3_default(NT_PRINTER_DRIVER_INFO_LEVEL_3 **info_ptr, fstring driver, fstring arch)
+static WERROR get_a_printer_driver_3_default(NT_PRINTER_DRIVER_INFO_LEVEL_3 **info_ptr, const char *driver, const char *arch)
{
NT_PRINTER_DRIVER_INFO_LEVEL_3 info;
@@ -1741,7 +1741,7 @@ static WERROR get_a_printer_driver_3_default(NT_PRINTER_DRIVER_INFO_LEVEL_3 **in
/****************************************************************************
****************************************************************************/
-static WERROR get_a_printer_driver_3(NT_PRINTER_DRIVER_INFO_LEVEL_3 **info_ptr, fstring drivername, fstring arch, uint32 version)
+static WERROR get_a_printer_driver_3(NT_PRINTER_DRIVER_INFO_LEVEL_3 **info_ptr, fstring drivername, const char *arch, uint32 version)
{
NT_PRINTER_DRIVER_INFO_LEVEL_3 driver;
TDB_DATA kbuf, dbuf;
@@ -2314,7 +2314,7 @@ int unpack_devicemode(NT_DEVICEMODE **nt_devmode, char *buf, int buflen)
allocate and initialize a new slot in
***************************************************************************/
-static int add_new_printer_key( NT_PRINTER_DATA *data, char *name )
+static int add_new_printer_key( NT_PRINTER_DATA *data, const char *name )
{
NT_PRINTER_KEY *d;
int key_index;
@@ -2348,7 +2348,7 @@ static int add_new_printer_key( NT_PRINTER_DATA *data, char *name )
search for a registry key name in the existing printer data
***************************************************************************/
-int lookup_printerkey( NT_PRINTER_DATA *data, char *name )
+int lookup_printerkey( NT_PRINTER_DATA *data, const char *name )
{
int key_index = -1;
int i;
@@ -2376,7 +2376,7 @@ int lookup_printerkey( NT_PRINTER_DATA *data, char *name )
/****************************************************************************
***************************************************************************/
-uint32 get_printer_subkeys( NT_PRINTER_DATA *data, char* key, fstring **subkeys )
+uint32 get_printer_subkeys( NT_PRINTER_DATA *data, const char* key, fstring **subkeys )
{
int i, j;
int key_len;
@@ -2505,7 +2505,8 @@ static BOOL map_nt_printer_info2_to_dsspooler(NT_PRINTER_INFO_LEVEL_2 *info2)
{
REGVAL_CTR *ctr = NULL;
fstring longname;
- char *ascii_str;
+ char *allocated_string = NULL;
+ const char *ascii_str;
int i;
if ((i = lookup_printerkey(&info2->data, SPOOL_DSSPOOLER_KEY)) < 0)
@@ -2518,10 +2519,9 @@ static BOOL map_nt_printer_info2_to_dsspooler(NT_PRINTER_INFO_LEVEL_2 *info2)
get_myfullname(longname);
map_sz_into_ctr(ctr, SPOOL_REG_SERVERNAME, longname);
- asprintf(&ascii_str, "\\\\%s\\%s", longname, info2->sharename);
- map_sz_into_ctr(ctr, SPOOL_REG_UNCNAME, ascii_str);
- safe_free(ascii_str);
-
+ asprintf(&allocated_string, "\\\\%s\\%s", longname, info2->sharename);
+ map_sz_into_ctr(ctr, SPOOL_REG_UNCNAME, allocated_string);
+ SAFE_FREE(allocated_string);
map_dword_into_ctr(ctr, SPOOL_REG_VERSIONNUMBER, 4);
map_sz_into_ctr(ctr, SPOOL_REG_DRIVERNAME, info2->drivername);
@@ -2760,7 +2760,7 @@ BOOL is_printer_published(int snum, GUID *guid)
/****************************************************************************
***************************************************************************/
-WERROR delete_all_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, char *key )
+WERROR delete_all_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, const char *key )
{
NT_PRINTER_DATA *data;
int i;
@@ -2858,7 +2858,7 @@ WERROR delete_all_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, char *key )
/****************************************************************************
***************************************************************************/
-WERROR delete_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, char *key, char *value )
+WERROR delete_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, const char *key, const char *value )
{
WERROR result = WERR_OK;
int key_index;
@@ -2885,7 +2885,7 @@ WERROR delete_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, char *key, char *value
/****************************************************************************
***************************************************************************/
-WERROR add_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, char *key, char *value,
+WERROR add_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, const char *key, const char *value,
uint32 type, uint8 *data, int real_len )
{
WERROR result = WERR_OK;
@@ -2917,7 +2917,7 @@ WERROR add_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, char *key, char *value,
/****************************************************************************
***************************************************************************/
-REGISTRY_VALUE* get_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, char *key, char *value )
+REGISTRY_VALUE* get_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, const char *key, const char *value )
{
int key_index;
@@ -3901,7 +3901,7 @@ uint32 add_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL driver, uint32 level)
/****************************************************************************
****************************************************************************/
WERROR get_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL *driver, uint32 level,
- fstring drivername, fstring architecture, uint32 version)
+ fstring drivername, const char *architecture, uint32 version)
{
WERROR result;
diff --git a/source3/printing/printing.c b/source3/printing/printing.c
index cde16461077..711d99f3947 100644
--- a/source3/printing/printing.c
+++ b/source3/printing/printing.c
@@ -165,7 +165,7 @@ static int get_queue_status(int, print_status_struct *);
BOOL print_backend_init(void)
{
- char *sversion = "INFO/version";
+ const char *sversion = "INFO/version";
pstring printing_path;
int services = lp_numservices();
int snum;
@@ -1291,10 +1291,10 @@ BOOL print_job_delete(struct current_user *user, int snum, uint32 jobid, WERROR
*errcode = WERR_ACCESS_DENIED;
/* BEGIN_ADMIN_LOG */
- sys_adminlog( LOG_ERR, (char *)
- "Permission denied-- user not allowed to delete, \
+ sys_adminlog( LOG_ERR,
+ "Permission denied-- user not allowed to delete, \
pause, or resume print job. User name: %s. Printer name: %s.",
- uidtoname(user->uid), PRINTERNAME(snum) );
+ uidtoname(user->uid), PRINTERNAME(snum) );
/* END_ADMIN_LOG */
return False;
@@ -1356,7 +1356,7 @@ BOOL print_job_pause(struct current_user *user, int snum, uint32 jobid, WERROR *
DEBUG(3, ("pause denied by security descriptor\n"));
/* BEGIN_ADMIN_LOG */
- sys_adminlog( LOG_ERR, (char *)
+ sys_adminlog( LOG_ERR,
"Permission denied-- user not allowed to delete, \
pause, or resume print job. User name: %s. Printer name: %s.",
uidtoname(user->uid), PRINTERNAME(snum) );
@@ -1407,7 +1407,7 @@ BOOL print_job_resume(struct current_user *user, int snum, uint32 jobid, WERROR
*errcode = WERR_ACCESS_DENIED;
/* BEGIN_ADMIN_LOG */
- sys_adminlog( LOG_ERR, (char *)
+ sys_adminlog( LOG_ERR,
"Permission denied-- user not allowed to delete, \
pause, or resume print job. User name: %s. Printer name: %s.",
uidtoname(user->uid), PRINTERNAME(snum) );
diff --git a/source3/registry/reg_objects.c b/source3/registry/reg_objects.c
index 3289ebfe888..9cfeb7faa97 100644
--- a/source3/registry/reg_objects.c
+++ b/source3/registry/reg_objects.c
@@ -40,7 +40,7 @@ void regsubkey_ctr_init( REGSUBKEY_CTR *ctr )
Add a new key to the array
**********************************************************************/
-int regsubkey_ctr_addkey( REGSUBKEY_CTR *ctr, char *keyname )
+int regsubkey_ctr_addkey( REGSUBKEY_CTR *ctr, const char *keyname )
{
uint32 len;
char **pp;
@@ -345,7 +345,7 @@ int regval_ctr_delvalue( REGVAL_CTR *ctr, const char *name )
No need to free memory since it is talloc'd.
**********************************************************************/
-REGISTRY_VALUE* regval_ctr_getvalue( REGVAL_CTR *ctr, char *name )
+REGISTRY_VALUE* regval_ctr_getvalue( REGVAL_CTR *ctr, const char *name )
{
int i;
diff --git a/source3/registry/reg_printing.c b/source3/registry/reg_printing.c
index a58a91a0a89..4b8eaa658ef 100644
--- a/source3/registry/reg_printing.c
+++ b/source3/registry/reg_printing.c
@@ -84,7 +84,7 @@ static char* trim_reg_path( char *path )
static int print_subpath_environments( char *key, REGSUBKEY_CTR *subkeys )
{
- char *environments[] = {
+ const char *environments[] = {
"Windows 4.0",
"Windows NT x86",
"Windows NT R4000",
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index 632dd30c3a8..0b9f425bdc3 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -1006,7 +1006,7 @@ int get_pipe_index( const char *pipe_name )
check the rpc bind acknowledge response
****************************************************************************/
-char* get_pipe_name_from_index( const int pipe_index )
+const char* get_pipe_name_from_index( const int pipe_index )
{
if ( (pipe_index < 0) || (pipe_index >= PI_MAX_PIPES) )
diff --git a/source3/rpc_client/cli_spoolss.c b/source3/rpc_client/cli_spoolss.c
index 15a3db389e5..0a168d93ba8 100644
--- a/source3/rpc_client/cli_spoolss.c
+++ b/source3/rpc_client/cli_spoolss.c
@@ -275,8 +275,8 @@ static void decode_printerdriverdir_1 (TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer,
********************************************************************************/
WERROR cli_spoolss_open_printer_ex(struct cli_state *cli, TALLOC_CTX *mem_ctx,
- char *printername, char *datatype, uint32 access_required,
- char *station, char *username, POLICY_HND *pol)
+ const char *printername, const char *datatype, uint32 access_required,
+ const char *station, const char *username, POLICY_HND *pol)
{
prs_struct qbuf, rbuf;
SPOOL_Q_OPEN_PRINTER_EX q;
@@ -720,7 +720,7 @@ WERROR cli_spoolss_getprinterdriver(struct cli_state *cli,
TALLOC_CTX *mem_ctx,
uint32 offered, uint32 *needed,
POLICY_HND *pol, uint32 level,
- char *env, PRINTER_DRIVER_CTR *ctr)
+ const char *env, PRINTER_DRIVER_CTR *ctr)
{
prs_struct qbuf, rbuf;
SPOOL_Q_GETPRINTERDRIVER2 q;
@@ -799,7 +799,7 @@ WERROR cli_spoolss_getprinterdriver(struct cli_state *cli,
WERROR cli_spoolss_enumprinterdrivers (struct cli_state *cli,
TALLOC_CTX *mem_ctx,
uint32 offered, uint32 *needed,
- uint32 level, char *env,
+ uint32 level, const char *env,
uint32 *num_drivers,
PRINTER_DRIVER_CTR *ctr)
{
@@ -1067,8 +1067,8 @@ WERROR cli_spoolss_addprinterex (struct cli_state *cli, TALLOC_CTX *mem_ctx,
* the driver files
*/
WERROR cli_spoolss_deleteprinterdriver (struct cli_state *cli,
- TALLOC_CTX *mem_ctx, char *arch,
- char *driver)
+ TALLOC_CTX *mem_ctx, const char *arch,
+ const char *driver)
{
prs_struct qbuf, rbuf;
SPOOL_Q_DELETEPRINTERDRIVER q;
@@ -2163,7 +2163,7 @@ WERROR cli_spoolss_enumprinterdata(struct cli_state *cli, TALLOC_CTX *mem_ctx,
WERROR cli_spoolss_enumprinterdataex(struct cli_state *cli, TALLOC_CTX *mem_ctx,
uint32 offered, uint32 *needed,
- POLICY_HND *hnd, char *keyname,
+ POLICY_HND *hnd, const char *keyname,
REGVAL_CTR *ctr)
{
prs_struct qbuf, rbuf;
@@ -2364,7 +2364,7 @@ WERROR cli_spoolss_deleteprinterdataex(struct cli_state *cli, TALLOC_CTX *mem_ct
WERROR cli_spoolss_enumprinterkey(struct cli_state *cli, TALLOC_CTX *mem_ctx,
uint32 offered, uint32 *needed,
- POLICY_HND *hnd, char *keyname,
+ POLICY_HND *hnd, const char *keyname,
uint16 **keylist, uint32 *len)
{
prs_struct qbuf, rbuf;
diff --git a/source3/rpc_parse/parse_dfs.c b/source3/rpc_parse/parse_dfs.c
index 38633ac0f7e..ccd6d429fa8 100644
--- a/source3/rpc_parse/parse_dfs.c
+++ b/source3/rpc_parse/parse_dfs.c
@@ -41,7 +41,7 @@ void init_dfs_q_dfs_exist(DFS_Q_DFS_EXIST *q_d)
Read/write a DFS_Q_DFS_EXIST structure - dummy...
************************************************************/
-BOOL dfs_io_q_dfs_exist(char *desc, DFS_Q_DFS_EXIST *q_d, prs_struct *ps, int depth)
+BOOL dfs_io_q_dfs_exist(const char *desc, DFS_Q_DFS_EXIST *q_d, prs_struct *ps, int depth)
{
if(q_d == NULL)
return False;
@@ -55,7 +55,7 @@ BOOL dfs_io_q_dfs_exist(char *desc, DFS_Q_DFS_EXIST *q_d, prs_struct *ps, int de
Read/write a DFS_R_DFS_EXIST structure
************************************************************/
-BOOL dfs_io_r_dfs_exist(char *desc, DFS_R_DFS_EXIST *q_d, prs_struct *ps, int depth)
+BOOL dfs_io_r_dfs_exist(const char *desc, DFS_R_DFS_EXIST *q_d, prs_struct *ps, int depth)
{
if(q_d == NULL)
return False;
@@ -91,7 +91,7 @@ BOOL init_dfs_q_dfs_remove(DFS_Q_DFS_REMOVE *q_d, char *entrypath,
Read/write a DFS_Q_DFS_REMOVE structure
*******************************************************************/
-BOOL dfs_io_q_dfs_remove(char *desc, DFS_Q_DFS_REMOVE *q_d, prs_struct *ps, int depth)
+BOOL dfs_io_q_dfs_remove(const char *desc, DFS_Q_DFS_REMOVE *q_d, prs_struct *ps, int depth)
{
if(q_d == NULL)
return False;
@@ -131,7 +131,7 @@ BOOL dfs_io_q_dfs_remove(char *desc, DFS_Q_DFS_REMOVE *q_d, prs_struct *ps, int
Read/write a DFS_R_DFS_REMOVE structure
*******************************************************************/
-BOOL dfs_io_r_dfs_remove(char *desc, DFS_R_DFS_REMOVE *r_d, prs_struct *ps, int depth)
+BOOL dfs_io_r_dfs_remove(const char *desc, DFS_R_DFS_REMOVE *r_d, prs_struct *ps, int depth)
{
if(r_d == NULL)
return False;
@@ -172,7 +172,7 @@ BOOL init_dfs_q_dfs_add(DFS_Q_DFS_ADD *q_d, char *entrypath, char *servername,
Read/write a DFS_Q_DFS_ADD structure
************************************************************/
-BOOL dfs_io_q_dfs_add(char *desc, DFS_Q_DFS_ADD *q_d, prs_struct *ps, int depth)
+BOOL dfs_io_q_dfs_add(const char *desc, DFS_Q_DFS_ADD *q_d, prs_struct *ps, int depth)
{
if(q_d == NULL)
return False;
@@ -217,7 +217,7 @@ BOOL dfs_io_q_dfs_add(char *desc, DFS_Q_DFS_ADD *q_d, prs_struct *ps, int depth)
Read/write a DFS_R_DFS_ADD structure
************************************************************/
-BOOL dfs_io_r_dfs_add(char *desc, DFS_R_DFS_ADD *r_d, prs_struct *ps, int depth)
+BOOL dfs_io_r_dfs_add(const char *desc, DFS_R_DFS_ADD *r_d, prs_struct *ps, int depth)
{
if(r_d == NULL)
return False;
@@ -248,7 +248,7 @@ BOOL init_dfs_q_dfs_get_info(DFS_Q_DFS_GET_INFO *q_d, char *entrypath,
Read/write a DFS_Q_GET_INFO structure
************************************************************/
-BOOL dfs_io_q_dfs_get_info(char* desc, DFS_Q_DFS_GET_INFO* q_i, prs_struct* ps, int depth)
+BOOL dfs_io_q_dfs_get_info(const char *desc, DFS_Q_DFS_GET_INFO* q_i, prs_struct* ps, int depth)
{
if(q_i == NULL)
return False;
@@ -288,7 +288,7 @@ BOOL dfs_io_q_dfs_get_info(char* desc, DFS_Q_DFS_GET_INFO* q_i, prs_struct* ps,
Read/write a DFS_R_GET_INFO structure
************************************************************/
-BOOL dfs_io_r_dfs_get_info(char* desc, DFS_R_DFS_GET_INFO* r_i, prs_struct* ps, int depth)
+BOOL dfs_io_r_dfs_get_info(const char *desc, DFS_R_DFS_GET_INFO* r_i, prs_struct* ps, int depth)
{
if(r_i == NULL)
return False;
@@ -327,7 +327,7 @@ BOOL init_dfs_q_dfs_enum(DFS_Q_DFS_ENUM *q_d, uint32 level, DFS_INFO_CTR *ctr)
Read or write the DFS_Q_DFS_ENUM structure
************************************************************/
-BOOL dfs_io_q_dfs_enum(char *desc, DFS_Q_DFS_ENUM *q_d, prs_struct *ps, int depth)
+BOOL dfs_io_q_dfs_enum(const char *desc, DFS_Q_DFS_ENUM *q_d, prs_struct *ps, int depth)
{
if(q_d == NULL)
return False;
@@ -364,7 +364,7 @@ BOOL dfs_io_q_dfs_enum(char *desc, DFS_Q_DFS_ENUM *q_d, prs_struct *ps, int dept
Read/write a DFS_INFO_CTR structure
************************************************************/
-BOOL dfs_io_dfs_info_ctr(char* desc, DFS_INFO_CTR* ctr, uint32 num_entries, uint32 level, prs_struct* ps, int depth)
+BOOL dfs_io_dfs_info_ctr(const char *desc, DFS_INFO_CTR* ctr, uint32 num_entries, uint32 level, prs_struct* ps, int depth)
{
int i=0;
@@ -464,7 +464,7 @@ BOOL dfs_io_dfs_info_ctr(char* desc, DFS_INFO_CTR* ctr, uint32 num_entries, uint
Read/write a DFS_R_DFS_ENUM structure
************************************************************/
-BOOL dfs_io_r_dfs_enum(char *desc, DFS_R_DFS_ENUM *q_d, prs_struct *ps, int depth)
+BOOL dfs_io_r_dfs_enum(const char *desc, DFS_R_DFS_ENUM *q_d, prs_struct *ps, int depth)
{
DFS_INFO_CTR *ctr;
if(q_d == NULL)
@@ -506,7 +506,7 @@ BOOL dfs_io_r_dfs_enum(char *desc, DFS_R_DFS_ENUM *q_d, prs_struct *ps, int dept
return True;
}
-BOOL dfs_io_dfs_storage_info(char *desc, DFS_INFO_3* info3, prs_struct *ps, int depth)
+BOOL dfs_io_dfs_storage_info(const char *desc, DFS_INFO_3* info3, prs_struct *ps, int depth)
{
int i=0;
if(info3 == NULL)
diff --git a/source3/rpc_parse/parse_ds.c b/source3/rpc_parse/parse_ds.c
index 3c70cabc713..ab076318317 100644
--- a/source3/rpc_parse/parse_ds.c
+++ b/source3/rpc_parse/parse_ds.c
@@ -20,7 +20,7 @@
#include "includes.h"
-static BOOL ds_io_dominfobasic( char *desc, prs_struct *ps, int depth, DSROLE_PRIMARY_DOMAIN_INFO_BASIC **basic)
+static BOOL ds_io_dominfobasic( const char *desc, prs_struct *ps, int depth, DSROLE_PRIMARY_DOMAIN_INFO_BASIC **basic)
{
DSROLE_PRIMARY_DOMAIN_INFO_BASIC *p = *basic;
@@ -68,7 +68,7 @@ static BOOL ds_io_dominfobasic( char *desc, prs_struct *ps, int depth, DSROLE_PR
}
-BOOL ds_io_q_getprimdominfo( char *desc, DS_Q_GETPRIMDOMINFO *q_u, prs_struct *ps, int depth)
+BOOL ds_io_q_getprimdominfo( const char *desc, DS_Q_GETPRIMDOMINFO *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "ds_io_q_getprimdominfo");
depth++;
@@ -82,7 +82,7 @@ BOOL ds_io_q_getprimdominfo( char *desc, DS_Q_GETPRIMDOMINFO *q_u, prs_struct *p
return True;
}
-BOOL ds_io_r_getprimdominfo( char *desc, DS_R_GETPRIMDOMINFO *r_u, prs_struct *ps, int depth)
+BOOL ds_io_r_getprimdominfo( const char *desc, DS_R_GETPRIMDOMINFO *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "ds_io_r_getprimdominfo");
depth++;
diff --git a/source3/rpc_parse/parse_lsa.c b/source3/rpc_parse/parse_lsa.c
index 375bbd31d74..56398e7cf06 100644
--- a/source3/rpc_parse/parse_lsa.c
+++ b/source3/rpc_parse/parse_lsa.c
@@ -27,14 +27,14 @@
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_RPC_PARSE
-static BOOL lsa_io_trans_names(char *desc, LSA_TRANS_NAME_ENUM *trn, prs_struct *ps, int depth);
+static BOOL lsa_io_trans_names(const char *desc, LSA_TRANS_NAME_ENUM *trn, prs_struct *ps, int depth);
/*******************************************************************
Inits a LSA_TRANS_NAME structure.
********************************************************************/
void init_lsa_trans_name(LSA_TRANS_NAME *trn, UNISTR2 *uni_name,
- uint16 sid_name_use, char *name, uint32 idx)
+ uint16 sid_name_use, const char *name, uint32 idx)
{
int len_name = strlen(name);
@@ -51,7 +51,7 @@ void init_lsa_trans_name(LSA_TRANS_NAME *trn, UNISTR2 *uni_name,
Reads or writes a LSA_TRANS_NAME structure.
********************************************************************/
-static BOOL lsa_io_trans_name(char *desc, LSA_TRANS_NAME *trn, prs_struct *ps,
+static BOOL lsa_io_trans_name(const char *desc, LSA_TRANS_NAME *trn, prs_struct *ps,
int depth)
{
prs_debug(ps, depth, desc, "lsa_io_trans_name");
@@ -77,7 +77,7 @@ static BOOL lsa_io_trans_name(char *desc, LSA_TRANS_NAME *trn, prs_struct *ps,
Reads or writes a DOM_R_REF structure.
********************************************************************/
-static BOOL lsa_io_dom_r_ref(char *desc, DOM_R_REF *r_r, prs_struct *ps,
+static BOOL lsa_io_dom_r_ref(const char *desc, DOM_R_REF *r_r, prs_struct *ps,
int depth)
{
int i;
@@ -156,7 +156,7 @@ void init_lsa_sec_qos(LSA_SEC_QOS *qos, uint16 imp_lev, uint8 ctxt, uint8 eff)
Reads or writes an LSA_SEC_QOS structure.
********************************************************************/
-static BOOL lsa_io_sec_qos(char *desc, LSA_SEC_QOS *qos, prs_struct *ps,
+static BOOL lsa_io_sec_qos(const char *desc, LSA_SEC_QOS *qos, prs_struct *ps,
int depth)
{
uint32 start;
@@ -216,7 +216,7 @@ static void init_lsa_obj_attr(LSA_OBJ_ATTR *attr, uint32 attributes, LSA_SEC_QOS
Reads or writes an LSA_OBJ_ATTR structure.
********************************************************************/
-static BOOL lsa_io_obj_attr(char *desc, LSA_OBJ_ATTR *attr, prs_struct *ps,
+static BOOL lsa_io_obj_attr(const char *desc, LSA_OBJ_ATTR *attr, prs_struct *ps,
int depth)
{
uint32 start;
@@ -290,7 +290,7 @@ void init_q_open_pol(LSA_Q_OPEN_POL *r_q, uint16 system_name,
Reads or writes an LSA_Q_OPEN_POL structure.
********************************************************************/
-BOOL lsa_io_q_open_pol(char *desc, LSA_Q_OPEN_POL *r_q, prs_struct *ps,
+BOOL lsa_io_q_open_pol(const char *desc, LSA_Q_OPEN_POL *r_q, prs_struct *ps,
int depth)
{
prs_debug(ps, depth, desc, "lsa_io_q_open_pol");
@@ -316,7 +316,7 @@ BOOL lsa_io_q_open_pol(char *desc, LSA_Q_OPEN_POL *r_q, prs_struct *ps,
Reads or writes an LSA_R_OPEN_POL structure.
********************************************************************/
-BOOL lsa_io_r_open_pol(char *desc, LSA_R_OPEN_POL *r_p, prs_struct *ps,
+BOOL lsa_io_r_open_pol(const char *desc, LSA_R_OPEN_POL *r_p, prs_struct *ps,
int depth)
{
prs_debug(ps, depth, desc, "lsa_io_r_open_pol");
@@ -335,7 +335,7 @@ BOOL lsa_io_r_open_pol(char *desc, LSA_R_OPEN_POL *r_p, prs_struct *ps,
Inits an LSA_Q_OPEN_POL2 structure.
********************************************************************/
-void init_q_open_pol2(LSA_Q_OPEN_POL2 *r_q, char *server_name,
+void init_q_open_pol2(LSA_Q_OPEN_POL2 *r_q, const char *server_name,
uint32 attributes, uint32 desired_access,
LSA_SEC_QOS *qos)
{
@@ -356,7 +356,7 @@ void init_q_open_pol2(LSA_Q_OPEN_POL2 *r_q, char *server_name,
Reads or writes an LSA_Q_OPEN_POL2 structure.
********************************************************************/
-BOOL lsa_io_q_open_pol2(char *desc, LSA_Q_OPEN_POL2 *r_q, prs_struct *ps,
+BOOL lsa_io_q_open_pol2(const char *desc, LSA_Q_OPEN_POL2 *r_q, prs_struct *ps,
int depth)
{
prs_debug(ps, depth, desc, "lsa_io_q_open_pol2");
@@ -380,7 +380,7 @@ BOOL lsa_io_q_open_pol2(char *desc, LSA_Q_OPEN_POL2 *r_q, prs_struct *ps,
Reads or writes an LSA_R_OPEN_POL2 structure.
********************************************************************/
-BOOL lsa_io_r_open_pol2(char *desc, LSA_R_OPEN_POL2 *r_p, prs_struct *ps,
+BOOL lsa_io_r_open_pol2(const char *desc, LSA_R_OPEN_POL2 *r_p, prs_struct *ps,
int depth)
{
prs_debug(ps, depth, desc, "lsa_io_r_open_pol2");
@@ -414,7 +414,7 @@ void init_q_query_sec_obj(LSA_Q_QUERY_SEC_OBJ *q_q, const POLICY_HND *hnd,
Reads or writes an LSA_Q_QUERY_SEC_OBJ structure.
********************************************************************/
-BOOL lsa_io_q_query_sec_obj(char *desc, LSA_Q_QUERY_SEC_OBJ *q_q,
+BOOL lsa_io_q_query_sec_obj(const char *desc, LSA_Q_QUERY_SEC_OBJ *q_q,
prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_q_query_sec_obj");
@@ -433,7 +433,7 @@ BOOL lsa_io_q_query_sec_obj(char *desc, LSA_Q_QUERY_SEC_OBJ *q_q,
Reads or writes a LSA_R_QUERY_SEC_OBJ structure.
********************************************************************/
-BOOL lsa_io_r_query_sec_obj(char *desc, LSA_R_QUERY_SEC_OBJ *r_u,
+BOOL lsa_io_r_query_sec_obj(const char *desc, LSA_R_QUERY_SEC_OBJ *r_u,
prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_r_query_sec_obj");
@@ -473,7 +473,7 @@ void init_q_query(LSA_Q_QUERY_INFO *q_q, POLICY_HND *hnd, uint16 info_class)
Reads or writes an LSA_Q_QUERY_INFO structure.
********************************************************************/
-BOOL lsa_io_q_query(char *desc, LSA_Q_QUERY_INFO *q_q, prs_struct *ps,
+BOOL lsa_io_q_query(const char *desc, LSA_Q_QUERY_INFO *q_q, prs_struct *ps,
int depth)
{
prs_debug(ps, depth, desc, "lsa_io_q_query");
@@ -507,7 +507,7 @@ BOOL init_q_enum_trust_dom(LSA_Q_ENUM_TRUST_DOM * q_e, POLICY_HND *pol,
Reads or writes an LSA_Q_ENUM_TRUST_DOM structure.
********************************************************************/
-BOOL lsa_io_q_enum_trust_dom(char *desc, LSA_Q_ENUM_TRUST_DOM *q_e,
+BOOL lsa_io_q_enum_trust_dom(const char *desc, LSA_Q_ENUM_TRUST_DOM *q_e,
prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_q_enum_trust_dom");
@@ -580,7 +580,7 @@ void init_r_enum_trust_dom(TALLOC_CTX *ctx, LSA_R_ENUM_TRUST_DOM *r_e, uint32 en
Reads or writes an LSA_R_ENUM_TRUST_DOM structure.
********************************************************************/
-BOOL lsa_io_r_enum_trust_dom(char *desc, LSA_R_ENUM_TRUST_DOM *r_e,
+BOOL lsa_io_r_enum_trust_dom(const char *desc, LSA_R_ENUM_TRUST_DOM *r_e,
prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_r_enum_trust_dom");
@@ -639,7 +639,7 @@ BOOL lsa_io_r_enum_trust_dom(char *desc, LSA_R_ENUM_TRUST_DOM *r_e,
reads or writes a dom query structure.
********************************************************************/
-static BOOL lsa_io_dom_query(char *desc, DOM_QUERY *d_q, prs_struct *ps, int depth)
+static BOOL lsa_io_dom_query(const char *desc, DOM_QUERY *d_q, prs_struct *ps, int depth)
{
if (d_q == NULL)
return False;
@@ -680,7 +680,7 @@ static BOOL lsa_io_dom_query(char *desc, DOM_QUERY *d_q, prs_struct *ps, int dep
reads or writes a structure.
********************************************************************/
-static BOOL lsa_io_dom_query_2(char *desc, DOM_QUERY_2 *d_q, prs_struct *ps, int depth)
+static BOOL lsa_io_dom_query_2(const char *desc, DOM_QUERY_2 *d_q, prs_struct *ps, int depth)
{
uint32 ptr = 1;
@@ -721,7 +721,7 @@ static BOOL lsa_io_dom_query_2(char *desc, DOM_QUERY_2 *d_q, prs_struct *ps, int
Reads or writes a dom query structure.
********************************************************************/
-static BOOL lsa_io_dom_query_3(char *desc, DOM_QUERY_3 *d_q, prs_struct *ps, int depth)
+static BOOL lsa_io_dom_query_3(const char *desc, DOM_QUERY_3 *d_q, prs_struct *ps, int depth)
{
return lsa_io_dom_query("", d_q, ps, depth);
}
@@ -730,7 +730,7 @@ static BOOL lsa_io_dom_query_3(char *desc, DOM_QUERY_3 *d_q, prs_struct *ps, int
Reads or writes a dom query structure.
********************************************************************/
-static BOOL lsa_io_dom_query_5(char *desc, DOM_QUERY_5 *d_q, prs_struct *ps, int depth)
+static BOOL lsa_io_dom_query_5(const char *desc, DOM_QUERY_5 *d_q, prs_struct *ps, int depth)
{
return lsa_io_dom_query("", d_q, ps, depth);
}
@@ -739,7 +739,7 @@ static BOOL lsa_io_dom_query_5(char *desc, DOM_QUERY_5 *d_q, prs_struct *ps, int
Reads or writes a dom query structure.
********************************************************************/
-static BOOL lsa_io_dom_query_6(char *desc, DOM_QUERY_6 *d_q, prs_struct *ps, int depth)
+static BOOL lsa_io_dom_query_6(const char *desc, DOM_QUERY_6 *d_q, prs_struct *ps, int depth)
{
if (d_q == NULL)
return False;
@@ -757,7 +757,7 @@ static BOOL lsa_io_dom_query_6(char *desc, DOM_QUERY_6 *d_q, prs_struct *ps, int
Reads or writes an LSA_R_QUERY_INFO structure.
********************************************************************/
-BOOL lsa_io_r_query(char *desc, LSA_R_QUERY_INFO *r_q, prs_struct *ps,
+BOOL lsa_io_r_query(const char *desc, LSA_R_QUERY_INFO *r_q, prs_struct *ps,
int depth)
{
prs_debug(ps, depth, desc, "lsa_io_r_query");
@@ -848,7 +848,7 @@ static void init_lsa_sid_enum(TALLOC_CTX *mem_ctx, LSA_SID_ENUM *sen,
Reads or writes a LSA_SID_ENUM structure.
********************************************************************/
-static BOOL lsa_io_sid_enum(char *desc, LSA_SID_ENUM *sen, prs_struct *ps,
+static BOOL lsa_io_sid_enum(const char *desc, LSA_SID_ENUM *sen, prs_struct *ps,
int depth)
{
int i;
@@ -936,7 +936,7 @@ void init_q_lookup_sids(TALLOC_CTX *mem_ctx, LSA_Q_LOOKUP_SIDS *q_l,
Reads or writes a LSA_Q_LOOKUP_SIDS structure.
********************************************************************/
-BOOL lsa_io_q_lookup_sids(char *desc, LSA_Q_LOOKUP_SIDS *q_s, prs_struct *ps,
+BOOL lsa_io_q_lookup_sids(const char *desc, LSA_Q_LOOKUP_SIDS *q_s, prs_struct *ps,
int depth)
{
prs_debug(ps, depth, desc, "lsa_io_q_lookup_sids");
@@ -964,7 +964,7 @@ BOOL lsa_io_q_lookup_sids(char *desc, LSA_Q_LOOKUP_SIDS *q_s, prs_struct *ps,
Reads or writes a structure.
********************************************************************/
-static BOOL lsa_io_trans_names(char *desc, LSA_TRANS_NAME_ENUM *trn,
+static BOOL lsa_io_trans_names(const char *desc, LSA_TRANS_NAME_ENUM *trn,
prs_struct *ps, int depth)
{
int i;
@@ -1025,7 +1025,7 @@ static BOOL lsa_io_trans_names(char *desc, LSA_TRANS_NAME_ENUM *trn,
Reads or writes a structure.
********************************************************************/
-BOOL lsa_io_r_lookup_sids(char *desc, LSA_R_LOOKUP_SIDS *r_s,
+BOOL lsa_io_r_lookup_sids(const char *desc, LSA_R_LOOKUP_SIDS *r_s,
prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_r_lookup_sids");
@@ -1099,7 +1099,7 @@ void init_q_lookup_names(TALLOC_CTX *mem_ctx, LSA_Q_LOOKUP_NAMES *q_l,
reads or writes a structure.
********************************************************************/
-BOOL lsa_io_q_lookup_names(char *desc, LSA_Q_LOOKUP_NAMES *q_r,
+BOOL lsa_io_q_lookup_names(const char *desc, LSA_Q_LOOKUP_NAMES *q_r,
prs_struct *ps, int depth)
{
int i;
@@ -1163,7 +1163,7 @@ BOOL lsa_io_q_lookup_names(char *desc, LSA_Q_LOOKUP_NAMES *q_r,
reads or writes a structure.
********************************************************************/
-BOOL lsa_io_r_lookup_names(char *desc, LSA_R_LOOKUP_NAMES *r_r,
+BOOL lsa_io_r_lookup_names(const char *desc, LSA_R_LOOKUP_NAMES *r_r,
prs_struct *ps, int depth)
{
int i;
@@ -1233,7 +1233,7 @@ void init_lsa_q_close(LSA_Q_CLOSE *q_c, POLICY_HND *hnd)
Reads or writes an LSA_Q_CLOSE structure.
********************************************************************/
-BOOL lsa_io_q_close(char *desc, LSA_Q_CLOSE *q_c, prs_struct *ps, int depth)
+BOOL lsa_io_q_close(const char *desc, LSA_Q_CLOSE *q_c, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_q_close");
depth++;
@@ -1248,7 +1248,7 @@ BOOL lsa_io_q_close(char *desc, LSA_Q_CLOSE *q_c, prs_struct *ps, int depth)
Reads or writes an LSA_R_CLOSE structure.
********************************************************************/
-BOOL lsa_io_r_close(char *desc, LSA_R_CLOSE *r_c, prs_struct *ps, int depth)
+BOOL lsa_io_r_close(const char *desc, LSA_R_CLOSE *r_c, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_r_close");
depth++;
@@ -1266,7 +1266,7 @@ BOOL lsa_io_r_close(char *desc, LSA_R_CLOSE *r_c, prs_struct *ps, int depth)
Reads or writes an LSA_Q_OPEN_SECRET structure.
********************************************************************/
-BOOL lsa_io_q_open_secret(char *desc, LSA_Q_OPEN_SECRET *q_c, prs_struct *ps, int depth)
+BOOL lsa_io_q_open_secret(const char *desc, LSA_Q_OPEN_SECRET *q_c, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_q_open_secret");
depth++;
@@ -1279,7 +1279,7 @@ BOOL lsa_io_q_open_secret(char *desc, LSA_Q_OPEN_SECRET *q_c, prs_struct *ps, in
Reads or writes an LSA_R_OPEN_SECRET structure.
********************************************************************/
-BOOL lsa_io_r_open_secret(char *desc, LSA_R_OPEN_SECRET *r_c, prs_struct *ps, int depth)
+BOOL lsa_io_r_open_secret(const char *desc, LSA_R_OPEN_SECRET *r_c, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_r_open_secret");
depth++;
@@ -1318,7 +1318,7 @@ void init_q_enum_privs(LSA_Q_ENUM_PRIVS *q_q, POLICY_HND *hnd, uint32 enum_conte
/*******************************************************************
reads or writes a structure.
********************************************************************/
-BOOL lsa_io_q_enum_privs(char *desc, LSA_Q_ENUM_PRIVS *q_q, prs_struct *ps, int depth)
+BOOL lsa_io_q_enum_privs(const char *desc, LSA_Q_ENUM_PRIVS *q_q, prs_struct *ps, int depth)
{
if (q_q == NULL)
return False;
@@ -1340,7 +1340,7 @@ BOOL lsa_io_q_enum_privs(char *desc, LSA_Q_ENUM_PRIVS *q_q, prs_struct *ps, int
/*******************************************************************
reads or writes a structure.
********************************************************************/
-static BOOL lsa_io_priv_entries(char *desc, LSA_PRIV_ENTRY *entries, uint32 count, prs_struct *ps, int depth)
+static BOOL lsa_io_priv_entries(const char *desc, LSA_PRIV_ENTRY *entries, uint32 count, prs_struct *ps, int depth)
{
uint32 i;
@@ -1395,7 +1395,7 @@ void init_lsa_r_enum_privs(LSA_R_ENUM_PRIVS *r_u, uint32 enum_context,
/*******************************************************************
reads or writes a structure.
********************************************************************/
-BOOL lsa_io_r_enum_privs(char *desc, LSA_R_ENUM_PRIVS *r_q, prs_struct *ps, int depth)
+BOOL lsa_io_r_enum_privs(const char *desc, LSA_R_ENUM_PRIVS *r_q, prs_struct *ps, int depth)
{
if (r_q == NULL)
return False;
@@ -1434,7 +1434,7 @@ BOOL lsa_io_r_enum_privs(char *desc, LSA_R_ENUM_PRIVS *r_q, prs_struct *ps, int
return True;
}
-void init_lsa_priv_get_dispname(LSA_Q_PRIV_GET_DISPNAME *trn, POLICY_HND *hnd, char *name, uint16 lang_id, uint16 lang_id_sys)
+void init_lsa_priv_get_dispname(LSA_Q_PRIV_GET_DISPNAME *trn, POLICY_HND *hnd, const char *name, uint16 lang_id, uint16 lang_id_sys)
{
int len_name = strlen(name);
@@ -1452,7 +1452,7 @@ void init_lsa_priv_get_dispname(LSA_Q_PRIV_GET_DISPNAME *trn, POLICY_HND *hnd, c
/*******************************************************************
reads or writes a structure.
********************************************************************/
-BOOL lsa_io_q_priv_get_dispname(char *desc, LSA_Q_PRIV_GET_DISPNAME *q_q, prs_struct *ps, int depth)
+BOOL lsa_io_q_priv_get_dispname(const char *desc, LSA_Q_PRIV_GET_DISPNAME *q_q, prs_struct *ps, int depth)
{
if (q_q == NULL)
return False;
@@ -1483,7 +1483,7 @@ BOOL lsa_io_q_priv_get_dispname(char *desc, LSA_Q_PRIV_GET_DISPNAME *q_q, prs_st
/*******************************************************************
reads or writes a structure.
********************************************************************/
-BOOL lsa_io_r_priv_get_dispname(char *desc, LSA_R_PRIV_GET_DISPNAME *r_q, prs_struct *ps, int depth)
+BOOL lsa_io_r_priv_get_dispname(const char *desc, LSA_R_PRIV_GET_DISPNAME *r_q, prs_struct *ps, int depth)
{
if (r_q == NULL)
return False;
@@ -1530,7 +1530,7 @@ void init_lsa_q_enum_accounts(LSA_Q_ENUM_ACCOUNTS *trn, POLICY_HND *hnd, uint32
/*******************************************************************
reads or writes a structure.
********************************************************************/
-BOOL lsa_io_q_enum_accounts(char *desc, LSA_Q_ENUM_ACCOUNTS *q_q, prs_struct *ps, int depth)
+BOOL lsa_io_q_enum_accounts(const char *desc, LSA_Q_ENUM_ACCOUNTS *q_q, prs_struct *ps, int depth)
{
if (q_q == NULL)
return False;
@@ -1572,7 +1572,7 @@ void init_lsa_r_enum_accounts(LSA_R_ENUM_ACCOUNTS *r_u, uint32 enum_context)
/*******************************************************************
reads or writes a structure.
********************************************************************/
-BOOL lsa_io_r_enum_accounts(char *desc, LSA_R_ENUM_ACCOUNTS *r_q, prs_struct *ps, int depth)
+BOOL lsa_io_r_enum_accounts(const char *desc, LSA_R_ENUM_ACCOUNTS *r_q, prs_struct *ps, int depth)
{
if (r_q == NULL)
return False;
@@ -1603,7 +1603,7 @@ BOOL lsa_io_r_enum_accounts(char *desc, LSA_R_ENUM_ACCOUNTS *r_q, prs_struct *ps
Reads or writes an LSA_Q_UNK_GET_CONNUSER structure.
********************************************************************/
-BOOL lsa_io_q_unk_get_connuser(char *desc, LSA_Q_UNK_GET_CONNUSER *q_c, prs_struct *ps, int depth)
+BOOL lsa_io_q_unk_get_connuser(const char *desc, LSA_Q_UNK_GET_CONNUSER *q_c, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_q_unk_get_connuser");
depth++;
@@ -1635,7 +1635,7 @@ BOOL lsa_io_q_unk_get_connuser(char *desc, LSA_Q_UNK_GET_CONNUSER *q_c, prs_stru
Reads or writes an LSA_R_UNK_GET_CONNUSER structure.
********************************************************************/
-BOOL lsa_io_r_unk_get_connuser(char *desc, LSA_R_UNK_GET_CONNUSER *r_c, prs_struct *ps, int depth)
+BOOL lsa_io_r_unk_get_connuser(const char *desc, LSA_R_UNK_GET_CONNUSER *r_c, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_r_unk_get_connuser");
depth++;
@@ -1684,7 +1684,7 @@ void init_lsa_q_open_account(LSA_Q_OPENACCOUNT *trn, POLICY_HND *hnd, DOM_SID *s
Reads or writes an LSA_Q_OPENACCOUNT structure.
********************************************************************/
-BOOL lsa_io_q_open_account(char *desc, LSA_Q_OPENACCOUNT *r_c, prs_struct *ps, int depth)
+BOOL lsa_io_q_open_account(const char *desc, LSA_Q_OPENACCOUNT *r_c, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_q_open_account");
depth++;
@@ -1708,7 +1708,7 @@ BOOL lsa_io_q_open_account(char *desc, LSA_Q_OPENACCOUNT *r_c, prs_struct *ps, i
Reads or writes an LSA_R_OPENACCOUNT structure.
********************************************************************/
-BOOL lsa_io_r_open_account(char *desc, LSA_R_OPENACCOUNT *r_c, prs_struct *ps, int depth)
+BOOL lsa_io_r_open_account(const char *desc, LSA_R_OPENACCOUNT *r_c, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_r_open_account");
depth++;
@@ -1736,7 +1736,7 @@ void init_lsa_q_enum_privsaccount(LSA_Q_ENUMPRIVSACCOUNT *trn, POLICY_HND *hnd)
Reads or writes an LSA_Q_ENUMPRIVSACCOUNT structure.
********************************************************************/
-BOOL lsa_io_q_enum_privsaccount(char *desc, LSA_Q_ENUMPRIVSACCOUNT *r_c, prs_struct *ps, int depth)
+BOOL lsa_io_q_enum_privsaccount(const char *desc, LSA_Q_ENUMPRIVSACCOUNT *r_c, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_q_enum_privsaccount");
depth++;
@@ -1754,7 +1754,7 @@ BOOL lsa_io_q_enum_privsaccount(char *desc, LSA_Q_ENUMPRIVSACCOUNT *r_c, prs_str
Reads or writes an LUID structure.
********************************************************************/
-static BOOL lsa_io_luid(char *desc, LUID *r_c, prs_struct *ps, int depth)
+static BOOL lsa_io_luid(const char *desc, LUID *r_c, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_luid");
depth++;
@@ -1775,7 +1775,7 @@ static BOOL lsa_io_luid(char *desc, LUID *r_c, prs_struct *ps, int depth)
Reads or writes an LUID_ATTR structure.
********************************************************************/
-static BOOL lsa_io_luid_attr(char *desc, LUID_ATTR *r_c, prs_struct *ps, int depth)
+static BOOL lsa_io_luid_attr(const char *desc, LUID_ATTR *r_c, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_luid_attr");
depth++;
@@ -1796,7 +1796,7 @@ static BOOL lsa_io_luid_attr(char *desc, LUID_ATTR *r_c, prs_struct *ps, int dep
Reads or writes an PRIVILEGE_SET structure.
********************************************************************/
-static BOOL lsa_io_privilege_set(char *desc, PRIVILEGE_SET *r_c, prs_struct *ps, int depth)
+static BOOL lsa_io_privilege_set(const char *desc, PRIVILEGE_SET *r_c, prs_struct *ps, int depth)
{
uint32 i;
@@ -1833,7 +1833,7 @@ void init_lsa_r_enum_privsaccount(LSA_R_ENUMPRIVSACCOUNT *r_u, LUID_ATTR *set, u
Reads or writes an LSA_R_ENUMPRIVSACCOUNT structure.
********************************************************************/
-BOOL lsa_io_r_enum_privsaccount(char *desc, LSA_R_ENUMPRIVSACCOUNT *r_c, prs_struct *ps, int depth)
+BOOL lsa_io_r_enum_privsaccount(const char *desc, LSA_R_ENUMPRIVSACCOUNT *r_c, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_r_enum_privsaccount");
depth++;
@@ -1872,7 +1872,7 @@ BOOL lsa_io_r_enum_privsaccount(char *desc, LSA_R_ENUMPRIVSACCOUNT *r_c, prs_str
Reads or writes an LSA_Q_GETSYSTEMACCOUNTstructure.
********************************************************************/
-BOOL lsa_io_q_getsystemaccount(char *desc, LSA_Q_GETSYSTEMACCOUNT *r_c, prs_struct *ps, int depth)
+BOOL lsa_io_q_getsystemaccount(const char *desc, LSA_Q_GETSYSTEMACCOUNT *r_c, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_q_getsystemaccount");
depth++;
@@ -1890,7 +1890,7 @@ BOOL lsa_io_q_getsystemaccount(char *desc, LSA_Q_GETSYSTEMACCOUNT *r_c, prs_str
Reads or writes an LSA_R_GETSYSTEMACCOUNTstructure.
********************************************************************/
-BOOL lsa_io_r_getsystemaccount(char *desc, LSA_R_GETSYSTEMACCOUNT *r_c, prs_struct *ps, int depth)
+BOOL lsa_io_r_getsystemaccount(const char *desc, LSA_R_GETSYSTEMACCOUNT *r_c, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_r_getsystemaccount");
depth++;
@@ -1912,7 +1912,7 @@ BOOL lsa_io_r_getsystemaccount(char *desc, LSA_R_GETSYSTEMACCOUNT *r_c, prs_str
Reads or writes an LSA_Q_SETSYSTEMACCOUNT structure.
********************************************************************/
-BOOL lsa_io_q_setsystemaccount(char *desc, LSA_Q_SETSYSTEMACCOUNT *r_c, prs_struct *ps, int depth)
+BOOL lsa_io_q_setsystemaccount(const char *desc, LSA_Q_SETSYSTEMACCOUNT *r_c, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_q_setsystemaccount");
depth++;
@@ -1933,7 +1933,7 @@ BOOL lsa_io_q_setsystemaccount(char *desc, LSA_Q_SETSYSTEMACCOUNT *r_c, prs_str
Reads or writes an LSA_R_SETSYSTEMACCOUNT structure.
********************************************************************/
-BOOL lsa_io_r_setsystemaccount(char *desc, LSA_R_SETSYSTEMACCOUNT *r_c, prs_struct *ps, int depth)
+BOOL lsa_io_r_setsystemaccount(const char *desc, LSA_R_SETSYSTEMACCOUNT *r_c, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_r_setsystemaccount");
depth++;
@@ -1948,7 +1948,7 @@ BOOL lsa_io_r_setsystemaccount(char *desc, LSA_R_SETSYSTEMACCOUNT *r_c, prs_str
}
-void init_lsa_q_lookupprivvalue(LSA_Q_LOOKUPPRIVVALUE *trn, POLICY_HND *hnd, char *name)
+void init_lsa_q_lookupprivvalue(LSA_Q_LOOKUPPRIVVALUE *trn, POLICY_HND *hnd, const char *name)
{
int len_name = strlen(name);
memcpy(&trn->pol, hnd, sizeof(trn->pol));
@@ -1964,7 +1964,7 @@ void init_lsa_q_lookupprivvalue(LSA_Q_LOOKUPPRIVVALUE *trn, POLICY_HND *hnd, cha
Reads or writes an LSA_Q_LOOKUPPRIVVALUE structure.
********************************************************************/
-BOOL lsa_io_q_lookupprivvalue(char *desc, LSA_Q_LOOKUPPRIVVALUE *r_c, prs_struct *ps, int depth)
+BOOL lsa_io_q_lookupprivvalue(const char *desc, LSA_Q_LOOKUPPRIVVALUE *r_c, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_q_lookupprivvalue");
depth++;
@@ -1986,7 +1986,7 @@ BOOL lsa_io_q_lookupprivvalue(char *desc, LSA_Q_LOOKUPPRIVVALUE *r_c, prs_struc
Reads or writes an LSA_R_LOOKUPPRIVVALUE structure.
********************************************************************/
-BOOL lsa_io_r_lookupprivvalue(char *desc, LSA_R_LOOKUPPRIVVALUE *r_c, prs_struct *ps, int depth)
+BOOL lsa_io_r_lookupprivvalue(const char *desc, LSA_R_LOOKUPPRIVVALUE *r_c, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_r_lookupprivvalue");
depth++;
@@ -2008,7 +2008,7 @@ BOOL lsa_io_r_lookupprivvalue(char *desc, LSA_R_LOOKUPPRIVVALUE *r_c, prs_struc
Reads or writes an LSA_Q_ADDPRIVS structure.
********************************************************************/
-BOOL lsa_io_q_addprivs(char *desc, LSA_Q_ADDPRIVS *r_c, prs_struct *ps, int depth)
+BOOL lsa_io_q_addprivs(const char *desc, LSA_Q_ADDPRIVS *r_c, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_q_addprivs");
depth++;
@@ -2037,7 +2037,7 @@ BOOL lsa_io_q_addprivs(char *desc, LSA_Q_ADDPRIVS *r_c, prs_struct *ps, int dept
Reads or writes an LSA_R_ADDPRIVS structure.
********************************************************************/
-BOOL lsa_io_r_addprivs(char *desc, LSA_R_ADDPRIVS *r_c, prs_struct *ps, int depth)
+BOOL lsa_io_r_addprivs(const char *desc, LSA_R_ADDPRIVS *r_c, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_r_addprivs");
depth++;
@@ -2055,7 +2055,7 @@ BOOL lsa_io_r_addprivs(char *desc, LSA_R_ADDPRIVS *r_c, prs_struct *ps, int dept
Reads or writes an LSA_Q_REMOVEPRIVS structure.
********************************************************************/
-BOOL lsa_io_q_removeprivs(char *desc, LSA_Q_REMOVEPRIVS *r_c, prs_struct *ps, int depth)
+BOOL lsa_io_q_removeprivs(const char *desc, LSA_Q_REMOVEPRIVS *r_c, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_q_removeprivs");
depth++;
@@ -2097,7 +2097,7 @@ BOOL lsa_io_q_removeprivs(char *desc, LSA_Q_REMOVEPRIVS *r_c, prs_struct *ps, in
Reads or writes an LSA_R_REMOVEPRIVS structure.
********************************************************************/
-BOOL lsa_io_r_removeprivs(char *desc, LSA_R_REMOVEPRIVS *r_c, prs_struct *ps, int depth)
+BOOL lsa_io_r_removeprivs(const char *desc, LSA_R_REMOVEPRIVS *r_c, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_r_removeprivs");
depth++;
@@ -2123,7 +2123,7 @@ BOOL policy_handle_is_valid(const POLICY_HND *hnd)
Reads or writes an LSA_DNS_DOM_INFO structure.
********************************************************************/
-BOOL lsa_io_dns_dom_info(char *desc, LSA_DNS_DOM_INFO *info,
+BOOL lsa_io_dns_dom_info(const char *desc, LSA_DNS_DOM_INFO *info,
prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_dns_dom_info");
@@ -2182,7 +2182,7 @@ void init_q_query2(LSA_Q_QUERY_INFO2 *q_q, POLICY_HND *hnd, uint16 info_class)
Reads or writes an LSA_Q_QUERY_DNSDOMINFO structure.
********************************************************************/
-BOOL lsa_io_q_query_info2(char *desc, LSA_Q_QUERY_INFO2 *q_c,
+BOOL lsa_io_q_query_info2(const char *desc, LSA_Q_QUERY_INFO2 *q_c,
prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_q_query_info2");
@@ -2204,7 +2204,7 @@ BOOL lsa_io_q_query_info2(char *desc, LSA_Q_QUERY_INFO2 *q_c,
Reads or writes an LSA_R_QUERY_DNSDOMINFO structure.
********************************************************************/
-BOOL lsa_io_r_query_info2(char *desc, LSA_R_QUERY_INFO2 *r_c,
+BOOL lsa_io_r_query_info2(const char *desc, LSA_R_QUERY_INFO2 *r_c,
prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "lsa_io_r_query_info2");
diff --git a/source3/rpc_parse/parse_misc.c b/source3/rpc_parse/parse_misc.c
index 86dd85066d2..a9157e29b6b 100644
--- a/source3/rpc_parse/parse_misc.c
+++ b/source3/rpc_parse/parse_misc.c
@@ -91,7 +91,7 @@ TALLOC_CTX *get_talloc_ctx(void)
Reads or writes a UTIME type.
********************************************************************/
-static BOOL smb_io_utime(char *desc, UTIME *t, prs_struct *ps, int depth)
+static BOOL smb_io_utime(const char *desc, UTIME *t, prs_struct *ps, int depth)
{
if (t == NULL)
return False;
@@ -112,7 +112,7 @@ static BOOL smb_io_utime(char *desc, UTIME *t, prs_struct *ps, int depth)
Reads or writes an NTTIME structure.
********************************************************************/
-BOOL smb_io_time(char *desc, NTTIME *nttime, prs_struct *ps, int depth)
+BOOL smb_io_time(const char *desc, NTTIME *nttime, prs_struct *ps, int depth)
{
if (nttime == NULL)
return False;
@@ -135,7 +135,7 @@ BOOL smb_io_time(char *desc, NTTIME *nttime, prs_struct *ps, int depth)
Reads or writes a LOOKUP_LEVEL structure.
********************************************************************/
-BOOL smb_io_lookup_level(char *desc, LOOKUP_LEVEL *level, prs_struct *ps, int depth)
+BOOL smb_io_lookup_level(const char *desc, LOOKUP_LEVEL *level, prs_struct *ps, int depth)
{
if (level == NULL)
return False;
@@ -178,7 +178,7 @@ void init_enum_hnd(ENUM_HND *enh, uint32 hnd)
Reads or writes an ENUM_HND structure.
********************************************************************/
-BOOL smb_io_enum_hnd(char *desc, ENUM_HND *hnd, prs_struct *ps, int depth)
+BOOL smb_io_enum_hnd(const char *desc, ENUM_HND *hnd, prs_struct *ps, int depth)
{
if (hnd == NULL)
return False;
@@ -204,7 +204,7 @@ BOOL smb_io_enum_hnd(char *desc, ENUM_HND *hnd, prs_struct *ps, int depth)
Reads or writes a DOM_SID structure.
********************************************************************/
-BOOL smb_io_dom_sid(char *desc, DOM_SID *sid, prs_struct *ps, int depth)
+BOOL smb_io_dom_sid(const char *desc, DOM_SID *sid, prs_struct *ps, int depth)
{
int i;
@@ -301,7 +301,7 @@ void init_dom_sid2(DOM_SID2 *sid2, const DOM_SID *sid)
Reads or writes a DOM_SID2 structure.
********************************************************************/
-BOOL smb_io_dom_sid2(char *desc, DOM_SID2 *sid, prs_struct *ps, int depth)
+BOOL smb_io_dom_sid2(const char *desc, DOM_SID2 *sid, prs_struct *ps, int depth)
{
if (sid == NULL)
return False;
@@ -336,7 +336,7 @@ void init_str_hdr(STRHDR *hdr, int max_len, int len, uint32 buffer)
Reads or writes a STRHDR structure.
********************************************************************/
-BOOL smb_io_strhdr(char *desc, STRHDR *hdr, prs_struct *ps, int depth)
+BOOL smb_io_strhdr(const char *desc, STRHDR *hdr, prs_struct *ps, int depth)
{
if (hdr == NULL)
return False;
@@ -371,7 +371,7 @@ void init_uni_hdr(UNIHDR *hdr, int len)
Reads or writes a UNIHDR structure.
********************************************************************/
-BOOL smb_io_unihdr(char *desc, UNIHDR *hdr, prs_struct *ps, int depth)
+BOOL smb_io_unihdr(const char *desc, UNIHDR *hdr, prs_struct *ps, int depth)
{
if (hdr == NULL)
return False;
@@ -407,7 +407,7 @@ void init_buf_hdr(BUFHDR *hdr, int max_len, int len)
uint16 should be stored, or gets the size if reading.
********************************************************************/
-BOOL smb_io_hdrbuf_pre(char *desc, BUFHDR *hdr, prs_struct *ps, int depth, uint32 *offset)
+BOOL smb_io_hdrbuf_pre(const char *desc, BUFHDR *hdr, prs_struct *ps, int depth, uint32 *offset)
{
(*offset) = prs_offset(ps);
if (ps->io) {
@@ -433,7 +433,7 @@ BOOL smb_io_hdrbuf_pre(char *desc, BUFHDR *hdr, prs_struct *ps, int depth, uint3
Does nothing on reading, as that is already handled by ...._pre()
********************************************************************/
-BOOL smb_io_hdrbuf_post(char *desc, BUFHDR *hdr, prs_struct *ps, int depth,
+BOOL smb_io_hdrbuf_post(const char *desc, BUFHDR *hdr, prs_struct *ps, int depth,
uint32 ptr_hdrbuf, uint32 max_len, uint32 len)
{
if (!ps->io) {
@@ -458,7 +458,7 @@ BOOL smb_io_hdrbuf_post(char *desc, BUFHDR *hdr, prs_struct *ps, int depth,
Reads or writes a BUFHDR structure.
********************************************************************/
-BOOL smb_io_hdrbuf(char *desc, BUFHDR *hdr, prs_struct *ps, int depth)
+BOOL smb_io_hdrbuf(const char *desc, BUFHDR *hdr, prs_struct *ps, int depth)
{
if (hdr == NULL)
return False;
@@ -491,7 +491,7 @@ void init_uni_hdr2(UNIHDR2 *hdr, int len)
Reads or writes a UNIHDR2 structure.
********************************************************************/
-BOOL smb_io_unihdr2(char *desc, UNIHDR2 *hdr2, prs_struct *ps, int depth)
+BOOL smb_io_unihdr2(const char *desc, UNIHDR2 *hdr2, prs_struct *ps, int depth)
{
if (hdr2 == NULL)
return False;
@@ -542,7 +542,7 @@ reads or writes a UNISTR structure.
XXXX NOTE: UNISTR structures NEED to be null-terminated.
********************************************************************/
-BOOL smb_io_unistr(char *desc, UNISTR *uni, prs_struct *ps, int depth)
+BOOL smb_io_unistr(const char *desc, UNISTR *uni, prs_struct *ps, int depth)
{
if (uni == NULL)
return False;
@@ -639,7 +639,7 @@ void init_buffer3_bytes(BUFFER3 *str, uint8 *buf, int len)
the uni_str_len member tells you how much of the buffer is really used.
********************************************************************/
-BOOL smb_io_buffer3(char *desc, BUFFER3 *buf3, prs_struct *ps, int depth)
+BOOL smb_io_buffer3(const char *desc, BUFFER3 *buf3, prs_struct *ps, int depth)
{
if (buf3 == NULL)
return False;
@@ -672,7 +672,7 @@ BOOL smb_io_buffer3(char *desc, BUFFER3 *buf3, prs_struct *ps, int depth)
reads or writes a BUFFER5 structure.
the buf_len member tells you how large the buffer is.
********************************************************************/
-BOOL smb_io_buffer5(char *desc, BUFFER5 *buf5, prs_struct *ps, int depth)
+BOOL smb_io_buffer5(const char *desc, BUFFER5 *buf5, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "smb_io_buffer5");
depth++;
@@ -721,7 +721,7 @@ void init_buffer2(BUFFER2 *str, const uint8 *buf, int len)
the uni_str_len member tells you how much of the buffer is really used.
********************************************************************/
-BOOL smb_io_buffer2(char *desc, BUFFER2 *buf2, uint32 buffer, prs_struct *ps, int depth)
+BOOL smb_io_buffer2(const char *desc, BUFFER2 *buf2, uint32 buffer, prs_struct *ps, int depth)
{
if (buf2 == NULL)
return False;
@@ -844,7 +844,7 @@ void init_string2(STRING2 *str, const char *buf, int max_len, int str_len)
the str_max_len member tells you how large the buffer is.
********************************************************************/
-BOOL smb_io_string2(char *desc, STRING2 *str2, uint32 buffer, prs_struct *ps, int depth)
+BOOL smb_io_string2(const char *desc, STRING2 *str2, uint32 buffer, prs_struct *ps, int depth)
{
if (str2 == NULL)
return False;
@@ -1006,7 +1006,7 @@ void init_unistr2_from_unistr (UNISTR2 *to, const UNISTR *from)
the uni_max_len member tells you how large the buffer is.
********************************************************************/
-BOOL smb_io_unistr2(char *desc, UNISTR2 *uni2, uint32 buffer, prs_struct *ps, int depth)
+BOOL smb_io_unistr2(const char *desc, UNISTR2 *uni2, uint32 buffer, prs_struct *ps, int depth)
{
if (uni2 == NULL)
return False;
@@ -1057,7 +1057,7 @@ void init_dom_rid2(DOM_RID2 *rid2, uint32 rid, uint8 type, uint32 idx)
Reads or writes a DOM_RID2 structure.
********************************************************************/
-BOOL smb_io_dom_rid2(char *desc, DOM_RID2 *rid2, prs_struct *ps, int depth)
+BOOL smb_io_dom_rid2(const char *desc, DOM_RID2 *rid2, prs_struct *ps, int depth)
{
if (rid2 == NULL)
return False;
@@ -1097,7 +1097,7 @@ void init_dom_rid3(DOM_RID3 *rid3, uint32 rid, uint8 type)
reads or writes a DOM_RID3 structure.
********************************************************************/
-BOOL smb_io_dom_rid3(char *desc, DOM_RID3 *rid3, prs_struct *ps, int depth)
+BOOL smb_io_dom_rid3(const char *desc, DOM_RID3 *rid3, prs_struct *ps, int depth)
{
if (rid3 == NULL)
return False;
@@ -1160,7 +1160,7 @@ static void init_clnt_srv(DOM_CLNT_SRV *log, const char *logon_srv, const char *
Inits or writes a DOM_CLNT_SRV structure.
********************************************************************/
-static BOOL smb_io_clnt_srv(char *desc, DOM_CLNT_SRV *log, prs_struct *ps, int depth)
+static BOOL smb_io_clnt_srv(const char *desc, DOM_CLNT_SRV *log, prs_struct *ps, int depth)
{
if (log == NULL)
return False;
@@ -1216,7 +1216,7 @@ void init_log_info(DOM_LOG_INFO *log, const char *logon_srv, const char *acct_na
Reads or writes a DOM_LOG_INFO structure.
********************************************************************/
-BOOL smb_io_log_info(char *desc, DOM_LOG_INFO *log, prs_struct *ps, int depth)
+BOOL smb_io_log_info(const char *desc, DOM_LOG_INFO *log, prs_struct *ps, int depth)
{
if (log == NULL)
return False;
@@ -1248,7 +1248,7 @@ BOOL smb_io_log_info(char *desc, DOM_LOG_INFO *log, prs_struct *ps, int depth)
Reads or writes a DOM_CHAL structure.
********************************************************************/
-BOOL smb_io_chal(char *desc, DOM_CHAL *chal, prs_struct *ps, int depth)
+BOOL smb_io_chal(const char *desc, DOM_CHAL *chal, prs_struct *ps, int depth)
{
if (chal == NULL)
return False;
@@ -1266,7 +1266,7 @@ BOOL smb_io_chal(char *desc, DOM_CHAL *chal, prs_struct *ps, int depth)
Reads or writes a DOM_CRED structure.
********************************************************************/
-BOOL smb_io_cred(char *desc, DOM_CRED *cred, prs_struct *ps, int depth)
+BOOL smb_io_cred(const char *desc, DOM_CRED *cred, prs_struct *ps, int depth)
{
if (cred == NULL)
return False;
@@ -1310,7 +1310,7 @@ void init_clnt_info2(DOM_CLNT_INFO2 *clnt,
Reads or writes a DOM_CLNT_INFO2 structure.
********************************************************************/
-BOOL smb_io_clnt_info2(char *desc, DOM_CLNT_INFO2 *clnt, prs_struct *ps, int depth)
+BOOL smb_io_clnt_info2(const char *desc, DOM_CLNT_INFO2 *clnt, prs_struct *ps, int depth)
{
if (clnt == NULL)
return False;
@@ -1354,7 +1354,7 @@ void init_clnt_info(DOM_CLNT_INFO *clnt,
Reads or writes a DOM_CLNT_INFO structure.
********************************************************************/
-BOOL smb_io_clnt_info(char *desc, DOM_CLNT_INFO *clnt, prs_struct *ps, int depth)
+BOOL smb_io_clnt_info(const char *desc, DOM_CLNT_INFO *clnt, prs_struct *ps, int depth)
{
if (clnt == NULL)
return False;
@@ -1389,7 +1389,7 @@ void init_logon_id(DOM_LOGON_ID *log, uint32 log_id_low, uint32 log_id_high)
Reads or writes a DOM_LOGON_ID structure.
********************************************************************/
-BOOL smb_io_logon_id(char *desc, DOM_LOGON_ID *log, prs_struct *ps, int depth)
+BOOL smb_io_logon_id(const char *desc, DOM_LOGON_ID *log, prs_struct *ps, int depth)
{
if (log == NULL)
return False;
@@ -1426,7 +1426,7 @@ void init_owf_info(OWF_INFO *hash, const uint8 data[16])
Reads or writes an OWF_INFO structure.
********************************************************************/
-BOOL smb_io_owf_info(char *desc, OWF_INFO *hash, prs_struct *ps, int depth)
+BOOL smb_io_owf_info(const char *desc, OWF_INFO *hash, prs_struct *ps, int depth)
{
if (hash == NULL)
return False;
@@ -1447,7 +1447,7 @@ BOOL smb_io_owf_info(char *desc, OWF_INFO *hash, prs_struct *ps, int depth)
Reads or writes a DOM_GID structure.
********************************************************************/
-BOOL smb_io_gid(char *desc, DOM_GID *gid, prs_struct *ps, int depth)
+BOOL smb_io_gid(const char *desc, DOM_GID *gid, prs_struct *ps, int depth)
{
if (gid == NULL)
return False;
@@ -1470,7 +1470,7 @@ BOOL smb_io_gid(char *desc, DOM_GID *gid, prs_struct *ps, int depth)
Reads or writes an POLICY_HND structure.
********************************************************************/
-BOOL smb_io_pol_hnd(char *desc, POLICY_HND *pol, prs_struct *ps, int depth)
+BOOL smb_io_pol_hnd(const char *desc, POLICY_HND *pol, prs_struct *ps, int depth)
{
if (pol == NULL)
return False;
@@ -1532,7 +1532,7 @@ void init_unistr3(UNISTR3 *str, const char *buf)
Reads or writes a UNISTR3 structure.
********************************************************************/
-BOOL smb_io_unistr3(char *desc, UNISTR3 *name, prs_struct *ps, int depth)
+BOOL smb_io_unistr3(const char *desc, UNISTR3 *name, prs_struct *ps, int depth)
{
if (name == NULL)
return False;
@@ -1559,7 +1559,7 @@ BOOL smb_io_unistr3(char *desc, UNISTR3 *name, prs_struct *ps, int depth)
/*******************************************************************
Stream a uint64_struct
********************************************************************/
-BOOL prs_uint64(char *name, prs_struct *ps, int depth, UINT64_S *data64)
+BOOL prs_uint64(const char *name, prs_struct *ps, int depth, UINT64_S *data64)
{
return prs_uint32(name, ps, depth+1, &data64->low) &&
prs_uint32(name, ps, depth+1, &data64->high);
@@ -1568,7 +1568,7 @@ BOOL prs_uint64(char *name, prs_struct *ps, int depth, UINT64_S *data64)
/*******************************************************************
reads or writes a BUFHDR2 structure.
********************************************************************/
-BOOL smb_io_bufhdr2(char *desc, BUFHDR2 *hdr, prs_struct *ps, int depth)
+BOOL smb_io_bufhdr2(const char *desc, BUFHDR2 *hdr, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "smb_io_bufhdr2");
depth++;
@@ -1584,7 +1584,7 @@ BOOL smb_io_bufhdr2(char *desc, BUFHDR2 *hdr, prs_struct *ps, int depth)
/*******************************************************************
reads or writes a BUFFER4 structure.
********************************************************************/
-BOOL smb_io_buffer4(char *desc, BUFFER4 *buf4, uint32 buffer, prs_struct *ps, int depth)
+BOOL smb_io_buffer4(const char *desc, BUFFER4 *buf4, uint32 buffer, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "smb_io_buffer4");
depth++;
diff --git a/source3/rpc_parse/parse_net.c b/source3/rpc_parse/parse_net.c
index c140a1fe019..ac21e6f2dd8 100644
--- a/source3/rpc_parse/parse_net.c
+++ b/source3/rpc_parse/parse_net.c
@@ -30,7 +30,7 @@
Reads or writes a structure.
********************************************************************/
-static BOOL net_io_neg_flags(char *desc, NEG_FLAGS *neg, prs_struct *ps, int depth)
+static BOOL net_io_neg_flags(const char *desc, NEG_FLAGS *neg, prs_struct *ps, int depth)
{
if (neg == NULL)
return False;
@@ -66,7 +66,7 @@ static void init_netinfo_3(NETLOGON_INFO_3 *info, uint32 flags, uint32 logon_att
Reads or writes a NETLOGON_INFO_3 structure.
********************************************************************/
-static BOOL net_io_netinfo_3(char *desc, NETLOGON_INFO_3 *info, prs_struct *ps, int depth)
+static BOOL net_io_netinfo_3(const char *desc, NETLOGON_INFO_3 *info, prs_struct *ps, int depth)
{
if (info == NULL)
return False;
@@ -110,7 +110,7 @@ static void init_netinfo_1(NETLOGON_INFO_1 *info, uint32 flags, uint32 pdc_statu
Reads or writes a NETLOGON_INFO_1 structure.
********************************************************************/
-static BOOL net_io_netinfo_1(char *desc, NETLOGON_INFO_1 *info, prs_struct *ps, int depth)
+static BOOL net_io_netinfo_1(const char *desc, NETLOGON_INFO_1 *info, prs_struct *ps, int depth)
{
if (info == NULL)
return False;
@@ -152,7 +152,7 @@ static void init_netinfo_2(NETLOGON_INFO_2 *info, uint32 flags, uint32 pdc_statu
Reads or writes a NETLOGON_INFO_2 structure.
********************************************************************/
-static BOOL net_io_netinfo_2(char *desc, NETLOGON_INFO_2 *info, prs_struct *ps, int depth)
+static BOOL net_io_netinfo_2(const char *desc, NETLOGON_INFO_2 *info, prs_struct *ps, int depth)
{
if (info == NULL)
return False;
@@ -187,7 +187,7 @@ static BOOL net_io_netinfo_2(char *desc, NETLOGON_INFO_2 *info, prs_struct *ps,
Reads or writes an NET_Q_LOGON_CTRL2 structure.
********************************************************************/
-BOOL net_io_q_logon_ctrl2(char *desc, NET_Q_LOGON_CTRL2 *q_l, prs_struct *ps, int depth)
+BOOL net_io_q_logon_ctrl2(const char *desc, NET_Q_LOGON_CTRL2 *q_l, prs_struct *ps, int depth)
{
if (q_l == NULL)
return False;
@@ -278,7 +278,7 @@ void init_net_r_logon_ctrl2(NET_R_LOGON_CTRL2 *r_l, uint32 query_level,
Reads or writes an NET_R_LOGON_CTRL2 structure.
********************************************************************/
-BOOL net_io_r_logon_ctrl2(char *desc, NET_R_LOGON_CTRL2 *r_l, prs_struct *ps, int depth)
+BOOL net_io_r_logon_ctrl2(const char *desc, NET_R_LOGON_CTRL2 *r_l, prs_struct *ps, int depth)
{
if (r_l == NULL)
return False;
@@ -322,7 +322,7 @@ BOOL net_io_r_logon_ctrl2(char *desc, NET_R_LOGON_CTRL2 *r_l, prs_struct *ps, in
Reads or writes an NET_Q_LOGON_CTRL structure.
********************************************************************/
-BOOL net_io_q_logon_ctrl(char *desc, NET_Q_LOGON_CTRL *q_l, prs_struct *ps,
+BOOL net_io_q_logon_ctrl(const char *desc, NET_Q_LOGON_CTRL *q_l, prs_struct *ps,
int depth)
{
prs_debug(ps, depth, desc, "net_io_q_logon_ctrl");
@@ -395,7 +395,7 @@ void init_net_r_logon_ctrl(NET_R_LOGON_CTRL *r_l, uint32 query_level,
Reads or writes an NET_R_LOGON_CTRL structure.
********************************************************************/
-BOOL net_io_r_logon_ctrl(char *desc, NET_R_LOGON_CTRL *r_l, prs_struct *ps,
+BOOL net_io_r_logon_ctrl(const char *desc, NET_R_LOGON_CTRL *r_l, prs_struct *ps,
int depth)
{
prs_debug(ps, depth, desc, "net_io_r_logon_ctrl");
@@ -459,7 +459,7 @@ void init_r_trust_dom(NET_R_TRUST_DOM_LIST *r_t,
Reads or writes an NET_R_TRUST_DOM_LIST structure.
********************************************************************/
-BOOL net_io_r_trust_dom(char *desc, NET_R_TRUST_DOM_LIST *r_t, prs_struct *ps, int depth)
+BOOL net_io_r_trust_dom(const char *desc, NET_R_TRUST_DOM_LIST *r_t, prs_struct *ps, int depth)
{
uint32 value;
@@ -511,7 +511,7 @@ BOOL net_io_r_trust_dom(char *desc, NET_R_TRUST_DOM_LIST *r_t, prs_struct *ps, i
Reads or writes an NET_Q_TRUST_DOM_LIST structure.
********************************************************************/
-BOOL net_io_q_trust_dom(char *desc, NET_Q_TRUST_DOM_LIST *q_l, prs_struct *ps, int depth)
+BOOL net_io_q_trust_dom(const char *desc, NET_Q_TRUST_DOM_LIST *q_l, prs_struct *ps, int depth)
{
if (q_l == NULL)
return False;
@@ -551,7 +551,7 @@ void init_q_req_chal(NET_Q_REQ_CHAL *q_c,
Reads or writes an NET_Q_REQ_CHAL structure.
********************************************************************/
-BOOL net_io_q_req_chal(char *desc, NET_Q_REQ_CHAL *q_c, prs_struct *ps, int depth)
+BOOL net_io_q_req_chal(const char *desc, NET_Q_REQ_CHAL *q_c, prs_struct *ps, int depth)
{
if (q_c == NULL)
return False;
@@ -580,7 +580,7 @@ BOOL net_io_q_req_chal(char *desc, NET_Q_REQ_CHAL *q_c, prs_struct *ps, int dep
Reads or writes a structure.
********************************************************************/
-BOOL net_io_r_req_chal(char *desc, NET_R_REQ_CHAL *r_c, prs_struct *ps, int depth)
+BOOL net_io_r_req_chal(const char *desc, NET_R_REQ_CHAL *r_c, prs_struct *ps, int depth)
{
if (r_c == NULL)
return False;
@@ -605,7 +605,7 @@ BOOL net_io_r_req_chal(char *desc, NET_R_REQ_CHAL *r_c, prs_struct *ps, int dept
Reads or writes a structure.
********************************************************************/
-BOOL net_io_q_auth(char *desc, NET_Q_AUTH *q_a, prs_struct *ps, int depth)
+BOOL net_io_q_auth(const char *desc, NET_Q_AUTH *q_a, prs_struct *ps, int depth)
{
if (q_a == NULL)
return False;
@@ -628,7 +628,7 @@ BOOL net_io_q_auth(char *desc, NET_Q_AUTH *q_a, prs_struct *ps, int depth)
Reads or writes a structure.
********************************************************************/
-BOOL net_io_r_auth(char *desc, NET_R_AUTH *r_a, prs_struct *ps, int depth)
+BOOL net_io_r_auth(const char *desc, NET_R_AUTH *r_a, prs_struct *ps, int depth)
{
if (r_a == NULL)
return False;
@@ -669,7 +669,7 @@ void init_q_auth_2(NET_Q_AUTH_2 *q_a,
Reads or writes a structure.
********************************************************************/
-BOOL net_io_q_auth_2(char *desc, NET_Q_AUTH_2 *q_a, prs_struct *ps, int depth)
+BOOL net_io_q_auth_2(const char *desc, NET_Q_AUTH_2 *q_a, prs_struct *ps, int depth)
{
if (q_a == NULL)
return False;
@@ -694,7 +694,7 @@ BOOL net_io_q_auth_2(char *desc, NET_Q_AUTH_2 *q_a, prs_struct *ps, int depth)
Reads or writes a structure.
********************************************************************/
-BOOL net_io_r_auth_2(char *desc, NET_R_AUTH_2 *r_a, prs_struct *ps, int depth)
+BOOL net_io_r_auth_2(const char *desc, NET_R_AUTH_2 *r_a, prs_struct *ps, int depth)
{
if (r_a == NULL)
return False;
@@ -737,7 +737,7 @@ void init_q_auth_3(NET_Q_AUTH_3 *q_a,
Reads or writes a structure.
********************************************************************/
-BOOL net_io_q_auth_3(char *desc, NET_Q_AUTH_3 *q_a, prs_struct *ps, int depth)
+BOOL net_io_q_auth_3(const char *desc, NET_Q_AUTH_3 *q_a, prs_struct *ps, int depth)
{
if (q_a == NULL)
return False;
@@ -762,7 +762,7 @@ BOOL net_io_q_auth_3(char *desc, NET_Q_AUTH_3 *q_a, prs_struct *ps, int depth)
Reads or writes a structure.
********************************************************************/
-BOOL net_io_r_auth_3(char *desc, NET_R_AUTH_3 *r_a, prs_struct *ps, int depth)
+BOOL net_io_r_auth_3(const char *desc, NET_R_AUTH_3 *r_a, prs_struct *ps, int depth)
{
if (r_a == NULL)
return False;
@@ -812,7 +812,7 @@ void init_q_srv_pwset(NET_Q_SRV_PWSET *q_s,
Reads or writes a structure.
********************************************************************/
-BOOL net_io_q_srv_pwset(char *desc, NET_Q_SRV_PWSET *q_s, prs_struct *ps, int depth)
+BOOL net_io_q_srv_pwset(const char *desc, NET_Q_SRV_PWSET *q_s, prs_struct *ps, int depth)
{
if (q_s == NULL)
return False;
@@ -835,7 +835,7 @@ BOOL net_io_q_srv_pwset(char *desc, NET_Q_SRV_PWSET *q_s, prs_struct *ps, int de
Reads or writes a structure.
********************************************************************/
-BOOL net_io_r_srv_pwset(char *desc, NET_R_SRV_PWSET *r_s, prs_struct *ps, int depth)
+BOOL net_io_r_srv_pwset(const char *desc, NET_R_SRV_PWSET *r_s, prs_struct *ps, int depth)
{
if (r_s == NULL)
return False;
@@ -967,7 +967,7 @@ void init_id_info1(NET_ID_INFO_1 *id, const char *domain_name,
Reads or writes an NET_ID_INFO_1 structure.
********************************************************************/
-static BOOL net_io_id_info1(char *desc, NET_ID_INFO_1 *id, prs_struct *ps, int depth)
+static BOOL net_io_id_info1(const char *desc, NET_ID_INFO_1 *id, prs_struct *ps, int depth)
{
if (id == NULL)
return False;
@@ -1083,7 +1083,7 @@ void init_id_info2(NET_ID_INFO_2 * id, const char *domain_name,
Reads or writes an NET_ID_INFO_2 structure.
********************************************************************/
-static BOOL net_io_id_info2(char *desc, NET_ID_INFO_2 *id, prs_struct *ps, int depth)
+static BOOL net_io_id_info2(const char *desc, NET_ID_INFO_2 *id, prs_struct *ps, int depth)
{
if (id == NULL)
return False;
@@ -1169,7 +1169,7 @@ void init_sam_info(DOM_SAM_INFO *sam,
Reads or writes a DOM_SAM_INFO structure.
********************************************************************/
-static BOOL net_io_id_info_ctr(char *desc, NET_ID_INFO_CTR **pp_ctr, prs_struct *ps, int depth)
+static BOOL net_io_id_info_ctr(const char *desc, NET_ID_INFO_CTR **pp_ctr, prs_struct *ps, int depth)
{
NET_ID_INFO_CTR *ctr = *pp_ctr;
@@ -1212,7 +1212,7 @@ static BOOL net_io_id_info_ctr(char *desc, NET_ID_INFO_CTR **pp_ctr, prs_struct
Reads or writes a DOM_SAM_INFO structure.
********************************************************************/
-static BOOL smb_io_sam_info(char *desc, DOM_SAM_INFO *sam, prs_struct *ps, int depth)
+static BOOL smb_io_sam_info(const char *desc, DOM_SAM_INFO *sam, prs_struct *ps, int depth)
{
if (sam == NULL)
return False;
@@ -1544,7 +1544,7 @@ BOOL net_io_user_info3(const char *desc, NET_USER_INFO_3 *usr, prs_struct *ps,
Reads or writes a structure.
********************************************************************/
-BOOL net_io_q_sam_logon(char *desc, NET_Q_SAM_LOGON *q_l, prs_struct *ps, int depth)
+BOOL net_io_q_sam_logon(const char *desc, NET_Q_SAM_LOGON *q_l, prs_struct *ps, int depth)
{
if (q_l == NULL)
return False;
@@ -1568,7 +1568,7 @@ BOOL net_io_q_sam_logon(char *desc, NET_Q_SAM_LOGON *q_l, prs_struct *ps, int de
Reads or writes a structure.
********************************************************************/
-BOOL net_io_r_sam_logon(char *desc, NET_R_SAM_LOGON *r_l, prs_struct *ps, int depth)
+BOOL net_io_r_sam_logon(const char *desc, NET_R_SAM_LOGON *r_l, prs_struct *ps, int depth)
{
if (r_l == NULL)
return False;
@@ -1612,7 +1612,7 @@ BOOL net_io_r_sam_logon(char *desc, NET_R_SAM_LOGON *r_l, prs_struct *ps, int de
Reads or writes a structure.
********************************************************************/
-BOOL net_io_q_sam_logoff(char *desc, NET_Q_SAM_LOGOFF *q_l, prs_struct *ps, int depth)
+BOOL net_io_q_sam_logoff(const char *desc, NET_Q_SAM_LOGOFF *q_l, prs_struct *ps, int depth)
{
if (q_l == NULL)
return False;
@@ -1633,7 +1633,7 @@ BOOL net_io_q_sam_logoff(char *desc, NET_Q_SAM_LOGOFF *q_l, prs_struct *ps, int
Reads or writes a structure.
********************************************************************/
-BOOL net_io_r_sam_logoff(char *desc, NET_R_SAM_LOGOFF *r_l, prs_struct *ps, int depth)
+BOOL net_io_r_sam_logoff(const char *desc, NET_R_SAM_LOGOFF *r_l, prs_struct *ps, int depth)
{
if (r_l == NULL)
return False;
@@ -1687,7 +1687,7 @@ BOOL init_net_q_sam_sync(NET_Q_SAM_SYNC * q_s, const char *srv_name,
/*******************************************************************
reads or writes a structure.
********************************************************************/
-BOOL net_io_q_sam_sync(char *desc, NET_Q_SAM_SYNC * q_s, prs_struct *ps,
+BOOL net_io_q_sam_sync(const char *desc, NET_Q_SAM_SYNC * q_s, prs_struct *ps,
int depth)
{
prs_debug(ps, depth, desc, "net_io_q_sam_sync");
@@ -1719,7 +1719,7 @@ BOOL net_io_q_sam_sync(char *desc, NET_Q_SAM_SYNC * q_s, prs_struct *ps,
/*******************************************************************
reads or writes a structure.
********************************************************************/
-static BOOL net_io_sam_delta_hdr(char *desc, SAM_DELTA_HDR * delta,
+static BOOL net_io_sam_delta_hdr(const char *desc, SAM_DELTA_HDR * delta,
prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "net_io_sam_delta_hdr");
@@ -1749,7 +1749,7 @@ static BOOL net_io_sam_delta_hdr(char *desc, SAM_DELTA_HDR * delta,
/*******************************************************************
reads or writes a structure.
********************************************************************/
-static BOOL net_io_sam_delta_mod_count(char *desc, SAM_DELTA_MOD_COUNT *info,
+static BOOL net_io_sam_delta_mod_count(const char *desc, SAM_DELTA_MOD_COUNT *info,
prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "net_io_sam_delta_stamp");
@@ -1773,7 +1773,7 @@ static BOOL net_io_sam_delta_mod_count(char *desc, SAM_DELTA_MOD_COUNT *info,
/*******************************************************************
reads or writes a structure.
********************************************************************/
-static BOOL net_io_sam_domain_info(char *desc, SAM_DOMAIN_INFO * info,
+static BOOL net_io_sam_domain_info(const char *desc, SAM_DOMAIN_INFO * info,
prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "net_io_sam_domain_info");
@@ -1828,7 +1828,7 @@ static BOOL net_io_sam_domain_info(char *desc, SAM_DOMAIN_INFO * info,
/*******************************************************************
reads or writes a structure.
********************************************************************/
-static BOOL net_io_sam_group_info(char *desc, SAM_GROUP_INFO * info,
+static BOOL net_io_sam_group_info(const char *desc, SAM_GROUP_INFO * info,
prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "net_io_sam_group_info");
@@ -1863,7 +1863,7 @@ static BOOL net_io_sam_group_info(char *desc, SAM_GROUP_INFO * info,
/*******************************************************************
reads or writes a structure.
********************************************************************/
-static BOOL net_io_sam_passwd_info(char *desc, SAM_PWD * pwd,
+static BOOL net_io_sam_passwd_info(const char *desc, SAM_PWD * pwd,
prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "net_io_sam_passwd_info");
@@ -1973,7 +1973,7 @@ BOOL make_sam_account_info(SAM_ACCOUNT_INFO * info,
/*******************************************************************
reads or writes a structure.
********************************************************************/
-static BOOL net_io_sam_account_info(char *desc, uint8 sess_key[16],
+static BOOL net_io_sam_account_info(const char *desc, uint8 sess_key[16],
SAM_ACCOUNT_INFO * info, prs_struct *ps,
int depth)
{
@@ -2164,7 +2164,7 @@ static BOOL net_io_sam_account_info(char *desc, uint8 sess_key[16],
/*******************************************************************
reads or writes a structure.
********************************************************************/
-static BOOL net_io_sam_group_mem_info(char *desc, SAM_GROUP_MEM_INFO * info,
+static BOOL net_io_sam_group_mem_info(const char *desc, SAM_GROUP_MEM_INFO * info,
prs_struct *ps, int depth)
{
uint32 i;
@@ -2248,7 +2248,7 @@ static BOOL net_io_sam_group_mem_info(char *desc, SAM_GROUP_MEM_INFO * info,
/*******************************************************************
reads or writes a structure.
********************************************************************/
-static BOOL net_io_sam_alias_info(char *desc, SAM_ALIAS_INFO * info,
+static BOOL net_io_sam_alias_info(const char *desc, SAM_ALIAS_INFO * info,
prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "net_io_sam_alias_info");
@@ -2283,7 +2283,7 @@ static BOOL net_io_sam_alias_info(char *desc, SAM_ALIAS_INFO * info,
/*******************************************************************
reads or writes a structure.
********************************************************************/
-static BOOL net_io_sam_alias_mem_info(char *desc, SAM_ALIAS_MEM_INFO * info,
+static BOOL net_io_sam_alias_mem_info(const char *desc, SAM_ALIAS_MEM_INFO * info,
prs_struct *ps, int depth)
{
uint32 i;
@@ -2356,7 +2356,7 @@ static BOOL net_io_sam_alias_mem_info(char *desc, SAM_ALIAS_MEM_INFO * info,
/*******************************************************************
reads or writes a structure.
********************************************************************/
-static BOOL net_io_sam_policy_info(char *desc, SAM_DELTA_POLICY *info,
+static BOOL net_io_sam_policy_info(const char *desc, SAM_DELTA_POLICY *info,
prs_struct *ps, int depth)
{
int i;
@@ -2442,7 +2442,7 @@ static BOOL net_io_sam_policy_info(char *desc, SAM_DELTA_POLICY *info,
/*******************************************************************
reads or writes a structure.
********************************************************************/
-static BOOL net_io_sam_trustdoms_info(char *desc, SAM_DELTA_TRUSTDOMS *info,
+static BOOL net_io_sam_trustdoms_info(const char *desc, SAM_DELTA_TRUSTDOMS *info,
prs_struct *ps, int depth)
{
int i;
@@ -2490,7 +2490,7 @@ static BOOL net_io_sam_trustdoms_info(char *desc, SAM_DELTA_TRUSTDOMS *info,
/*******************************************************************
reads or writes a structure.
********************************************************************/
-static BOOL net_io_sam_secret_info(char *desc, SAM_DELTA_SECRET *info,
+static BOOL net_io_sam_secret_info(const char *desc, SAM_DELTA_SECRET *info,
prs_struct *ps, int depth)
{
int i;
@@ -2577,7 +2577,7 @@ static BOOL net_io_sam_secret_info(char *desc, SAM_DELTA_SECRET *info,
/*******************************************************************
reads or writes a structure.
********************************************************************/
-static BOOL net_io_sam_privs_info(char *desc, SAM_DELTA_PRIVS *info,
+static BOOL net_io_sam_privs_info(const char *desc, SAM_DELTA_PRIVS *info,
prs_struct *ps, int depth)
{
int i;
@@ -2664,7 +2664,7 @@ static BOOL net_io_sam_privs_info(char *desc, SAM_DELTA_PRIVS *info,
/*******************************************************************
reads or writes a structure.
********************************************************************/
-static BOOL net_io_sam_delta_ctr(char *desc, uint8 sess_key[16],
+static BOOL net_io_sam_delta_ctr(const char *desc, uint8 sess_key[16],
SAM_DELTA_CTR * delta, uint16 type,
prs_struct *ps, int depth)
{
@@ -2746,7 +2746,7 @@ static BOOL net_io_sam_delta_ctr(char *desc, uint8 sess_key[16],
/*******************************************************************
reads or writes a structure.
********************************************************************/
-BOOL net_io_r_sam_sync(char *desc, uint8 sess_key[16],
+BOOL net_io_r_sam_sync(const char *desc, uint8 sess_key[16],
NET_R_SAM_SYNC * r_s, prs_struct *ps, int depth)
{
uint32 i;
@@ -2859,7 +2859,7 @@ BOOL init_net_q_sam_deltas(NET_Q_SAM_DELTAS *q_s, const char *srv_name,
/*******************************************************************
reads or writes a structure.
********************************************************************/
-BOOL net_io_q_sam_deltas(char *desc, NET_Q_SAM_DELTAS *q_s, prs_struct *ps,
+BOOL net_io_q_sam_deltas(const char *desc, NET_Q_SAM_DELTAS *q_s, prs_struct *ps,
int depth)
{
prs_debug(ps, depth, desc, "net_io_q_sam_deltas");
@@ -2888,7 +2888,7 @@ BOOL net_io_q_sam_deltas(char *desc, NET_Q_SAM_DELTAS *q_s, prs_struct *ps,
/*******************************************************************
reads or writes a structure.
********************************************************************/
-BOOL net_io_r_sam_deltas(char *desc, uint8 sess_key[16],
+BOOL net_io_r_sam_deltas(const char *desc, uint8 sess_key[16],
NET_R_SAM_DELTAS *r_s, prs_struct *ps, int depth)
{
int i;
diff --git a/source3/rpc_parse/parse_prs.c b/source3/rpc_parse/parse_prs.c
index d4a9ec3edae..63f9527deca 100644
--- a/source3/rpc_parse/parse_prs.c
+++ b/source3/rpc_parse/parse_prs.c
@@ -76,7 +76,7 @@ void prs_dump_region(char *name, int v, prs_struct *ps,
XXXX side-effect of this function is to increase the debug depth XXXX
********************************************************************/
-void prs_debug(prs_struct *ps, int depth, const char *desc, char *fn_name)
+void prs_debug(prs_struct *ps, int depth, const char *desc, const char *fn_name)
{
DEBUG(5+depth, ("%s%06x %s %s\n", tab_depth(depth), ps->data_offset, fn_name, desc));
}
@@ -539,7 +539,7 @@ void prs_force_dynamic(prs_struct *ps)
Stream a uint8.
********************************************************************/
-BOOL prs_uint8(char *name, prs_struct *ps, int depth, uint8 *data8)
+BOOL prs_uint8(const char *name, prs_struct *ps, int depth, uint8 *data8)
{
char *q = prs_mem_get(ps, 1);
if (q == NULL)
@@ -561,7 +561,7 @@ BOOL prs_uint8(char *name, prs_struct *ps, int depth, uint8 *data8)
Stream a uint16.
********************************************************************/
-BOOL prs_uint16(char *name, prs_struct *ps, int depth, uint16 *data16)
+BOOL prs_uint16(const char *name, prs_struct *ps, int depth, uint16 *data16)
{
char *q = prs_mem_get(ps, sizeof(uint16));
if (q == NULL)
@@ -590,7 +590,7 @@ BOOL prs_uint16(char *name, prs_struct *ps, int depth, uint16 *data16)
Stream a uint32.
********************************************************************/
-BOOL prs_uint32(char *name, prs_struct *ps, int depth, uint32 *data32)
+BOOL prs_uint32(const char *name, prs_struct *ps, int depth, uint32 *data32)
{
char *q = prs_mem_get(ps, sizeof(uint32));
if (q == NULL)
@@ -619,7 +619,7 @@ BOOL prs_uint32(char *name, prs_struct *ps, int depth, uint32 *data32)
Stream a NTSTATUS
********************************************************************/
-BOOL prs_ntstatus(char *name, prs_struct *ps, int depth, NTSTATUS *status)
+BOOL prs_ntstatus(const char *name, prs_struct *ps, int depth, NTSTATUS *status)
{
char *q = prs_mem_get(ps, sizeof(uint32));
if (q == NULL)
@@ -649,7 +649,7 @@ BOOL prs_ntstatus(char *name, prs_struct *ps, int depth, NTSTATUS *status)
Stream a WERROR
********************************************************************/
-BOOL prs_werror(char *name, prs_struct *ps, int depth, WERROR *status)
+BOOL prs_werror(const char *name, prs_struct *ps, int depth, WERROR *status)
{
char *q = prs_mem_get(ps, sizeof(uint32));
if (q == NULL)
@@ -680,7 +680,7 @@ BOOL prs_werror(char *name, prs_struct *ps, int depth, WERROR *status)
Stream an array of uint8s. Length is number of uint8s.
********************************************************************/
-BOOL prs_uint8s(BOOL charmode, char *name, prs_struct *ps, int depth, uint8 *data8s, int len)
+BOOL prs_uint8s(BOOL charmode, const char *name, prs_struct *ps, int depth, uint8 *data8s, int len)
{
int i;
char *q = prs_mem_get(ps, len);
@@ -713,7 +713,7 @@ BOOL prs_uint8s(BOOL charmode, char *name, prs_struct *ps, int depth, uint8 *dat
Stream an array of uint16s. Length is number of uint16s.
********************************************************************/
-BOOL prs_uint16s(BOOL charmode, char *name, prs_struct *ps, int depth, uint16 *data16s, int len)
+BOOL prs_uint16s(BOOL charmode, const char *name, prs_struct *ps, int depth, uint16 *data16s, int len)
{
int i;
char *q = prs_mem_get(ps, len * sizeof(uint16));
@@ -757,7 +757,7 @@ BOOL prs_uint16s(BOOL charmode, char *name, prs_struct *ps, int depth, uint16 *d
output must be little-endian, if marshalling, input must be little-endian.
********************************************************************/
-static void dbg_rw_punival(BOOL charmode, char *name, int depth, prs_struct *ps,
+static void dbg_rw_punival(BOOL charmode, const char *name, int depth, prs_struct *ps,
char *in_buf, char *out_buf, int len)
{
int i;
@@ -794,7 +794,7 @@ static void dbg_rw_punival(BOOL charmode, char *name, int depth, prs_struct *ps,
Stream a unistr. Always little endian.
********************************************************************/
-BOOL prs_uint16uni(BOOL charmode, char *name, prs_struct *ps, int depth, uint16 *data16s, int len)
+BOOL prs_uint16uni(BOOL charmode, const char *name, prs_struct *ps, int depth, uint16 *data16s, int len)
{
char *q = prs_mem_get(ps, len * sizeof(uint16));
if (q == NULL)
@@ -810,7 +810,7 @@ BOOL prs_uint16uni(BOOL charmode, char *name, prs_struct *ps, int depth, uint16
Stream an array of uint32s. Length is number of uint32s.
********************************************************************/
-BOOL prs_uint32s(BOOL charmode, char *name, prs_struct *ps, int depth, uint32 *data32s, int len)
+BOOL prs_uint32s(BOOL charmode, const char *name, prs_struct *ps, int depth, uint32 *data32s, int len)
{
int i;
char *q = prs_mem_get(ps, len * sizeof(uint32));
@@ -854,7 +854,7 @@ BOOL prs_uint32s(BOOL charmode, char *name, prs_struct *ps, int depth, uint32 *d
in uint16 chars. The unicode string is already in little-endian format.
********************************************************************/
-BOOL prs_buffer5(BOOL charmode, char *name, prs_struct *ps, int depth, BUFFER5 *str)
+BOOL prs_buffer5(BOOL charmode, const char *name, prs_struct *ps, int depth, BUFFER5 *str)
{
char *p;
char *q = prs_mem_get(ps, str->buf_len * sizeof(uint16));
@@ -885,7 +885,7 @@ BOOL prs_buffer5(BOOL charmode, char *name, prs_struct *ps, int depth, BUFFER5 *
in byte chars. String is in little-endian format.
********************************************************************/
-BOOL prs_buffer2(BOOL charmode, char *name, prs_struct *ps, int depth, BUFFER2 *str)
+BOOL prs_buffer2(BOOL charmode, const char *name, prs_struct *ps, int depth, BUFFER2 *str)
{
char *p;
char *q = prs_mem_get(ps, str->buf_len);
@@ -913,7 +913,7 @@ BOOL prs_buffer2(BOOL charmode, char *name, prs_struct *ps, int depth, BUFFER2 *
in uint8 chars.
********************************************************************/
-BOOL prs_string2(BOOL charmode, char *name, prs_struct *ps, int depth, STRING2 *str)
+BOOL prs_string2(BOOL charmode, const char *name, prs_struct *ps, int depth, STRING2 *str)
{
int i;
char *q = prs_mem_get(ps, str->str_max_len);
@@ -953,7 +953,7 @@ BOOL prs_string2(BOOL charmode, char *name, prs_struct *ps, int depth, STRING2 *
in uint16 chars. The unicode string is already in little-endian format.
********************************************************************/
-BOOL prs_unistr2(BOOL charmode, char *name, prs_struct *ps, int depth, UNISTR2 *str)
+BOOL prs_unistr2(BOOL charmode, const char *name, prs_struct *ps, int depth, UNISTR2 *str)
{
char *p;
char *q = prs_mem_get(ps, str->uni_str_len * sizeof(uint16));
@@ -984,7 +984,7 @@ BOOL prs_unistr2(BOOL charmode, char *name, prs_struct *ps, int depth, UNISTR2 *
in uint16 chars. The unicode string is already in little-endian format.
********************************************************************/
-BOOL prs_unistr3(BOOL charmode, char *name, UNISTR3 *str, prs_struct *ps, int depth)
+BOOL prs_unistr3(BOOL charmode, const char *name, UNISTR3 *str, prs_struct *ps, int depth)
{
char *p;
char *q = prs_mem_get(ps, str->uni_str_len * sizeof(uint16));
@@ -1010,7 +1010,7 @@ BOOL prs_unistr3(BOOL charmode, char *name, UNISTR3 *str, prs_struct *ps, int de
in little-endian format then do it as a stream of bytes.
********************************************************************/
-BOOL prs_unistr(char *name, prs_struct *ps, int depth, UNISTR *str)
+BOOL prs_unistr(const char *name, prs_struct *ps, int depth, UNISTR *str)
{
int len = 0;
unsigned char *p = (unsigned char *)str->buffer;
@@ -1136,7 +1136,7 @@ BOOL prs_unistr(char *name, prs_struct *ps, int depth, UNISTR *str)
not include the null-termination character.
********************************************************************/
-BOOL prs_string(char *name, prs_struct *ps, int depth, char *str, int len, int max_buf_size)
+BOOL prs_string(const char *name, prs_struct *ps, int depth, char *str, int len, int max_buf_size)
{
char *q;
int i;
@@ -1173,7 +1173,7 @@ BOOL prs_string(char *name, prs_struct *ps, int depth, char *str, int len, int m
uint16 should be stored, or gets the size if reading.
********************************************************************/
-BOOL prs_uint16_pre(char *name, prs_struct *ps, int depth, uint16 *data16, uint32 *offset)
+BOOL prs_uint16_pre(const char *name, prs_struct *ps, int depth, uint16 *data16, uint32 *offset)
{
*offset = ps->data_offset;
if (UNMARSHALLING(ps)) {
@@ -1193,7 +1193,7 @@ BOOL prs_uint16_pre(char *name, prs_struct *ps, int depth, uint16 *data16, uint3
does nothing on reading, as that is already handled by ...._pre()
********************************************************************/
-BOOL prs_uint16_post(char *name, prs_struct *ps, int depth, uint16 *data16,
+BOOL prs_uint16_post(const char *name, prs_struct *ps, int depth, uint16 *data16,
uint32 ptr_uint16, uint32 start_offset)
{
if (MARSHALLING(ps)) {
@@ -1220,7 +1220,7 @@ BOOL prs_uint16_post(char *name, prs_struct *ps, int depth, uint16 *data16,
uint32 should be stored, or gets the size if reading.
********************************************************************/
-BOOL prs_uint32_pre(char *name, prs_struct *ps, int depth, uint32 *data32, uint32 *offset)
+BOOL prs_uint32_pre(const char *name, prs_struct *ps, int depth, uint32 *data32, uint32 *offset)
{
*offset = ps->data_offset;
if (UNMARSHALLING(ps) && (data32 != NULL)) {
@@ -1237,7 +1237,7 @@ BOOL prs_uint32_pre(char *name, prs_struct *ps, int depth, uint32 *data32, uint3
does nothing on reading, as that is already handled by ...._pre()
********************************************************************/
-BOOL prs_uint32_post(char *name, prs_struct *ps, int depth, uint32 *data32,
+BOOL prs_uint32_post(const char *name, prs_struct *ps, int depth, uint32 *data32,
uint32 ptr_uint32, uint32 data_size)
{
if (MARSHALLING(ps)) {
diff --git a/source3/rpc_parse/parse_reg.c b/source3/rpc_parse/parse_reg.c
index 7bb8a6e2b46..456fad69b4f 100644
--- a/source3/rpc_parse/parse_reg.c
+++ b/source3/rpc_parse/parse_reg.c
@@ -62,7 +62,7 @@ void init_reg_q_open_hkcr(REG_Q_OPEN_HKCR *q_o,
reads or writes a structure.
********************************************************************/
-BOOL reg_io_q_open_hkcr(char *desc, REG_Q_OPEN_HKCR *r_q, prs_struct *ps, int depth)
+BOOL reg_io_q_open_hkcr(const char *desc, REG_Q_OPEN_HKCR *r_q, prs_struct *ps, int depth)
{
if (r_q == NULL)
return False;
@@ -93,7 +93,7 @@ BOOL reg_io_q_open_hkcr(char *desc, REG_Q_OPEN_HKCR *r_q, prs_struct *ps, int d
reads or writes a structure.
********************************************************************/
-BOOL reg_io_r_open_hkcr(char *desc, REG_R_OPEN_HKCR *r_r, prs_struct *ps, int depth)
+BOOL reg_io_r_open_hkcr(const char *desc, REG_R_OPEN_HKCR *r_r, prs_struct *ps, int depth)
{
if (r_r == NULL)
return False;
@@ -130,7 +130,7 @@ void init_reg_q_open_hklm(REG_Q_OPEN_HKLM * q_o,
/*******************************************************************
reads or writes a structure.
********************************************************************/
-BOOL reg_io_q_open_hklm(char *desc, REG_Q_OPEN_HKLM * r_q, prs_struct *ps,
+BOOL reg_io_q_open_hklm(const char *desc, REG_Q_OPEN_HKLM * r_q, prs_struct *ps,
int depth)
{
if (r_q == NULL)
@@ -161,7 +161,7 @@ BOOL reg_io_q_open_hklm(char *desc, REG_Q_OPEN_HKLM * r_q, prs_struct *ps,
/*******************************************************************
reads or writes a structure.
********************************************************************/
-BOOL reg_io_r_open_hklm(char *desc, REG_R_OPEN_HKLM * r_r, prs_struct *ps,
+BOOL reg_io_r_open_hklm(const char *desc, REG_R_OPEN_HKLM * r_r, prs_struct *ps,
int depth)
{
if (r_r == NULL)
@@ -198,7 +198,7 @@ void init_reg_q_flush_key(REG_Q_FLUSH_KEY *q_u, POLICY_HND *pol)
reads or writes a structure.
********************************************************************/
-BOOL reg_io_q_flush_key(char *desc, REG_Q_FLUSH_KEY *r_q, prs_struct *ps, int depth)
+BOOL reg_io_q_flush_key(const char *desc, REG_Q_FLUSH_KEY *r_q, prs_struct *ps, int depth)
{
if (r_q == NULL)
return False;
@@ -219,7 +219,7 @@ BOOL reg_io_q_flush_key(char *desc, REG_Q_FLUSH_KEY *r_q, prs_struct *ps, int d
reads or writes a structure.
********************************************************************/
-BOOL reg_io_r_flush_key(char *desc, REG_R_FLUSH_KEY *r_r, prs_struct *ps, int depth)
+BOOL reg_io_r_flush_key(const char *desc, REG_R_FLUSH_KEY *r_r, prs_struct *ps, int depth)
{
if (r_r == NULL)
return False;
@@ -311,7 +311,7 @@ void init_reg_q_create_key(REG_Q_CREATE_KEY *q_c, POLICY_HND *hnd,
reads or writes a structure.
********************************************************************/
-BOOL reg_io_q_create_key(char *desc, REG_Q_CREATE_KEY *r_q, prs_struct *ps, int depth)
+BOOL reg_io_q_create_key(const char *desc, REG_Q_CREATE_KEY *r_q, prs_struct *ps, int depth)
{
if (r_q == NULL)
return False;
@@ -367,7 +367,7 @@ BOOL reg_io_q_create_key(char *desc, REG_Q_CREATE_KEY *r_q, prs_struct *ps, int
reads or writes a structure.
********************************************************************/
-BOOL reg_io_r_create_key(char *desc, REG_R_CREATE_KEY *r_r, prs_struct *ps, int depth)
+BOOL reg_io_r_create_key(const char *desc, REG_R_CREATE_KEY *r_r, prs_struct *ps, int depth)
{
if (r_r == NULL)
return False;
@@ -410,7 +410,7 @@ void init_reg_q_delete_val(REG_Q_DELETE_VALUE *q_c, POLICY_HND *hnd,
reads or writes a structure.
********************************************************************/
-BOOL reg_io_q_delete_val(char *desc, REG_Q_DELETE_VALUE *r_q, prs_struct *ps, int depth)
+BOOL reg_io_q_delete_val(const char *desc, REG_Q_DELETE_VALUE *r_q, prs_struct *ps, int depth)
{
if (r_q == NULL)
return False;
@@ -439,7 +439,7 @@ BOOL reg_io_q_delete_val(char *desc, REG_Q_DELETE_VALUE *r_q, prs_struct *ps, i
reads or writes a structure.
********************************************************************/
-BOOL reg_io_r_delete_val(char *desc, REG_R_DELETE_VALUE *r_r, prs_struct *ps, int depth)
+BOOL reg_io_r_delete_val(const char *desc, REG_R_DELETE_VALUE *r_r, prs_struct *ps, int depth)
{
if (r_r == NULL)
return False;
@@ -476,7 +476,7 @@ void init_reg_q_delete_key(REG_Q_DELETE_KEY *q_c, POLICY_HND *hnd,
reads or writes a structure.
********************************************************************/
-BOOL reg_io_q_delete_key(char *desc, REG_Q_DELETE_KEY *r_q, prs_struct *ps, int depth)
+BOOL reg_io_q_delete_key(const char *desc, REG_Q_DELETE_KEY *r_q, prs_struct *ps, int depth)
{
if (r_q == NULL)
return False;
@@ -504,7 +504,7 @@ BOOL reg_io_q_delete_key(char *desc, REG_Q_DELETE_KEY *r_q, prs_struct *ps, int
reads or writes a structure.
********************************************************************/
-BOOL reg_io_r_delete_key(char *desc, REG_R_DELETE_KEY *r_r, prs_struct *ps, int depth)
+BOOL reg_io_r_delete_key(const char *desc, REG_R_DELETE_KEY *r_r, prs_struct *ps, int depth)
{
if (r_r == NULL)
return False;
@@ -539,7 +539,7 @@ void init_reg_q_query_key(REG_Q_QUERY_KEY *q_o, POLICY_HND *hnd,
reads or writes a structure.
********************************************************************/
-BOOL reg_io_q_query_key(char *desc, REG_Q_QUERY_KEY *r_q, prs_struct *ps, int depth)
+BOOL reg_io_q_query_key(const char *desc, REG_Q_QUERY_KEY *r_q, prs_struct *ps, int depth)
{
if (r_q == NULL)
return False;
@@ -568,7 +568,7 @@ BOOL reg_io_q_query_key(char *desc, REG_Q_QUERY_KEY *r_q, prs_struct *ps, int d
reads or writes a structure.
********************************************************************/
-BOOL reg_io_r_query_key(char *desc, REG_R_QUERY_KEY *r_r, prs_struct *ps, int depth)
+BOOL reg_io_r_query_key(const char *desc, REG_R_QUERY_KEY *r_r, prs_struct *ps, int depth)
{
if (r_r == NULL)
return False;
@@ -624,7 +624,7 @@ void init_reg_q_unknown_1a(REG_Q_UNKNOWN_1A *q_o, POLICY_HND *hnd)
reads or writes a structure.
********************************************************************/
-BOOL reg_io_q_unknown_1a(char *desc, REG_Q_UNKNOWN_1A *r_q, prs_struct *ps, int depth)
+BOOL reg_io_q_unknown_1a(const char *desc, REG_Q_UNKNOWN_1A *r_q, prs_struct *ps, int depth)
{
if (r_q == NULL)
return False;
@@ -645,7 +645,7 @@ BOOL reg_io_q_unknown_1a(char *desc, REG_Q_UNKNOWN_1A *r_q, prs_struct *ps, int
reads or writes a structure.
********************************************************************/
-BOOL reg_io_r_unknown_1a(char *desc, REG_R_UNKNOWN_1A *r_r, prs_struct *ps, int depth)
+BOOL reg_io_r_unknown_1a(const char *desc, REG_R_UNKNOWN_1A *r_r, prs_struct *ps, int depth)
{
if (r_r == NULL)
return False;
@@ -669,7 +669,7 @@ BOOL reg_io_r_unknown_1a(char *desc, REG_R_UNKNOWN_1A *r_r, prs_struct *ps, int
reads or writes a structure.
********************************************************************/
-BOOL reg_io_q_save_key(char *desc, REG_Q_SAVE_KEY *r_q, prs_struct *ps, int depth)
+BOOL reg_io_q_save_key(const char *desc, REG_Q_SAVE_KEY *r_q, prs_struct *ps, int depth)
{
if (r_q == NULL)
return False;
@@ -698,7 +698,7 @@ BOOL reg_io_q_save_key(char *desc, REG_Q_SAVE_KEY *r_q, prs_struct *ps, int dep
reads or writes a structure.
********************************************************************/
-BOOL reg_io_r_save_key(char *desc, REG_R_SAVE_KEY *r_r, prs_struct *ps, int depth)
+BOOL reg_io_r_save_key(const char *desc, REG_R_SAVE_KEY *r_r, prs_struct *ps, int depth)
{
if (r_r == NULL)
return False;
@@ -732,7 +732,7 @@ void init_reg_q_open_hku(REG_Q_OPEN_HKU *q_o,
reads or writes a structure.
********************************************************************/
-BOOL reg_io_q_open_hku(char *desc, REG_Q_OPEN_HKU *r_q, prs_struct *ps, int depth)
+BOOL reg_io_q_open_hku(const char *desc, REG_Q_OPEN_HKU *r_q, prs_struct *ps, int depth)
{
if (r_q == NULL)
return False;
@@ -761,7 +761,7 @@ BOOL reg_io_q_open_hku(char *desc, REG_Q_OPEN_HKU *r_q, prs_struct *ps, int dep
reads or writes a structure.
********************************************************************/
-BOOL reg_io_r_open_hku(char *desc, REG_R_OPEN_HKU *r_r, prs_struct *ps, int depth)
+BOOL reg_io_r_open_hku(const char *desc, REG_R_OPEN_HKU *r_r, prs_struct *ps, int depth)
{
if (r_r == NULL)
return False;
@@ -796,7 +796,7 @@ void init_reg_q_close(REG_Q_CLOSE *q_c, POLICY_HND *hnd)
reads or writes a structure.
********************************************************************/
-BOOL reg_io_q_close(char *desc, REG_Q_CLOSE *q_u, prs_struct *ps, int depth)
+BOOL reg_io_q_close(const char *desc, REG_Q_CLOSE *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL)
return False;
@@ -819,7 +819,7 @@ BOOL reg_io_q_close(char *desc, REG_Q_CLOSE *q_u, prs_struct *ps, int depth)
reads or writes a structure.
********************************************************************/
-BOOL reg_io_r_close(char *desc, REG_R_CLOSE *r_u, prs_struct *ps, int depth)
+BOOL reg_io_r_close(const char *desc, REG_R_CLOSE *r_u, prs_struct *ps, int depth)
{
if (r_u == NULL)
return False;
@@ -860,7 +860,7 @@ void init_reg_q_set_key_sec(REG_Q_SET_KEY_SEC *q_i, POLICY_HND *pol, SEC_DESC_BU
reads or writes a structure.
********************************************************************/
-BOOL reg_io_q_set_key_sec(char *desc, REG_Q_SET_KEY_SEC *r_q, prs_struct *ps, int depth)
+BOOL reg_io_q_set_key_sec(const char *desc, REG_Q_SET_KEY_SEC *r_q, prs_struct *ps, int depth)
{
if (r_q == NULL)
return False;
@@ -889,7 +889,7 @@ BOOL reg_io_q_set_key_sec(char *desc, REG_Q_SET_KEY_SEC *r_q, prs_struct *ps, i
reads or writes a structure.
********************************************************************/
-BOOL reg_io_r_set_key_sec(char *desc, REG_R_SET_KEY_SEC *r_q, prs_struct *ps, int depth)
+BOOL reg_io_r_set_key_sec(const char *desc, REG_R_SET_KEY_SEC *r_q, prs_struct *ps, int depth)
{
if (r_q == NULL)
return False;
@@ -930,7 +930,7 @@ void init_reg_q_get_key_sec(REG_Q_GET_KEY_SEC *q_i, POLICY_HND *pol,
reads or writes a structure.
********************************************************************/
-BOOL reg_io_q_get_key_sec(char *desc, REG_Q_GET_KEY_SEC *r_q, prs_struct *ps, int depth)
+BOOL reg_io_q_get_key_sec(const char *desc, REG_Q_GET_KEY_SEC *r_q, prs_struct *ps, int depth)
{
if (r_q == NULL)
return False;
@@ -975,7 +975,7 @@ makes a structure.
reads or writes a structure.
********************************************************************/
-BOOL reg_io_r_get_key_sec(char *desc, REG_R_GET_KEY_SEC *r_q, prs_struct *ps, int depth)
+BOOL reg_io_r_get_key_sec(const char *desc, REG_R_GET_KEY_SEC *r_q, prs_struct *ps, int depth)
{
if (r_q == NULL)
return False;
@@ -1041,7 +1041,7 @@ BOOL init_reg_q_info(REG_Q_INFO *q_i, POLICY_HND *pol, char* val_name)
reads or writes a structure.
********************************************************************/
-BOOL reg_io_q_info(char *desc, REG_Q_INFO *r_q, prs_struct *ps, int depth)
+BOOL reg_io_q_info(const char *desc, REG_Q_INFO *r_q, prs_struct *ps, int depth)
{
if (r_q == NULL)
return False;
@@ -1174,7 +1174,7 @@ BOOL init_reg_r_info(uint32 include_keyval, REG_R_INFO *r_r,
reads or writes a structure.
********************************************************************/
-BOOL reg_io_r_info(char *desc, REG_R_INFO *r_r, prs_struct *ps, int depth)
+BOOL reg_io_r_info(const char *desc, REG_R_INFO *r_r, prs_struct *ps, int depth)
{
if (r_r == NULL)
return False;
@@ -1298,7 +1298,7 @@ void init_reg_r_enum_val(REG_R_ENUM_VALUE *r_u, REGISTRY_VALUE *val )
reads or writes a structure.
********************************************************************/
-BOOL reg_io_q_enum_val(char *desc, REG_Q_ENUM_VALUE *q_q, prs_struct *ps, int depth)
+BOOL reg_io_q_enum_val(const char *desc, REG_Q_ENUM_VALUE *q_q, prs_struct *ps, int depth)
{
if (q_q == NULL)
return False;
@@ -1357,7 +1357,7 @@ BOOL reg_io_q_enum_val(char *desc, REG_Q_ENUM_VALUE *q_q, prs_struct *ps, int d
reads or writes a structure.
********************************************************************/
-BOOL reg_io_r_enum_val(char *desc, REG_R_ENUM_VALUE *r_q, prs_struct *ps, int depth)
+BOOL reg_io_r_enum_val(const char *desc, REG_R_ENUM_VALUE *r_q, prs_struct *ps, int depth)
{
if (r_q == NULL)
return False;
@@ -1435,7 +1435,7 @@ void init_reg_q_create_val(REG_Q_CREATE_VALUE *q_i, POLICY_HND *pol,
reads or writes a structure.
********************************************************************/
-BOOL reg_io_q_create_val(char *desc, REG_Q_CREATE_VALUE *q_q, prs_struct *ps, int depth)
+BOOL reg_io_q_create_val(const char *desc, REG_Q_CREATE_VALUE *q_q, prs_struct *ps, int depth)
{
if (q_q == NULL)
return False;
@@ -1470,7 +1470,7 @@ BOOL reg_io_q_create_val(char *desc, REG_Q_CREATE_VALUE *q_q, prs_struct *ps, i
reads or writes a structure.
********************************************************************/
-BOOL reg_io_r_create_val(char *desc, REG_R_CREATE_VALUE *r_q, prs_struct *ps, int depth)
+BOOL reg_io_r_create_val(const char *desc, REG_R_CREATE_VALUE *r_q, prs_struct *ps, int depth)
{
if (r_q == NULL)
return False;
@@ -1537,7 +1537,7 @@ void init_reg_r_enum_key(REG_R_ENUM_KEY *r_u, char *subkey, uint32 unknown_1,
reads or writes a structure.
********************************************************************/
-BOOL reg_io_q_enum_key(char *desc, REG_Q_ENUM_KEY *q_q, prs_struct *ps, int depth)
+BOOL reg_io_q_enum_key(const char *desc, REG_Q_ENUM_KEY *q_q, prs_struct *ps, int depth)
{
if (q_q == NULL)
return False;
@@ -1591,7 +1591,7 @@ BOOL reg_io_q_enum_key(char *desc, REG_Q_ENUM_KEY *q_q, prs_struct *ps, int dep
reads or writes a structure.
********************************************************************/
-BOOL reg_io_r_enum_key(char *desc, REG_R_ENUM_KEY *r_q, prs_struct *ps, int depth)
+BOOL reg_io_r_enum_key(const char *desc, REG_R_ENUM_KEY *r_q, prs_struct *ps, int depth)
{
if (r_q == NULL)
return False;
@@ -1665,7 +1665,7 @@ void init_reg_q_open_entry(REG_Q_OPEN_ENTRY *r_q, POLICY_HND *pol,
reads or writes a structure.
********************************************************************/
-BOOL reg_io_q_open_entry(char *desc, REG_Q_OPEN_ENTRY *r_q, prs_struct *ps, int depth)
+BOOL reg_io_q_open_entry(const char *desc, REG_Q_OPEN_ENTRY *r_q, prs_struct *ps, int depth)
{
if (r_q == NULL)
return False;
@@ -1713,7 +1713,7 @@ void init_reg_r_open_entry(REG_R_OPEN_ENTRY *r_r,
reads or writes a structure.
********************************************************************/
-BOOL reg_io_r_open_entry(char *desc, REG_R_OPEN_ENTRY *r_r, prs_struct *ps, int depth)
+BOOL reg_io_r_open_entry(const char *desc, REG_R_OPEN_ENTRY *r_r, prs_struct *ps, int depth)
{
if (r_r == NULL)
return False;
@@ -1759,7 +1759,7 @@ void init_reg_q_shutdown(REG_Q_SHUTDOWN * q_s, const char *msg,
/*******************************************************************
reads or writes a structure.
********************************************************************/
-BOOL reg_io_q_shutdown(char *desc, REG_Q_SHUTDOWN * q_s, prs_struct *ps,
+BOOL reg_io_q_shutdown(const char *desc, REG_Q_SHUTDOWN * q_s, prs_struct *ps,
int depth)
{
if (q_s == NULL)
@@ -1798,7 +1798,7 @@ BOOL reg_io_q_shutdown(char *desc, REG_Q_SHUTDOWN * q_s, prs_struct *ps,
/*******************************************************************
reads or writes a structure.
********************************************************************/
-BOOL reg_io_r_shutdown(char *desc, REG_R_SHUTDOWN * r_s, prs_struct *ps,
+BOOL reg_io_r_shutdown(const char *desc, REG_R_SHUTDOWN * r_s, prs_struct *ps,
int depth)
{
if (r_s == NULL)
@@ -1829,7 +1829,7 @@ void init_reg_q_abort_shutdown(REG_Q_ABORT_SHUTDOWN * q_s)
/*******************************************************************
reads or writes a structure.
********************************************************************/
-BOOL reg_io_q_abort_shutdown(char *desc, REG_Q_ABORT_SHUTDOWN * q_s,
+BOOL reg_io_q_abort_shutdown(const char *desc, REG_Q_ABORT_SHUTDOWN * q_s,
prs_struct *ps, int depth)
{
if (q_s == NULL)
@@ -1853,7 +1853,7 @@ BOOL reg_io_q_abort_shutdown(char *desc, REG_Q_ABORT_SHUTDOWN * q_s,
/*******************************************************************
reads or writes a structure.
********************************************************************/
-BOOL reg_io_r_abort_shutdown(char *desc, REG_R_ABORT_SHUTDOWN * r_s,
+BOOL reg_io_r_abort_shutdown(const char *desc, REG_R_ABORT_SHUTDOWN * r_s,
prs_struct *ps, int depth)
{
if (r_s == NULL)
diff --git a/source3/rpc_parse/parse_rpc.c b/source3/rpc_parse/parse_rpc.c
index e8825a2e14a..fafbbb1965a 100644
--- a/source3/rpc_parse/parse_rpc.c
+++ b/source3/rpc_parse/parse_rpc.c
@@ -143,7 +143,7 @@ interface/version dce/rpc pipe identification
* update the index #defines in smb.h.
*/
-struct pipe_id_info pipe_names [] =
+const struct pipe_id_info pipe_names [] =
{
/* client pipe , abstract syntax , server pipe , transfer syntax */
{ PIPE_LSARPC , SYNT_LSARPC_V0 , PIPE_LSASS , TRANS_SYNT_V2 },
@@ -182,7 +182,7 @@ void init_rpc_hdr(RPC_HDR *hdr, enum RPC_PKT_TYPE pkt_type, uint8 flags,
Reads or writes an RPC_HDR structure.
********************************************************************/
-BOOL smb_io_rpc_hdr(char *desc, RPC_HDR *rpc, prs_struct *ps, int depth)
+BOOL smb_io_rpc_hdr(const char *desc, RPC_HDR *rpc, prs_struct *ps, int depth)
{
if (rpc == NULL)
return False;
@@ -236,7 +236,7 @@ BOOL smb_io_rpc_hdr(char *desc, RPC_HDR *rpc, prs_struct *ps, int depth)
Reads or writes an RPC_IFACE structure.
********************************************************************/
-static BOOL smb_io_rpc_iface(char *desc, RPC_IFACE *ifc, prs_struct *ps, int depth)
+static BOOL smb_io_rpc_iface(const char *desc, RPC_IFACE *ifc, prs_struct *ps, int depth)
{
if (ifc == NULL)
return False;
@@ -266,7 +266,7 @@ static BOOL smb_io_rpc_iface(char *desc, RPC_IFACE *ifc, prs_struct *ps, int dep
Inits an RPC_ADDR_STR structure.
********************************************************************/
-static void init_rpc_addr_str(RPC_ADDR_STR *str, char *name)
+static void init_rpc_addr_str(RPC_ADDR_STR *str, const char *name)
{
str->len = strlen(name) + 1;
fstrcpy(str->str, name);
@@ -276,7 +276,7 @@ static void init_rpc_addr_str(RPC_ADDR_STR *str, char *name)
Reads or writes an RPC_ADDR_STR structure.
********************************************************************/
-static BOOL smb_io_rpc_addr_str(char *desc, RPC_ADDR_STR *str, prs_struct *ps, int depth)
+static BOOL smb_io_rpc_addr_str(const char *desc, RPC_ADDR_STR *str, prs_struct *ps, int depth)
{
if (str == NULL)
return False;
@@ -308,7 +308,7 @@ static void init_rpc_hdr_bba(RPC_HDR_BBA *bba, uint16 max_tsize, uint16 max_rsiz
Reads or writes an RPC_HDR_BBA structure.
********************************************************************/
-static BOOL smb_io_rpc_hdr_bba(char *desc, RPC_HDR_BBA *rpc, prs_struct *ps, int depth)
+static BOOL smb_io_rpc_hdr_bba(const char *desc, RPC_HDR_BBA *rpc, prs_struct *ps, int depth)
{
if (rpc == NULL)
return False;
@@ -351,7 +351,7 @@ void init_rpc_hdr_rb(RPC_HDR_RB *rpc,
Reads or writes an RPC_HDR_RB structure.
********************************************************************/
-BOOL smb_io_rpc_hdr_rb(char *desc, RPC_HDR_RB *rpc, prs_struct *ps, int depth)
+BOOL smb_io_rpc_hdr_rb(const char *desc, RPC_HDR_RB *rpc, prs_struct *ps, int depth)
{
if (rpc == NULL)
return False;
@@ -397,7 +397,7 @@ static void init_rpc_results(RPC_RESULTS *res,
lkclXXXX only one reason at the moment!
********************************************************************/
-static BOOL smb_io_rpc_results(char *desc, RPC_RESULTS *res, prs_struct *ps, int depth)
+static BOOL smb_io_rpc_results(const char *desc, RPC_RESULTS *res, prs_struct *ps, int depth)
{
if (res == NULL)
return False;
@@ -430,7 +430,7 @@ static BOOL smb_io_rpc_results(char *desc, RPC_RESULTS *res, prs_struct *ps, int
void init_rpc_hdr_ba(RPC_HDR_BA *rpc,
uint16 max_tsize, uint16 max_rsize, uint32 assoc_gid,
- char *pipe_addr,
+ const char *pipe_addr,
uint8 num_results, uint16 result, uint16 reason,
RPC_IFACE *transfer)
{
@@ -446,7 +446,7 @@ void init_rpc_hdr_ba(RPC_HDR_BA *rpc,
Reads or writes an RPC_HDR_BA structure.
********************************************************************/
-BOOL smb_io_rpc_hdr_ba(char *desc, RPC_HDR_BA *rpc, prs_struct *ps, int depth)
+BOOL smb_io_rpc_hdr_ba(const char *desc, RPC_HDR_BA *rpc, prs_struct *ps, int depth)
{
if (rpc == NULL)
return False;
@@ -480,7 +480,7 @@ void init_rpc_hdr_req(RPC_HDR_REQ *hdr, uint32 alloc_hint, uint16 opnum)
Reads or writes an RPC_HDR_REQ structure.
********************************************************************/
-BOOL smb_io_rpc_hdr_req(char *desc, RPC_HDR_REQ *rpc, prs_struct *ps, int depth)
+BOOL smb_io_rpc_hdr_req(const char *desc, RPC_HDR_REQ *rpc, prs_struct *ps, int depth)
{
if (rpc == NULL)
return False;
@@ -501,7 +501,7 @@ BOOL smb_io_rpc_hdr_req(char *desc, RPC_HDR_REQ *rpc, prs_struct *ps, int depth)
Reads or writes an RPC_HDR_RESP structure.
********************************************************************/
-BOOL smb_io_rpc_hdr_resp(char *desc, RPC_HDR_RESP *rpc, prs_struct *ps, int depth)
+BOOL smb_io_rpc_hdr_resp(const char *desc, RPC_HDR_RESP *rpc, prs_struct *ps, int depth)
{
if (rpc == NULL)
return False;
@@ -524,7 +524,7 @@ BOOL smb_io_rpc_hdr_resp(char *desc, RPC_HDR_RESP *rpc, prs_struct *ps, int dept
Reads or writes an RPC_HDR_FAULT structure.
********************************************************************/
-BOOL smb_io_rpc_hdr_fault(char *desc, RPC_HDR_FAULT *rpc, prs_struct *ps, int depth)
+BOOL smb_io_rpc_hdr_fault(const char *desc, RPC_HDR_FAULT *rpc, prs_struct *ps, int depth)
{
if (rpc == NULL)
return False;
@@ -564,7 +564,7 @@ void init_rpc_hdr_autha(RPC_HDR_AUTHA *rai,
Reads or writes an RPC_HDR_AUTHA structure.
********************************************************************/
-BOOL smb_io_rpc_hdr_autha(char *desc, RPC_HDR_AUTHA *rai, prs_struct *ps, int depth)
+BOOL smb_io_rpc_hdr_autha(const char *desc, RPC_HDR_AUTHA *rai, prs_struct *ps, int depth)
{
if (rai == NULL)
return False;
@@ -622,7 +622,7 @@ void init_rpc_hdr_auth(RPC_HDR_AUTH *rai,
Reads or writes an RPC_HDR_AUTH structure.
********************************************************************/
-BOOL smb_io_rpc_hdr_auth(char *desc, RPC_HDR_AUTH *rai, prs_struct *ps, int depth)
+BOOL smb_io_rpc_hdr_auth(const char *desc, RPC_HDR_AUTH *rai, prs_struct *ps, int depth)
{
if (rai == NULL)
return False;
@@ -653,7 +653,7 @@ BOOL smb_io_rpc_hdr_auth(char *desc, RPC_HDR_AUTH *rai, prs_struct *ps, int dept
********************************************************************/
BOOL rpc_auth_verifier_chk(RPC_AUTH_VERIFIER *rav,
- char *signature, uint32 msg_type)
+ const char *signature, uint32 msg_type)
{
return (strequal(rav->signature, signature) && rav->msg_type == msg_type);
}
@@ -663,7 +663,7 @@ BOOL rpc_auth_verifier_chk(RPC_AUTH_VERIFIER *rav,
********************************************************************/
void init_rpc_auth_verifier(RPC_AUTH_VERIFIER *rav,
- char *signature, uint32 msg_type)
+ const char *signature, uint32 msg_type)
{
fstrcpy(rav->signature, signature); /* "NTLMSSP" */
rav->msg_type = msg_type; /* NTLMSSP_MESSAGE_TYPE */
@@ -673,7 +673,7 @@ void init_rpc_auth_verifier(RPC_AUTH_VERIFIER *rav,
Reads or writes an RPC_AUTH_VERIFIER structure.
********************************************************************/
-BOOL smb_io_rpc_auth_verifier(char *desc, RPC_AUTH_VERIFIER *rav, prs_struct *ps, int depth)
+BOOL smb_io_rpc_auth_verifier(const char *desc, RPC_AUTH_VERIFIER *rav, prs_struct *ps, int depth)
{
if (rav == NULL)
return False;
@@ -717,7 +717,7 @@ void init_rpc_auth_ntlmssp_neg(RPC_AUTH_NTLMSSP_NEG *neg,
*** lkclXXXX HACK ALERT! ***
********************************************************************/
-BOOL smb_io_rpc_auth_ntlmssp_neg(char *desc, RPC_AUTH_NTLMSSP_NEG *neg, prs_struct *ps, int depth)
+BOOL smb_io_rpc_auth_ntlmssp_neg(const char *desc, RPC_AUTH_NTLMSSP_NEG *neg, prs_struct *ps, int depth)
{
uint32 start_offset = prs_offset(ps);
if (neg == NULL)
@@ -804,7 +804,7 @@ void init_rpc_auth_ntlmssp_chal(RPC_AUTH_NTLMSSP_CHAL *chl,
Reads or writes an RPC_AUTH_NTLMSSP_CHAL structure.
********************************************************************/
-BOOL smb_io_rpc_auth_ntlmssp_chal(char *desc, RPC_AUTH_NTLMSSP_CHAL *chl, prs_struct *ps, int depth)
+BOOL smb_io_rpc_auth_ntlmssp_chal(const char *desc, RPC_AUTH_NTLMSSP_CHAL *chl, prs_struct *ps, int depth)
{
if (chl == NULL)
return False;
@@ -908,7 +908,7 @@ void init_rpc_auth_ntlmssp_resp(RPC_AUTH_NTLMSSP_RESP *rsp,
*** lkclXXXX the actual offset is at the start of the auth verifier ***
********************************************************************/
-BOOL smb_io_rpc_auth_ntlmssp_resp(char *desc, RPC_AUTH_NTLMSSP_RESP *rsp, prs_struct *ps, int depth)
+BOOL smb_io_rpc_auth_ntlmssp_resp(const char *desc, RPC_AUTH_NTLMSSP_RESP *rsp, prs_struct *ps, int depth)
{
if (rsp == NULL)
return False;
@@ -1082,7 +1082,7 @@ void init_rpc_auth_ntlmssp_chk(RPC_AUTH_NTLMSSP_CHK *chk,
Reads or writes an RPC_AUTH_NTLMSSP_CHK structure.
********************************************************************/
-BOOL smb_io_rpc_auth_ntlmssp_chk(char *desc, RPC_AUTH_NTLMSSP_CHK *chk, prs_struct *ps, int depth)
+BOOL smb_io_rpc_auth_ntlmssp_chk(const char *desc, RPC_AUTH_NTLMSSP_CHK *chk, prs_struct *ps, int depth)
{
if (chk == NULL)
return False;
diff --git a/source3/rpc_parse/parse_samr.c b/source3/rpc_parse/parse_samr.c
index 61b13d1350e..918cdbcd1df 100644
--- a/source3/rpc_parse/parse_samr.c
+++ b/source3/rpc_parse/parse_samr.c
@@ -47,7 +47,7 @@ void init_samr_q_close_hnd(SAMR_Q_CLOSE_HND * q_c, POLICY_HND *hnd)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_close_hnd(char *desc, SAMR_Q_CLOSE_HND * q_u,
+BOOL samr_io_q_close_hnd(const char *desc, SAMR_Q_CLOSE_HND * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
@@ -66,7 +66,7 @@ BOOL samr_io_q_close_hnd(char *desc, SAMR_Q_CLOSE_HND * q_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_close_hnd(char *desc, SAMR_R_CLOSE_HND * r_u,
+BOOL samr_io_r_close_hnd(const char *desc, SAMR_R_CLOSE_HND * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
@@ -107,7 +107,7 @@ void init_samr_q_lookup_domain(SAMR_Q_LOOKUP_DOMAIN * q_u,
/*******************************************************************
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_lookup_domain(char *desc, SAMR_Q_LOOKUP_DOMAIN * q_u,
+BOOL samr_io_q_lookup_domain(const char *desc, SAMR_Q_LOOKUP_DOMAIN * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
@@ -152,7 +152,7 @@ void init_samr_r_lookup_domain(SAMR_R_LOOKUP_DOMAIN * r_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_lookup_domain(char *desc, SAMR_R_LOOKUP_DOMAIN * r_u,
+BOOL samr_io_r_lookup_domain(const char *desc, SAMR_R_LOOKUP_DOMAIN * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
@@ -196,7 +196,7 @@ void init_samr_q_unknown_2d(SAMR_Q_UNKNOWN_2D * q_u, POLICY_HND *dom_pol, DOM_SI
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_unknown_2d(char *desc, SAMR_Q_UNKNOWN_2D * q_u,
+BOOL samr_io_q_unknown_2d(const char *desc, SAMR_Q_UNKNOWN_2D * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
@@ -224,7 +224,7 @@ BOOL samr_io_q_unknown_2d(char *desc, SAMR_Q_UNKNOWN_2D * q_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_unknown_2d(char *desc, SAMR_R_UNKNOWN_2D * r_u,
+BOOL samr_io_r_unknown_2d(const char *desc, SAMR_R_UNKNOWN_2D * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
@@ -261,7 +261,7 @@ void init_samr_q_open_domain(SAMR_Q_OPEN_DOMAIN * q_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_open_domain(char *desc, SAMR_Q_OPEN_DOMAIN * q_u,
+BOOL samr_io_q_open_domain(const char *desc, SAMR_Q_OPEN_DOMAIN * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
@@ -289,7 +289,7 @@ BOOL samr_io_q_open_domain(char *desc, SAMR_Q_OPEN_DOMAIN * q_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_open_domain(char *desc, SAMR_R_OPEN_DOMAIN * r_u,
+BOOL samr_io_r_open_domain(const char *desc, SAMR_R_OPEN_DOMAIN * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
@@ -326,7 +326,7 @@ void init_samr_q_get_usrdom_pwinfo(SAMR_Q_GET_USRDOM_PWINFO * q_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_get_usrdom_pwinfo(char *desc, SAMR_Q_GET_USRDOM_PWINFO * q_u,
+BOOL samr_io_q_get_usrdom_pwinfo(const char *desc, SAMR_Q_GET_USRDOM_PWINFO * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
@@ -368,7 +368,7 @@ void init_samr_r_get_usrdom_pwinfo(SAMR_R_GET_USRDOM_PWINFO *r_u, NTSTATUS statu
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_get_usrdom_pwinfo(char *desc, SAMR_R_GET_USRDOM_PWINFO * r_u,
+BOOL samr_io_r_get_usrdom_pwinfo(const char *desc, SAMR_R_GET_USRDOM_PWINFO * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
@@ -397,7 +397,7 @@ BOOL samr_io_r_get_usrdom_pwinfo(char *desc, SAMR_R_GET_USRDOM_PWINFO * r_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_set_sec_obj(char *desc, SAMR_Q_SET_SEC_OBJ * q_u,
+BOOL samr_io_q_set_sec_obj(const char *desc, SAMR_Q_SET_SEC_OBJ * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
@@ -440,7 +440,7 @@ void init_samr_q_query_sec_obj(SAMR_Q_QUERY_SEC_OBJ * q_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_query_sec_obj(char *desc, SAMR_Q_QUERY_SEC_OBJ * q_u,
+BOOL samr_io_q_query_sec_obj(const char *desc, SAMR_Q_QUERY_SEC_OBJ * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
@@ -478,7 +478,7 @@ void init_samr_q_query_dom_info(SAMR_Q_QUERY_DOMAIN_INFO * q_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_query_dom_info(char *desc, SAMR_Q_QUERY_DOMAIN_INFO * q_u,
+BOOL samr_io_q_query_dom_info(const char *desc, SAMR_Q_QUERY_DOMAIN_INFO * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
@@ -514,7 +514,7 @@ void init_unk_info3(SAM_UNK_INFO_3 *u_3, NTTIME nt_logout)
reads or writes a structure.
********************************************************************/
-static BOOL sam_io_unk_info3(char *desc, SAM_UNK_INFO_3 * u_3,
+static BOOL sam_io_unk_info3(const char *desc, SAM_UNK_INFO_3 * u_3,
prs_struct *ps, int depth)
{
if (u_3 == NULL)
@@ -544,7 +544,7 @@ void init_unk_info6(SAM_UNK_INFO_6 * u_6)
reads or writes a structure.
********************************************************************/
-static BOOL sam_io_unk_info6(char *desc, SAM_UNK_INFO_6 * u_6,
+static BOOL sam_io_unk_info6(const char *desc, SAM_UNK_INFO_6 * u_6,
prs_struct *ps, int depth)
{
if (u_6 == NULL)
@@ -576,7 +576,7 @@ void init_unk_info7(SAM_UNK_INFO_7 * u_7)
reads or writes a structure.
********************************************************************/
-static BOOL sam_io_unk_info7(char *desc, SAM_UNK_INFO_7 * u_7,
+static BOOL sam_io_unk_info7(const char *desc, SAM_UNK_INFO_7 * u_7,
prs_struct *ps, int depth)
{
if (u_7 == NULL)
@@ -609,7 +609,7 @@ void init_unk_info12(SAM_UNK_INFO_12 * u_12, NTTIME nt_lock_duration, NTTIME nt_
reads or writes a structure.
********************************************************************/
-static BOOL sam_io_unk_info12(char *desc, SAM_UNK_INFO_12 * u_12,
+static BOOL sam_io_unk_info12(const char *desc, SAM_UNK_INFO_12 * u_12,
prs_struct *ps, int depth)
{
if (u_12 == NULL)
@@ -644,7 +644,7 @@ void init_unk_info5(SAM_UNK_INFO_5 * u_5,const char *server)
reads or writes a structure.
********************************************************************/
-static BOOL sam_io_unk_info5(char *desc, SAM_UNK_INFO_5 * u_5,
+static BOOL sam_io_unk_info5(const char *desc, SAM_UNK_INFO_5 * u_5,
prs_struct *ps, int depth)
{
if (u_5 == NULL)
@@ -700,7 +700,7 @@ void init_unk_info2(SAM_UNK_INFO_2 * u_2,
reads or writes a structure.
********************************************************************/
-static BOOL sam_io_unk_info2(char *desc, SAM_UNK_INFO_2 * u_2,
+static BOOL sam_io_unk_info2(const char *desc, SAM_UNK_INFO_2 * u_2,
prs_struct *ps, int depth)
{
if (u_2 == NULL)
@@ -787,7 +787,7 @@ void init_unk_info1(SAM_UNK_INFO_1 *u_1, uint16 min_pass_len, uint16 pass_hist,
reads or writes a structure.
********************************************************************/
-static BOOL sam_io_unk_info1(char *desc, SAM_UNK_INFO_1 * u_1,
+static BOOL sam_io_unk_info1(const char *desc, SAM_UNK_INFO_1 * u_1,
prs_struct *ps, int depth)
{
if (u_1 == NULL)
@@ -835,7 +835,7 @@ void init_samr_r_query_dom_info(SAMR_R_QUERY_DOMAIN_INFO * r_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_query_dom_info(char *desc, SAMR_R_QUERY_DOMAIN_INFO * r_u,
+BOOL samr_io_r_query_dom_info(const char *desc, SAMR_R_QUERY_DOMAIN_INFO * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
@@ -906,7 +906,7 @@ BOOL samr_io_r_query_dom_info(char *desc, SAMR_R_QUERY_DOMAIN_INFO * r_u,
reads or writes a SAMR_R_SET_SEC_OBJ structure.
********************************************************************/
-BOOL samr_io_r_set_sec_obj(char *desc, SAMR_R_SET_SEC_OBJ * r_u,
+BOOL samr_io_r_set_sec_obj(const char *desc, SAMR_R_SET_SEC_OBJ * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
@@ -928,7 +928,7 @@ BOOL samr_io_r_set_sec_obj(char *desc, SAMR_R_SET_SEC_OBJ * r_u,
reads or writes a SAMR_R_QUERY_SEC_OBJ structure.
********************************************************************/
-BOOL samr_io_r_query_sec_obj(char *desc, SAMR_R_QUERY_SEC_OBJ * r_u,
+BOOL samr_io_r_query_sec_obj(const char *desc, SAMR_R_QUERY_SEC_OBJ * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
@@ -957,7 +957,7 @@ BOOL samr_io_r_query_sec_obj(char *desc, SAMR_R_QUERY_SEC_OBJ * r_u,
reads or writes a SAM_STR1 structure.
********************************************************************/
-static BOOL sam_io_sam_str1(char *desc, SAM_STR1 * sam, uint32 acct_buf,
+static BOOL sam_io_sam_str1(const char *desc, SAM_STR1 * sam, uint32 acct_buf,
uint32 name_buf, uint32 desc_buf,
prs_struct *ps, int depth)
{
@@ -1007,7 +1007,7 @@ static void init_sam_entry1(SAM_ENTRY1 * sam, uint32 user_idx,
reads or writes a SAM_ENTRY1 structure.
********************************************************************/
-static BOOL sam_io_sam_entry1(char *desc, SAM_ENTRY1 * sam,
+static BOOL sam_io_sam_entry1(const char *desc, SAM_ENTRY1 * sam,
prs_struct *ps, int depth)
{
if (sam == NULL)
@@ -1044,7 +1044,7 @@ static BOOL sam_io_sam_entry1(char *desc, SAM_ENTRY1 * sam,
reads or writes a SAM_STR2 structure.
********************************************************************/
-static BOOL sam_io_sam_str2(char *desc, SAM_STR2 * sam, uint32 acct_buf,
+static BOOL sam_io_sam_str2(const char *desc, SAM_STR2 * sam, uint32 acct_buf,
uint32 desc_buf, prs_struct *ps, int depth)
{
if (sam == NULL)
@@ -1085,7 +1085,7 @@ static void init_sam_entry2(SAM_ENTRY2 * sam, uint32 user_idx,
reads or writes a SAM_ENTRY2 structure.
********************************************************************/
-static BOOL sam_io_sam_entry2(char *desc, SAM_ENTRY2 * sam,
+static BOOL sam_io_sam_entry2(const char *desc, SAM_ENTRY2 * sam,
prs_struct *ps, int depth)
{
if (sam == NULL)
@@ -1120,7 +1120,7 @@ static BOOL sam_io_sam_entry2(char *desc, SAM_ENTRY2 * sam,
reads or writes a SAM_STR3 structure.
********************************************************************/
-static BOOL sam_io_sam_str3(char *desc, SAM_STR3 * sam, uint32 acct_buf,
+static BOOL sam_io_sam_str3(const char *desc, SAM_STR3 * sam, uint32 acct_buf,
uint32 desc_buf, prs_struct *ps, int depth)
{
if (sam == NULL)
@@ -1162,7 +1162,7 @@ static void init_sam_entry3(SAM_ENTRY3 * sam, uint32 grp_idx,
reads or writes a SAM_ENTRY3 structure.
********************************************************************/
-static BOOL sam_io_sam_entry3(char *desc, SAM_ENTRY3 * sam,
+static BOOL sam_io_sam_entry3(const char *desc, SAM_ENTRY3 * sam,
prs_struct *ps, int depth)
{
if (sam == NULL)
@@ -1207,7 +1207,7 @@ static void init_sam_entry4(SAM_ENTRY4 * sam, uint32 user_idx,
reads or writes a SAM_ENTRY4 structure.
********************************************************************/
-static BOOL sam_io_sam_entry4(char *desc, SAM_ENTRY4 * sam,
+static BOOL sam_io_sam_entry4(const char *desc, SAM_ENTRY4 * sam,
prs_struct *ps, int depth)
{
if (sam == NULL)
@@ -1245,7 +1245,7 @@ static void init_sam_entry5(SAM_ENTRY5 * sam, uint32 grp_idx,
reads or writes a SAM_ENTRY5 structure.
********************************************************************/
-static BOOL sam_io_sam_entry5(char *desc, SAM_ENTRY5 * sam,
+static BOOL sam_io_sam_entry5(const char *desc, SAM_ENTRY5 * sam,
prs_struct *ps, int depth)
{
if (sam == NULL)
@@ -1281,7 +1281,7 @@ void init_sam_entry(SAM_ENTRY * sam, uint32 len_sam_name, uint32 rid)
reads or writes a SAM_ENTRY structure.
********************************************************************/
-static BOOL sam_io_sam_entry(char *desc, SAM_ENTRY * sam,
+static BOOL sam_io_sam_entry(const char *desc, SAM_ENTRY * sam,
prs_struct *ps, int depth)
{
if (sam == NULL)
@@ -1322,7 +1322,7 @@ void init_samr_q_enum_dom_users(SAMR_Q_ENUM_DOM_USERS * q_e, POLICY_HND *pol,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_enum_dom_users(char *desc, SAMR_Q_ENUM_DOM_USERS * q_e,
+BOOL samr_io_q_enum_dom_users(const char *desc, SAMR_Q_ENUM_DOM_USERS * q_e,
prs_struct *ps, int depth)
{
if (q_e == NULL)
@@ -1380,7 +1380,7 @@ void init_samr_r_enum_dom_users(SAMR_R_ENUM_DOM_USERS * r_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_enum_dom_users(char *desc, SAMR_R_ENUM_DOM_USERS * r_u,
+BOOL samr_io_r_enum_dom_users(const char *desc, SAMR_R_ENUM_DOM_USERS * r_u,
prs_struct *ps, int depth)
{
uint32 i;
@@ -1465,7 +1465,7 @@ void init_samr_q_query_dispinfo(SAMR_Q_QUERY_DISPINFO * q_e, POLICY_HND *pol,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_query_dispinfo(char *desc, SAMR_Q_QUERY_DISPINFO * q_e,
+BOOL samr_io_q_query_dispinfo(const char *desc, SAMR_Q_QUERY_DISPINFO * q_e,
prs_struct *ps, int depth)
{
if (q_e == NULL)
@@ -1585,7 +1585,7 @@ NTSTATUS init_sam_dispinfo_1(TALLOC_CTX *ctx, SAM_DISPINFO_1 *sam, uint32 num_en
reads or writes a structure.
********************************************************************/
-static BOOL sam_io_sam_dispinfo_1(char *desc, SAM_DISPINFO_1 * sam,
+static BOOL sam_io_sam_dispinfo_1(const char *desc, SAM_DISPINFO_1 * sam,
uint32 num_entries,
prs_struct *ps, int depth)
{
@@ -1702,7 +1702,7 @@ NTSTATUS init_sam_dispinfo_2(TALLOC_CTX *ctx, SAM_DISPINFO_2 *sam, uint32 num_en
reads or writes a structure.
********************************************************************/
-static BOOL sam_io_sam_dispinfo_2(char *desc, SAM_DISPINFO_2 * sam,
+static BOOL sam_io_sam_dispinfo_2(const char *desc, SAM_DISPINFO_2 * sam,
uint32 num_entries,
prs_struct *ps, int depth)
{
@@ -1796,7 +1796,7 @@ NTSTATUS init_sam_dispinfo_3(TALLOC_CTX *ctx, SAM_DISPINFO_3 *sam, uint32 num_en
reads or writes a structure.
********************************************************************/
-static BOOL sam_io_sam_dispinfo_3(char *desc, SAM_DISPINFO_3 * sam,
+static BOOL sam_io_sam_dispinfo_3(const char *desc, SAM_DISPINFO_3 * sam,
uint32 num_entries,
prs_struct *ps, int depth)
{
@@ -1888,7 +1888,7 @@ NTSTATUS init_sam_dispinfo_4(TALLOC_CTX *ctx, SAM_DISPINFO_4 *sam, uint32 num_en
reads or writes a structure.
********************************************************************/
-static BOOL sam_io_sam_dispinfo_4(char *desc, SAM_DISPINFO_4 * sam,
+static BOOL sam_io_sam_dispinfo_4(const char *desc, SAM_DISPINFO_4 * sam,
uint32 num_entries,
prs_struct *ps, int depth)
{
@@ -1978,7 +1978,7 @@ NTSTATUS init_sam_dispinfo_5(TALLOC_CTX *ctx, SAM_DISPINFO_5 *sam, uint32 num_en
reads or writes a structure.
********************************************************************/
-static BOOL sam_io_sam_dispinfo_5(char *desc, SAM_DISPINFO_5 * sam,
+static BOOL sam_io_sam_dispinfo_5(const char *desc, SAM_DISPINFO_5 * sam,
uint32 num_entries,
prs_struct *ps, int depth)
{
@@ -2057,7 +2057,7 @@ void init_samr_r_query_dispinfo(SAMR_R_QUERY_DISPINFO * r_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_query_dispinfo(char *desc, SAMR_R_QUERY_DISPINFO * r_u,
+BOOL samr_io_r_query_dispinfo(const char *desc, SAMR_R_QUERY_DISPINFO * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
@@ -2155,7 +2155,7 @@ void init_samr_q_open_group(SAMR_Q_OPEN_GROUP * q_c,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_open_group(char *desc, SAMR_Q_OPEN_GROUP * q_u,
+BOOL samr_io_q_open_group(const char *desc, SAMR_Q_OPEN_GROUP * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
@@ -2182,7 +2182,7 @@ BOOL samr_io_q_open_group(char *desc, SAMR_Q_OPEN_GROUP * q_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_open_group(char *desc, SAMR_R_OPEN_GROUP * r_u,
+BOOL samr_io_r_open_group(const char *desc, SAMR_R_OPEN_GROUP * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
@@ -2231,7 +2231,7 @@ void init_samr_group_info1(GROUP_INFO1 * gr1,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_group_info1(char *desc, GROUP_INFO1 * gr1,
+BOOL samr_io_group_info1(const char *desc, GROUP_INFO1 * gr1,
prs_struct *ps, int depth)
{
if (gr1 == NULL)
@@ -2280,7 +2280,7 @@ void init_samr_group_info3(GROUP_INFO3 *gr3)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_group_info3(char *desc, GROUP_INFO3 *gr3, prs_struct *ps, int depth)
+BOOL samr_io_group_info3(const char *desc, GROUP_INFO3 *gr3, prs_struct *ps, int depth)
{
if (gr3 == NULL)
return False;
@@ -2315,7 +2315,7 @@ void init_samr_group_info4(GROUP_INFO4 * gr4, char *acct_desc)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_group_info4(char *desc, GROUP_INFO4 * gr4,
+BOOL samr_io_group_info4(const char *desc, GROUP_INFO4 * gr4,
prs_struct *ps, int depth)
{
if (gr4 == NULL)
@@ -2340,7 +2340,7 @@ BOOL samr_io_group_info4(char *desc, GROUP_INFO4 * gr4,
reads or writes a structure.
********************************************************************/
-static BOOL samr_group_info_ctr(char *desc, GROUP_INFO_CTR **ctr,
+static BOOL samr_group_info_ctr(const char *desc, GROUP_INFO_CTR **ctr,
prs_struct *ps, int depth)
{
if (UNMARSHALLING(ps))
@@ -2400,7 +2400,7 @@ void init_samr_q_create_dom_group(SAMR_Q_CREATE_DOM_GROUP * q_e,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_create_dom_group(char *desc, SAMR_Q_CREATE_DOM_GROUP * q_e,
+BOOL samr_io_q_create_dom_group(const char *desc, SAMR_Q_CREATE_DOM_GROUP * q_e,
prs_struct *ps, int depth)
{
if (q_e == NULL)
@@ -2433,7 +2433,7 @@ BOOL samr_io_q_create_dom_group(char *desc, SAMR_Q_CREATE_DOM_GROUP * q_e,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_create_dom_group(char *desc, SAMR_R_CREATE_DOM_GROUP * r_u,
+BOOL samr_io_r_create_dom_group(const char *desc, SAMR_R_CREATE_DOM_GROUP * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
@@ -2472,7 +2472,7 @@ void init_samr_q_delete_dom_group(SAMR_Q_DELETE_DOM_GROUP * q_c,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_delete_dom_group(char *desc, SAMR_Q_DELETE_DOM_GROUP * q_u,
+BOOL samr_io_q_delete_dom_group(const char *desc, SAMR_Q_DELETE_DOM_GROUP * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
@@ -2494,7 +2494,7 @@ BOOL samr_io_q_delete_dom_group(char *desc, SAMR_Q_DELETE_DOM_GROUP * q_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_delete_dom_group(char *desc, SAMR_R_DELETE_DOM_GROUP * r_u,
+BOOL samr_io_r_delete_dom_group(const char *desc, SAMR_R_DELETE_DOM_GROUP * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
@@ -2532,7 +2532,7 @@ void init_samr_q_del_groupmem(SAMR_Q_DEL_GROUPMEM * q_e,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_del_groupmem(char *desc, SAMR_Q_DEL_GROUPMEM * q_e,
+BOOL samr_io_q_del_groupmem(const char *desc, SAMR_Q_DEL_GROUPMEM * q_e,
prs_struct *ps, int depth)
{
if (q_e == NULL)
@@ -2569,7 +2569,7 @@ void init_samr_r_del_groupmem(SAMR_R_DEL_GROUPMEM * r_u, POLICY_HND *pol,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_del_groupmem(char *desc, SAMR_R_DEL_GROUPMEM * r_u,
+BOOL samr_io_r_del_groupmem(const char *desc, SAMR_R_DEL_GROUPMEM * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
@@ -2605,7 +2605,7 @@ void init_samr_q_add_groupmem(SAMR_Q_ADD_GROUPMEM * q_e,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_add_groupmem(char *desc, SAMR_Q_ADD_GROUPMEM * q_e,
+BOOL samr_io_q_add_groupmem(const char *desc, SAMR_Q_ADD_GROUPMEM * q_e,
prs_struct *ps, int depth)
{
if (q_e == NULL)
@@ -2644,7 +2644,7 @@ void init_samr_r_add_groupmem(SAMR_R_ADD_GROUPMEM * r_u, POLICY_HND *pol,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_add_groupmem(char *desc, SAMR_R_ADD_GROUPMEM * r_u,
+BOOL samr_io_r_add_groupmem(const char *desc, SAMR_R_ADD_GROUPMEM * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
@@ -2679,7 +2679,7 @@ void init_samr_q_set_groupinfo(SAMR_Q_SET_GROUPINFO * q_e,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_set_groupinfo(char *desc, SAMR_Q_SET_GROUPINFO * q_e,
+BOOL samr_io_q_set_groupinfo(const char *desc, SAMR_Q_SET_GROUPINFO * q_e,
prs_struct *ps, int depth)
{
if (q_e == NULL)
@@ -2715,7 +2715,7 @@ void init_samr_r_set_groupinfo(SAMR_R_SET_GROUPINFO * r_u, NTSTATUS status)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_set_groupinfo(char *desc, SAMR_R_SET_GROUPINFO * r_u,
+BOOL samr_io_r_set_groupinfo(const char *desc, SAMR_R_SET_GROUPINFO * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
@@ -2751,7 +2751,7 @@ void init_samr_q_query_groupinfo(SAMR_Q_QUERY_GROUPINFO * q_e,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_query_groupinfo(char *desc, SAMR_Q_QUERY_GROUPINFO * q_e,
+BOOL samr_io_q_query_groupinfo(const char *desc, SAMR_Q_QUERY_GROUPINFO * q_e,
prs_struct *ps, int depth)
{
if (q_e == NULL)
@@ -2790,7 +2790,7 @@ void init_samr_r_query_groupinfo(SAMR_R_QUERY_GROUPINFO * r_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_query_groupinfo(char *desc, SAMR_R_QUERY_GROUPINFO * r_u,
+BOOL samr_io_r_query_groupinfo(const char *desc, SAMR_R_QUERY_GROUPINFO * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
@@ -2833,7 +2833,7 @@ void init_samr_q_query_groupmem(SAMR_Q_QUERY_GROUPMEM * q_c, POLICY_HND *hnd)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_query_groupmem(char *desc, SAMR_Q_QUERY_GROUPMEM * q_u,
+BOOL samr_io_q_query_groupmem(const char *desc, SAMR_Q_QUERY_GROUPMEM * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
@@ -2885,7 +2885,7 @@ void init_samr_r_query_groupmem(SAMR_R_QUERY_GROUPMEM * r_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_query_groupmem(char *desc, SAMR_R_QUERY_GROUPMEM * r_u,
+BOOL samr_io_r_query_groupmem(const char *desc, SAMR_R_QUERY_GROUPMEM * r_u,
prs_struct *ps, int depth)
{
uint32 i;
@@ -2967,7 +2967,7 @@ void init_samr_q_query_usergroups(SAMR_Q_QUERY_USERGROUPS * q_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_query_usergroups(char *desc, SAMR_Q_QUERY_USERGROUPS * q_u,
+BOOL samr_io_q_query_usergroups(const char *desc, SAMR_Q_QUERY_USERGROUPS * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
@@ -3016,7 +3016,7 @@ void init_samr_r_query_usergroups(SAMR_R_QUERY_USERGROUPS * r_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_gids(char *desc, uint32 *num_gids, DOM_GID ** gid,
+BOOL samr_io_gids(const char *desc, uint32 *num_gids, DOM_GID ** gid,
prs_struct *ps, int depth)
{
uint32 i;
@@ -3054,7 +3054,7 @@ BOOL samr_io_gids(char *desc, uint32 *num_gids, DOM_GID ** gid,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_query_usergroups(char *desc, SAMR_R_QUERY_USERGROUPS * r_u,
+BOOL samr_io_r_query_usergroups(const char *desc, SAMR_R_QUERY_USERGROUPS * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
@@ -3109,7 +3109,7 @@ void init_samr_q_enum_domains(SAMR_Q_ENUM_DOMAINS * q_e,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_enum_domains(char *desc, SAMR_Q_ENUM_DOMAINS * q_e,
+BOOL samr_io_q_enum_domains(const char *desc, SAMR_Q_ENUM_DOMAINS * q_e,
prs_struct *ps, int depth)
{
if (q_e == NULL)
@@ -3161,7 +3161,7 @@ void init_samr_r_enum_domains(SAMR_R_ENUM_DOMAINS * r_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_enum_domains(char *desc, SAMR_R_ENUM_DOMAINS * r_u,
+BOOL samr_io_r_enum_domains(const char *desc, SAMR_R_ENUM_DOMAINS * r_u,
prs_struct *ps, int depth)
{
uint32 i;
@@ -3248,7 +3248,7 @@ void init_samr_q_enum_dom_groups(SAMR_Q_ENUM_DOM_GROUPS * q_e,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_enum_dom_groups(char *desc, SAMR_Q_ENUM_DOM_GROUPS * q_e,
+BOOL samr_io_q_enum_dom_groups(const char *desc, SAMR_Q_ENUM_DOM_GROUPS * q_e,
prs_struct *ps, int depth)
{
if (q_e == NULL)
@@ -3300,7 +3300,7 @@ void init_samr_r_enum_dom_groups(SAMR_R_ENUM_DOM_GROUPS * r_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_enum_dom_groups(char *desc, SAMR_R_ENUM_DOM_GROUPS * r_u,
+BOOL samr_io_r_enum_dom_groups(const char *desc, SAMR_R_ENUM_DOM_GROUPS * r_u,
prs_struct *ps, int depth)
{
uint32 i;
@@ -3383,7 +3383,7 @@ void init_samr_q_enum_dom_aliases(SAMR_Q_ENUM_DOM_ALIASES * q_e,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_enum_dom_aliases(char *desc, SAMR_Q_ENUM_DOM_ALIASES * q_e,
+BOOL samr_io_q_enum_dom_aliases(const char *desc, SAMR_Q_ENUM_DOM_ALIASES * q_e,
prs_struct *ps, int depth)
{
if (q_e == NULL)
@@ -3434,7 +3434,7 @@ void init_samr_r_enum_dom_aliases(SAMR_R_ENUM_DOM_ALIASES *r_u, uint32 next_idx,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_enum_dom_aliases(char *desc, SAMR_R_ENUM_DOM_ALIASES * r_u,
+BOOL samr_io_r_enum_dom_aliases(const char *desc, SAMR_R_ENUM_DOM_ALIASES * r_u,
prs_struct *ps, int depth)
{
uint32 i;
@@ -3521,7 +3521,7 @@ void init_samr_alias_info1(ALIAS_INFO1 * al1, char *acct_name, uint32 num_member
reads or writes a structure.
********************************************************************/
-BOOL samr_io_alias_info1(char *desc, ALIAS_INFO1 * al1,
+BOOL samr_io_alias_info1(const char *desc, ALIAS_INFO1 * al1,
prs_struct *ps, int depth)
{
if (al1 == NULL)
@@ -3572,7 +3572,7 @@ void init_samr_alias_info3(ALIAS_INFO3 * al3, char *acct_desc)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_alias_info3(char *desc, ALIAS_INFO3 * al3,
+BOOL samr_io_alias_info3(const char *desc, ALIAS_INFO3 * al3,
prs_struct *ps, int depth)
{
if (al3 == NULL)
@@ -3597,7 +3597,7 @@ BOOL samr_io_alias_info3(char *desc, ALIAS_INFO3 * al3,
reads or writes a structure.
********************************************************************/
-BOOL samr_alias_info_ctr(char *desc, ALIAS_INFO_CTR * ctr,
+BOOL samr_alias_info_ctr(const char *desc, ALIAS_INFO_CTR * ctr,
prs_struct *ps, int depth)
{
if (ctr == NULL)
@@ -3645,7 +3645,7 @@ void init_samr_q_query_aliasinfo(SAMR_Q_QUERY_ALIASINFO * q_e,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_query_aliasinfo(char *desc, SAMR_Q_QUERY_ALIASINFO * q_e,
+BOOL samr_io_q_query_aliasinfo(const char *desc, SAMR_Q_QUERY_ALIASINFO * q_e,
prs_struct *ps, int depth)
{
if (q_e == NULL)
@@ -3684,7 +3684,7 @@ void init_samr_r_query_aliasinfo(SAMR_R_QUERY_ALIASINFO * r_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_query_aliasinfo(char *desc, SAMR_R_QUERY_ALIASINFO * r_u,
+BOOL samr_io_r_query_aliasinfo(const char *desc, SAMR_R_QUERY_ALIASINFO * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
@@ -3729,7 +3729,7 @@ void init_samr_q_set_aliasinfo(SAMR_Q_SET_ALIASINFO * q_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_set_aliasinfo(char *desc, SAMR_Q_SET_ALIASINFO * q_u,
+BOOL samr_io_q_set_aliasinfo(const char *desc, SAMR_Q_SET_ALIASINFO * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
@@ -3753,7 +3753,7 @@ BOOL samr_io_q_set_aliasinfo(char *desc, SAMR_Q_SET_ALIASINFO * q_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_set_aliasinfo(char *desc, SAMR_R_SET_ALIASINFO * r_u,
+BOOL samr_io_r_set_aliasinfo(const char *desc, SAMR_R_SET_ALIASINFO * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
@@ -3795,7 +3795,7 @@ void init_samr_q_query_useraliases(SAMR_Q_QUERY_USERALIASES * q_u,
reads or writes a SAMR_Q_QUERY_USERALIASES structure.
********************************************************************/
-BOOL samr_io_q_query_useraliases(char *desc, SAMR_Q_QUERY_USERALIASES * q_u,
+BOOL samr_io_q_query_useraliases(const char *desc, SAMR_Q_QUERY_USERALIASES * q_u,
prs_struct *ps, int depth)
{
fstring tmp;
@@ -3880,7 +3880,7 @@ void init_samr_r_query_useraliases(SAMR_R_QUERY_USERALIASES * r_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_rids(char *desc, uint32 *num_rids, uint32 **rid,
+BOOL samr_io_rids(const char *desc, uint32 *num_rids, uint32 **rid,
prs_struct *ps, int depth)
{
fstring tmp;
@@ -3919,7 +3919,7 @@ BOOL samr_io_rids(char *desc, uint32 *num_rids, uint32 **rid,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_query_useraliases(char *desc, SAMR_R_QUERY_USERALIASES * r_u,
+BOOL samr_io_r_query_useraliases(const char *desc, SAMR_R_QUERY_USERALIASES * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
@@ -3967,7 +3967,7 @@ void init_samr_q_open_alias(SAMR_Q_OPEN_ALIAS * q_u, POLICY_HND *pol,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_open_alias(char *desc, SAMR_Q_OPEN_ALIAS * q_u,
+BOOL samr_io_q_open_alias(const char *desc, SAMR_Q_OPEN_ALIAS * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
@@ -3994,7 +3994,7 @@ BOOL samr_io_q_open_alias(char *desc, SAMR_Q_OPEN_ALIAS * q_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_open_alias(char *desc, SAMR_R_OPEN_ALIAS * r_u,
+BOOL samr_io_r_open_alias(const char *desc, SAMR_R_OPEN_ALIAS * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
@@ -4044,7 +4044,7 @@ void init_samr_q_lookup_rids(TALLOC_CTX *ctx, SAMR_Q_LOOKUP_RIDS * q_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_lookup_rids(char *desc, SAMR_Q_LOOKUP_RIDS * q_u,
+BOOL samr_io_q_lookup_rids(const char *desc, SAMR_Q_LOOKUP_RIDS * q_u,
prs_struct *ps, int depth)
{
uint32 i;
@@ -4130,7 +4130,7 @@ void init_samr_r_lookup_rids(SAMR_R_LOOKUP_RIDS * r_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_lookup_rids(char *desc, SAMR_R_LOOKUP_RIDS * r_u,
+BOOL samr_io_r_lookup_rids(const char *desc, SAMR_R_LOOKUP_RIDS * r_u,
prs_struct *ps, int depth)
{
uint32 i;
@@ -4224,7 +4224,7 @@ void init_samr_q_delete_alias(SAMR_Q_DELETE_DOM_ALIAS * q_u, POLICY_HND *hnd)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_delete_alias(char *desc, SAMR_Q_DELETE_DOM_ALIAS * q_u,
+BOOL samr_io_q_delete_alias(const char *desc, SAMR_Q_DELETE_DOM_ALIAS * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
@@ -4246,7 +4246,7 @@ BOOL samr_io_q_delete_alias(char *desc, SAMR_Q_DELETE_DOM_ALIAS * q_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_delete_alias(char *desc, SAMR_R_DELETE_DOM_ALIAS * r_u,
+BOOL samr_io_r_delete_alias(const char *desc, SAMR_R_DELETE_DOM_ALIAS * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
@@ -4289,7 +4289,7 @@ void init_samr_q_create_dom_alias(SAMR_Q_CREATE_DOM_ALIAS * q_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_create_dom_alias(char *desc, SAMR_Q_CREATE_DOM_ALIAS * q_u,
+BOOL samr_io_q_create_dom_alias(const char *desc, SAMR_Q_CREATE_DOM_ALIAS * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
@@ -4322,7 +4322,7 @@ BOOL samr_io_q_create_dom_alias(char *desc, SAMR_Q_CREATE_DOM_ALIAS * q_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_create_dom_alias(char *desc, SAMR_R_CREATE_DOM_ALIAS * r_u,
+BOOL samr_io_r_create_dom_alias(const char *desc, SAMR_R_CREATE_DOM_ALIAS * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
@@ -4363,7 +4363,7 @@ void init_samr_q_add_aliasmem(SAMR_Q_ADD_ALIASMEM * q_u, POLICY_HND *hnd,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_add_aliasmem(char *desc, SAMR_Q_ADD_ALIASMEM * q_u,
+BOOL samr_io_q_add_aliasmem(const char *desc, SAMR_Q_ADD_ALIASMEM * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
@@ -4387,7 +4387,7 @@ BOOL samr_io_q_add_aliasmem(char *desc, SAMR_Q_ADD_ALIASMEM * q_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_add_aliasmem(char *desc, SAMR_R_ADD_ALIASMEM * r_u,
+BOOL samr_io_r_add_aliasmem(const char *desc, SAMR_R_ADD_ALIASMEM * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
@@ -4422,7 +4422,7 @@ void init_samr_q_del_aliasmem(SAMR_Q_DEL_ALIASMEM * q_u, POLICY_HND *hnd,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_del_aliasmem(char *desc, SAMR_Q_DEL_ALIASMEM * q_u,
+BOOL samr_io_q_del_aliasmem(const char *desc, SAMR_Q_DEL_ALIASMEM * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
@@ -4446,7 +4446,7 @@ BOOL samr_io_q_del_aliasmem(char *desc, SAMR_Q_DEL_ALIASMEM * q_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_del_aliasmem(char *desc, SAMR_R_DEL_ALIASMEM * r_u,
+BOOL samr_io_r_del_aliasmem(const char *desc, SAMR_R_DEL_ALIASMEM * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
@@ -4480,7 +4480,7 @@ void init_samr_q_delete_dom_alias(SAMR_Q_DELETE_DOM_ALIAS * q_c,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_delete_dom_alias(char *desc, SAMR_Q_DELETE_DOM_ALIAS * q_u,
+BOOL samr_io_q_delete_dom_alias(const char *desc, SAMR_Q_DELETE_DOM_ALIAS * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
@@ -4514,7 +4514,7 @@ void init_samr_r_delete_dom_alias(SAMR_R_DELETE_DOM_ALIAS * r_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_delete_dom_alias(char *desc, SAMR_R_DELETE_DOM_ALIAS * r_u,
+BOOL samr_io_r_delete_dom_alias(const char *desc, SAMR_R_DELETE_DOM_ALIAS * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
@@ -4548,7 +4548,7 @@ void init_samr_q_query_aliasmem(SAMR_Q_QUERY_ALIASMEM * q_c,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_query_aliasmem(char *desc, SAMR_Q_QUERY_ALIASMEM * q_u,
+BOOL samr_io_q_query_aliasmem(const char *desc, SAMR_Q_QUERY_ALIASMEM * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
@@ -4594,7 +4594,7 @@ void init_samr_r_query_aliasmem(SAMR_R_QUERY_ALIASMEM * r_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_query_aliasmem(char *desc, SAMR_R_QUERY_ALIASMEM * r_u,
+BOOL samr_io_r_query_aliasmem(const char *desc, SAMR_R_QUERY_ALIASMEM * r_u,
prs_struct *ps, int depth)
{
uint32 i;
@@ -4682,7 +4682,7 @@ NTSTATUS init_samr_q_lookup_names(TALLOC_CTX *ctx, SAMR_Q_LOOKUP_NAMES * q_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_lookup_names(char *desc, SAMR_Q_LOOKUP_NAMES * q_u,
+BOOL samr_io_q_lookup_names(const char *desc, SAMR_Q_LOOKUP_NAMES * q_u,
prs_struct *ps, int depth)
{
uint32 i;
@@ -4791,7 +4791,7 @@ NTSTATUS init_samr_r_lookup_names(TALLOC_CTX *ctx, SAMR_R_LOOKUP_NAMES * r_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_lookup_names(char *desc, SAMR_R_LOOKUP_NAMES * r_u,
+BOOL samr_io_r_lookup_names(const char *desc, SAMR_R_LOOKUP_NAMES * r_u,
prs_struct *ps, int depth)
{
uint32 i;
@@ -4889,7 +4889,7 @@ void init_samr_q_delete_dom_user(SAMR_Q_DELETE_DOM_USER * q_c,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_delete_dom_user(char *desc, SAMR_Q_DELETE_DOM_USER * q_u,
+BOOL samr_io_q_delete_dom_user(const char *desc, SAMR_Q_DELETE_DOM_USER * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
@@ -4911,7 +4911,7 @@ BOOL samr_io_q_delete_dom_user(char *desc, SAMR_Q_DELETE_DOM_USER * q_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_delete_dom_user(char *desc, SAMR_R_DELETE_DOM_USER * r_u,
+BOOL samr_io_r_delete_dom_user(const char *desc, SAMR_R_DELETE_DOM_USER * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
@@ -4950,7 +4950,7 @@ void init_samr_q_open_user(SAMR_Q_OPEN_USER * q_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_open_user(char *desc, SAMR_Q_OPEN_USER * q_u,
+BOOL samr_io_q_open_user(const char *desc, SAMR_Q_OPEN_USER * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
@@ -4977,7 +4977,7 @@ BOOL samr_io_q_open_user(char *desc, SAMR_Q_OPEN_USER * q_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_open_user(char *desc, SAMR_R_OPEN_USER * r_u,
+BOOL samr_io_r_open_user(const char *desc, SAMR_R_OPEN_USER * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
@@ -5026,7 +5026,7 @@ void init_samr_q_create_user(SAMR_Q_CREATE_USER * q_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_create_user(char *desc, SAMR_Q_CREATE_USER * q_u,
+BOOL samr_io_q_create_user(const char *desc, SAMR_Q_CREATE_USER * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
@@ -5060,7 +5060,7 @@ BOOL samr_io_q_create_user(char *desc, SAMR_Q_CREATE_USER * q_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_create_user(char *desc, SAMR_R_CREATE_USER * r_u,
+BOOL samr_io_r_create_user(const char *desc, SAMR_R_CREATE_USER * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
@@ -5102,7 +5102,7 @@ void init_samr_q_query_userinfo(SAMR_Q_QUERY_USERINFO * q_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_query_userinfo(char *desc, SAMR_Q_QUERY_USERINFO * q_u,
+BOOL samr_io_q_query_userinfo(const char *desc, SAMR_Q_QUERY_USERINFO * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
@@ -5127,7 +5127,7 @@ BOOL samr_io_q_query_userinfo(char *desc, SAMR_Q_QUERY_USERINFO * q_u,
reads or writes a LOGON_HRS structure.
********************************************************************/
-static BOOL sam_io_logon_hrs(char *desc, LOGON_HRS * hrs,
+static BOOL sam_io_logon_hrs(const char *desc, LOGON_HRS * hrs,
prs_struct *ps, int depth)
{
if (hrs == NULL)
@@ -5172,7 +5172,7 @@ void init_sam_user_info12(SAM_USER_INFO_12 * usr,
reads or writes a structure.
********************************************************************/
-static BOOL sam_io_user_info12(char *desc, SAM_USER_INFO_12 * u,
+static BOOL sam_io_user_info12(const char *desc, SAM_USER_INFO_12 * u,
prs_struct *ps, int depth)
{
if (u == NULL)
@@ -5212,7 +5212,7 @@ void init_sam_user_info10(SAM_USER_INFO_10 * usr, uint32 acb_info)
reads or writes a structure.
********************************************************************/
-static BOOL sam_io_user_info10(char *desc, SAM_USER_INFO_10 * usr,
+static BOOL sam_io_user_info10(const char *desc, SAM_USER_INFO_10 * usr,
prs_struct *ps, int depth)
{
if (usr == NULL)
@@ -5280,7 +5280,7 @@ void init_sam_user_info11(SAM_USER_INFO_11 * usr,
reads or writes a structure.
********************************************************************/
-static BOOL sam_io_user_info11(char *desc, SAM_USER_INFO_11 * usr,
+static BOOL sam_io_user_info11(const char *desc, SAM_USER_INFO_11 * usr,
prs_struct *ps, int depth)
{
if (usr == NULL)
@@ -5376,7 +5376,7 @@ void init_sam_user_info24(SAM_USER_INFO_24 * usr, char newpass[516], uint16 pw_l
reads or writes a structure.
********************************************************************/
-static BOOL sam_io_user_info24(char *desc, SAM_USER_INFO_24 * usr,
+static BOOL sam_io_user_info24(const char *desc, SAM_USER_INFO_24 * usr,
prs_struct *ps, int depth)
{
if (usr == NULL)
@@ -5525,7 +5525,7 @@ void init_sam_user_info23A(SAM_USER_INFO_23 * usr, NTTIME * logon_time, /* all z
char *user_name, /* NULL */
char *full_name,
char *home_dir, char *dir_drive, char *log_scr,
- char *prof_path, char *desc, char *wkstas,
+ char *prof_path, const char *desc, char *wkstas,
char *unk_str, char *mung_dial, uint32 user_rid, /* 0x0000 0000 */
uint32 group_rid, uint32 acb_info,
uint32 unknown_3, uint16 logon_divs,
@@ -5606,7 +5606,7 @@ void init_sam_user_info23A(SAM_USER_INFO_23 * usr, NTTIME * logon_time, /* all z
reads or writes a structure.
********************************************************************/
-static BOOL sam_io_user_info23(char *desc, SAM_USER_INFO_23 * usr,
+static BOOL sam_io_user_info23(const char *desc, SAM_USER_INFO_23 * usr,
prs_struct *ps, int depth)
{
if (usr == NULL)
@@ -5742,7 +5742,7 @@ static BOOL sam_io_user_info23(char *desc, SAM_USER_INFO_23 * usr,
way than normal... And there are definately other problems. JRA.
********************************************************************/
-static BOOL sam_io_user_info25(char *desc, SAM_USER_INFO_25 * usr, prs_struct *ps, int depth)
+static BOOL sam_io_user_info25(const char *desc, SAM_USER_INFO_25 * usr, prs_struct *ps, int depth)
{
if (usr == NULL)
return False;
@@ -6120,7 +6120,7 @@ NTSTATUS init_sam_user_info21A(SAM_USER_INFO_21 *usr, SAM_ACCOUNT *pw, DOM_SID *
reads or writes a structure.
********************************************************************/
-static BOOL sam_io_user_info21(char *desc, SAM_USER_INFO_21 * usr,
+static BOOL sam_io_user_info21(const char *desc, SAM_USER_INFO_21 * usr,
prs_struct *ps, int depth)
{
if (usr == NULL)
@@ -6253,7 +6253,7 @@ void init_sam_user_info20A(SAM_USER_INFO_20 *usr, SAM_ACCOUNT *pw)
reads or writes a structure.
********************************************************************/
-static BOOL sam_io_user_info20(char *desc, SAM_USER_INFO_20 *usr,
+static BOOL sam_io_user_info20(const char *desc, SAM_USER_INFO_20 *usr,
prs_struct *ps, int depth)
{
if (usr == NULL)
@@ -6374,7 +6374,7 @@ void init_samr_userinfo_ctr(SAM_USERINFO_CTR * ctr, uchar * sess_key,
reads or writes a structure.
********************************************************************/
-static BOOL samr_io_userinfo_ctr(char *desc, SAM_USERINFO_CTR **ppctr,
+static BOOL samr_io_userinfo_ctr(const char *desc, SAM_USERINFO_CTR **ppctr,
prs_struct *ps, int depth)
{
BOOL ret;
@@ -6514,7 +6514,7 @@ void init_samr_r_query_userinfo(SAMR_R_QUERY_USERINFO * r_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_query_userinfo(char *desc, SAMR_R_QUERY_USERINFO * r_u,
+BOOL samr_io_r_query_userinfo(const char *desc, SAMR_R_QUERY_USERINFO * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
@@ -6561,7 +6561,7 @@ void init_samr_q_set_userinfo(SAMR_Q_SET_USERINFO * q_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_set_userinfo(char *desc, SAMR_Q_SET_USERINFO * q_u,
+BOOL samr_io_q_set_userinfo(const char *desc, SAMR_Q_SET_USERINFO * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
@@ -6598,7 +6598,7 @@ void init_samr_r_set_userinfo(SAMR_R_SET_USERINFO * r_u, NTSTATUS status)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_set_userinfo(char *desc, SAMR_R_SET_USERINFO * r_u,
+BOOL samr_io_r_set_userinfo(const char *desc, SAMR_R_SET_USERINFO * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
@@ -6648,7 +6648,7 @@ void init_samr_q_set_userinfo2(SAMR_Q_SET_USERINFO2 * q_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_set_userinfo2(char *desc, SAMR_Q_SET_USERINFO2 * q_u,
+BOOL samr_io_q_set_userinfo2(const char *desc, SAMR_Q_SET_USERINFO2 * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
@@ -6686,7 +6686,7 @@ void init_samr_r_set_userinfo2(SAMR_R_SET_USERINFO2 * r_u, NTSTATUS status)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_set_userinfo2(char *desc, SAMR_R_SET_USERINFO2 * r_u,
+BOOL samr_io_r_set_userinfo2(const char *desc, SAMR_R_SET_USERINFO2 * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
@@ -6727,7 +6727,7 @@ void init_samr_q_connect(SAMR_Q_CONNECT * q_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_connect(char *desc, SAMR_Q_CONNECT * q_u,
+BOOL samr_io_q_connect(const char *desc, SAMR_Q_CONNECT * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
@@ -6756,7 +6756,7 @@ BOOL samr_io_q_connect(char *desc, SAMR_Q_CONNECT * q_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_connect(char *desc, SAMR_R_CONNECT * r_u,
+BOOL samr_io_r_connect(const char *desc, SAMR_R_CONNECT * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
@@ -6803,7 +6803,7 @@ void init_samr_q_connect4(SAMR_Q_CONNECT4 * q_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_connect4(char *desc, SAMR_Q_CONNECT4 * q_u,
+BOOL samr_io_q_connect4(const char *desc, SAMR_Q_CONNECT4 * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
@@ -6834,7 +6834,7 @@ BOOL samr_io_q_connect4(char *desc, SAMR_Q_CONNECT4 * q_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_connect4(char *desc, SAMR_R_CONNECT4 * r_u,
+BOOL samr_io_r_connect4(const char *desc, SAMR_R_CONNECT4 * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
@@ -6873,7 +6873,7 @@ void init_samr_q_connect_anon(SAMR_Q_CONNECT_ANON * q_u)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_connect_anon(char *desc, SAMR_Q_CONNECT_ANON * q_u,
+BOOL samr_io_q_connect_anon(const char *desc, SAMR_Q_CONNECT_ANON * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
@@ -6901,7 +6901,7 @@ BOOL samr_io_q_connect_anon(char *desc, SAMR_Q_CONNECT_ANON * q_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_connect_anon(char *desc, SAMR_R_CONNECT_ANON * r_u,
+BOOL samr_io_r_connect_anon(const char *desc, SAMR_R_CONNECT_ANON * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
@@ -6942,7 +6942,7 @@ void init_samr_q_get_dom_pwinfo(SAMR_Q_GET_DOM_PWINFO * q_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_get_dom_pwinfo(char *desc, SAMR_Q_GET_DOM_PWINFO * q_u,
+BOOL samr_io_q_get_dom_pwinfo(const char *desc, SAMR_Q_GET_DOM_PWINFO * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
@@ -6970,7 +6970,7 @@ BOOL samr_io_q_get_dom_pwinfo(char *desc, SAMR_Q_GET_DOM_PWINFO * q_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_get_dom_pwinfo(char *desc, SAMR_R_GET_DOM_PWINFO * r_u,
+BOOL samr_io_r_get_dom_pwinfo(const char *desc, SAMR_R_GET_DOM_PWINFO * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
@@ -7020,7 +7020,7 @@ void init_enc_passwd(SAMR_ENC_PASSWD * pwd, char pass[512])
reads or writes a SAMR_ENC_PASSWD structure.
********************************************************************/
-BOOL samr_io_enc_passwd(char *desc, SAMR_ENC_PASSWD * pwd,
+BOOL samr_io_enc_passwd(const char *desc, SAMR_ENC_PASSWD * pwd,
prs_struct *ps, int depth)
{
if (pwd == NULL)
@@ -7063,7 +7063,7 @@ void init_enc_hash(SAMR_ENC_HASH * hsh, uchar hash[16])
reads or writes a SAMR_ENC_HASH structure.
********************************************************************/
-BOOL samr_io_enc_hash(char *desc, SAMR_ENC_HASH * hsh,
+BOOL samr_io_enc_hash(const char *desc, SAMR_ENC_HASH * hsh,
prs_struct *ps, int depth)
{
if (hsh == NULL)
@@ -7120,7 +7120,7 @@ void init_samr_q_chgpasswd_user(SAMR_Q_CHGPASSWD_USER * q_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_chgpasswd_user(char *desc, SAMR_Q_CHGPASSWD_USER * q_u,
+BOOL samr_io_q_chgpasswd_user(const char *desc, SAMR_Q_CHGPASSWD_USER * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
@@ -7178,7 +7178,7 @@ void init_samr_r_chgpasswd_user(SAMR_R_CHGPASSWD_USER * r_u, NTSTATUS status)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_chgpasswd_user(char *desc, SAMR_R_CHGPASSWD_USER * r_u,
+BOOL samr_io_r_chgpasswd_user(const char *desc, SAMR_R_CHGPASSWD_USER * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
@@ -7213,7 +7213,7 @@ void init_samr_q_unknown_2e(SAMR_Q_UNKNOWN_2E *q_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_unknown_2e(char *desc, SAMR_Q_UNKNOWN_2E *q_u,
+BOOL samr_io_q_unknown_2e(const char *desc, SAMR_Q_UNKNOWN_2E *q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
@@ -7259,7 +7259,7 @@ void init_samr_r_samr_unknown_2e(SAMR_R_UNKNOWN_2E * r_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_samr_unknown_2e(char *desc, SAMR_R_UNKNOWN_2E * r_u,
+BOOL samr_io_r_samr_unknown_2e(const char *desc, SAMR_R_UNKNOWN_2E * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
@@ -7348,7 +7348,7 @@ void init_samr_q_set_domain_info(SAMR_Q_SET_DOMAIN_INFO *q_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_set_domain_info(char *desc, SAMR_Q_SET_DOMAIN_INFO *q_u,
+BOOL samr_io_q_set_domain_info(const char *desc, SAMR_Q_SET_DOMAIN_INFO *q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
@@ -7429,7 +7429,7 @@ void init_samr_r_set_domain_info(SAMR_R_SET_DOMAIN_INFO * r_u, NTSTATUS status)
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_set_domain_info(char *desc, SAMR_R_SET_DOMAIN_INFO * r_u,
+BOOL samr_io_r_set_domain_info(const char *desc, SAMR_R_SET_DOMAIN_INFO * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
diff --git a/source3/rpc_parse/parse_sec.c b/source3/rpc_parse/parse_sec.c
index cec37348b80..a49a34139e0 100644
--- a/source3/rpc_parse/parse_sec.c
+++ b/source3/rpc_parse/parse_sec.c
@@ -40,7 +40,7 @@ void init_sec_access(SEC_ACCESS *t, uint32 mask)
Reads or writes a SEC_ACCESS structure.
********************************************************************/
-BOOL sec_io_access(char *desc, SEC_ACCESS *t, prs_struct *ps, int depth)
+BOOL sec_io_access(const char *desc, SEC_ACCESS *t, prs_struct *ps, int depth)
{
if (t == NULL)
return False;
@@ -103,7 +103,7 @@ void init_sec_ace(SEC_ACE *t, DOM_SID *sid, uint8 type, SEC_ACCESS mask, uint8 f
Reads or writes a SEC_ACE structure.
********************************************************************/
-BOOL sec_io_ace(char *desc, SEC_ACE *psa, prs_struct *ps, int depth)
+BOOL sec_io_ace(const char *desc, SEC_ACE *psa, prs_struct *ps, int depth)
{
uint32 old_offset;
uint32 offset_ace_size;
@@ -281,7 +281,7 @@ SEC_ACL *dup_sec_acl(TALLOC_CTX *ctx, SEC_ACL *src)
for you as it reads them.
********************************************************************/
-BOOL sec_io_acl(char *desc, SEC_ACL **ppsa, prs_struct *ps, int depth)
+BOOL sec_io_acl(const char *desc, SEC_ACL **ppsa, prs_struct *ps, int depth)
{
int i;
uint32 old_offset;
@@ -720,7 +720,7 @@ SEC_DESC *make_standard_sec_desc(TALLOC_CTX *ctx, DOM_SID *owner_sid, DOM_SID *g
If reading and the *ppsd = NULL, allocates the structure.
********************************************************************/
-BOOL sec_io_desc(char *desc, SEC_DESC **ppsd, prs_struct *ps, int depth)
+BOOL sec_io_desc(const char *desc, SEC_DESC **ppsd, prs_struct *ps, int depth)
{
uint32 old_offset;
uint32 max_offset = 0; /* after we're done, move offset to end */
@@ -890,7 +890,7 @@ SEC_DESC_BUF *dup_sec_desc_buf(TALLOC_CTX *ctx, SEC_DESC_BUF *src)
Reads or writes a SEC_DESC_BUF structure.
********************************************************************/
-BOOL sec_io_desc_buf(char *desc, SEC_DESC_BUF **ppsdb, prs_struct *ps, int depth)
+BOOL sec_io_desc_buf(const char *desc, SEC_DESC_BUF **ppsdb, prs_struct *ps, int depth)
{
uint32 off_len;
uint32 off_max_len;
diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c
index fb5c6428249..cb3b2efd9d2 100644
--- a/source3/rpc_parse/parse_spoolss.c
+++ b/source3/rpc_parse/parse_spoolss.c
@@ -48,7 +48,7 @@ static uint32 str_len_uni(UNISTR *source)
This should be moved in a more generic lib.
********************************************************************/
-BOOL spoolss_io_system_time(char *desc, prs_struct *ps, int depth, SYSTEMTIME *systime)
+BOOL spoolss_io_system_time(const char *desc, prs_struct *ps, int depth, SYSTEMTIME *systime)
{
if(!prs_uint16("year", ps, depth, &systime->year))
return False;
@@ -91,7 +91,7 @@ BOOL make_systemtime(SYSTEMTIME *systime, struct tm *unixtime)
reads or writes an DOC_INFO structure.
********************************************************************/
-static BOOL smb_io_doc_info_1(char *desc, DOC_INFO_1 *info_1, prs_struct *ps, int depth)
+static BOOL smb_io_doc_info_1(const char *desc, DOC_INFO_1 *info_1, prs_struct *ps, int depth)
{
if (info_1 == NULL) return False;
@@ -122,7 +122,7 @@ static BOOL smb_io_doc_info_1(char *desc, DOC_INFO_1 *info_1, prs_struct *ps, in
reads or writes an DOC_INFO structure.
********************************************************************/
-static BOOL smb_io_doc_info(char *desc, DOC_INFO *info, prs_struct *ps, int depth)
+static BOOL smb_io_doc_info(const char *desc, DOC_INFO *info, prs_struct *ps, int depth)
{
uint32 useless_ptr=0;
@@ -171,7 +171,7 @@ static BOOL smb_io_doc_info(char *desc, DOC_INFO *info, prs_struct *ps, int dept
reads or writes an DOC_INFO_CONTAINER structure.
********************************************************************/
-static BOOL smb_io_doc_info_container(char *desc, DOC_INFO_CONTAINER *cont, prs_struct *ps, int depth)
+static BOOL smb_io_doc_info_container(const char *desc, DOC_INFO_CONTAINER *cont, prs_struct *ps, int depth)
{
if (cont == NULL) return False;
@@ -198,7 +198,7 @@ reads or writes an NOTIFY OPTION TYPE structure.
structure. The _TYPE structure is really the deferred referrants (i.e
the notify fields array) of the _TYPE structure. -tpot */
-static BOOL smb_io_notify_option_type(char *desc, SPOOL_NOTIFY_OPTION_TYPE *type, prs_struct *ps, int depth)
+static BOOL smb_io_notify_option_type(const char *desc, SPOOL_NOTIFY_OPTION_TYPE *type, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "smb_io_notify_option_type");
depth++;
@@ -226,7 +226,7 @@ static BOOL smb_io_notify_option_type(char *desc, SPOOL_NOTIFY_OPTION_TYPE *type
reads or writes an NOTIFY OPTION TYPE DATA.
********************************************************************/
-static BOOL smb_io_notify_option_type_data(char *desc, SPOOL_NOTIFY_OPTION_TYPE *type, prs_struct *ps, int depth)
+static BOOL smb_io_notify_option_type_data(const char *desc, SPOOL_NOTIFY_OPTION_TYPE *type, prs_struct *ps, int depth)
{
int i;
@@ -257,7 +257,7 @@ static BOOL smb_io_notify_option_type_data(char *desc, SPOOL_NOTIFY_OPTION_TYPE
reads or writes an NOTIFY OPTION structure.
********************************************************************/
-static BOOL smb_io_notify_option_type_ctr(char *desc, SPOOL_NOTIFY_OPTION_TYPE_CTR *ctr , prs_struct *ps, int depth)
+static BOOL smb_io_notify_option_type_ctr(const char *desc, SPOOL_NOTIFY_OPTION_TYPE_CTR *ctr , prs_struct *ps, int depth)
{
int i;
@@ -289,7 +289,7 @@ static BOOL smb_io_notify_option_type_ctr(char *desc, SPOOL_NOTIFY_OPTION_TYPE_C
reads or writes an NOTIFY OPTION structure.
********************************************************************/
-static BOOL smb_io_notify_option(char *desc, SPOOL_NOTIFY_OPTION *option, prs_struct *ps, int depth)
+static BOOL smb_io_notify_option(const char *desc, SPOOL_NOTIFY_OPTION *option, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "smb_io_notify_option");
depth++;
@@ -320,7 +320,7 @@ static BOOL smb_io_notify_option(char *desc, SPOOL_NOTIFY_OPTION *option, prs_st
reads or writes an NOTIFY INFO DATA structure.
********************************************************************/
-static BOOL smb_io_notify_info_data(char *desc,SPOOL_NOTIFY_INFO_DATA *data, prs_struct *ps, int depth)
+static BOOL smb_io_notify_info_data(const char *desc,SPOOL_NOTIFY_INFO_DATA *data, prs_struct *ps, int depth)
{
uint32 useless_ptr=0x0FF0ADDE;
@@ -399,7 +399,7 @@ static BOOL smb_io_notify_info_data(char *desc,SPOOL_NOTIFY_INFO_DATA *data, prs
reads or writes an NOTIFY INFO DATA structure.
********************************************************************/
-BOOL smb_io_notify_info_data_strings(char *desc,SPOOL_NOTIFY_INFO_DATA *data,
+BOOL smb_io_notify_info_data_strings(const char *desc,SPOOL_NOTIFY_INFO_DATA *data,
prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "smb_io_notify_info_data_strings");
@@ -530,7 +530,7 @@ BOOL smb_io_notify_info_data_strings(char *desc,SPOOL_NOTIFY_INFO_DATA *data,
reads or writes an NOTIFY INFO structure.
********************************************************************/
-static BOOL smb_io_notify_info(char *desc, SPOOL_NOTIFY_INFO *info, prs_struct *ps, int depth)
+static BOOL smb_io_notify_info(const char *desc, SPOOL_NOTIFY_INFO *info, prs_struct *ps, int depth)
{
int i;
@@ -566,7 +566,7 @@ static BOOL smb_io_notify_info(char *desc, SPOOL_NOTIFY_INFO *info, prs_struct *
/*******************************************************************
********************************************************************/
-static BOOL spool_io_user_level_1(char *desc, SPOOL_USER_1 *q_u, prs_struct *ps, int depth)
+static BOOL spool_io_user_level_1(const char *desc, SPOOL_USER_1 *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "");
depth++;
@@ -605,7 +605,7 @@ static BOOL spool_io_user_level_1(char *desc, SPOOL_USER_1 *q_u, prs_struct *ps,
/*******************************************************************
********************************************************************/
-static BOOL spool_io_user_level(char *desc, SPOOL_USER_CTR *q_u, prs_struct *ps, int depth)
+static BOOL spool_io_user_level(const char *desc, SPOOL_USER_CTR *q_u, prs_struct *ps, int depth)
{
if (q_u==NULL)
return False;
@@ -643,7 +643,7 @@ static BOOL spool_io_user_level(char *desc, SPOOL_USER_CTR *q_u, prs_struct *ps,
#define DM_NUM_OPTIONAL_FIELDS 8
-BOOL spoolss_io_devmode(char *desc, prs_struct *ps, int depth, DEVICEMODE *devmode)
+BOOL spoolss_io_devmode(const char *desc, prs_struct *ps, int depth, DEVICEMODE *devmode)
{
uint32 available_space; /* size of the device mode left to parse */
/* only important on unmarshalling */
@@ -829,7 +829,7 @@ BOOL spoolss_io_devmode(char *desc, prs_struct *ps, int depth, DEVICEMODE *devmo
Read or write a DEVICEMODE container
********************************************************************/
-static BOOL spoolss_io_devmode_cont(char *desc, DEVMODE_CTR *dm_c, prs_struct *ps, int depth)
+static BOOL spoolss_io_devmode_cont(const char *desc, DEVMODE_CTR *dm_c, prs_struct *ps, int depth)
{
if (dm_c==NULL)
return False;
@@ -874,7 +874,7 @@ static BOOL spoolss_io_devmode_cont(char *desc, DEVMODE_CTR *dm_c, prs_struct *p
/*******************************************************************
********************************************************************/
-static BOOL spoolss_io_printer_default(char *desc, PRINTER_DEFAULT *pd, prs_struct *ps, int depth)
+static BOOL spoolss_io_printer_default(const char *desc, PRINTER_DEFAULT *pd, prs_struct *ps, int depth)
{
if (pd==NULL)
return False;
@@ -1059,7 +1059,7 @@ BOOL make_spoolss_printer_info_2(TALLOC_CTX *mem_ctx, SPOOL_PRINTER_INFO_LEVEL_2
* called from spoolss_q_open_printer_ex (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_q_open_printer(char *desc, SPOOL_Q_OPEN_PRINTER *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_open_printer(const char *desc, SPOOL_Q_OPEN_PRINTER *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL)
return False;
@@ -1090,7 +1090,7 @@ BOOL spoolss_io_q_open_printer(char *desc, SPOOL_Q_OPEN_PRINTER *q_u, prs_struct
* called from spoolss_open_printer_ex (cli_spoolss.c)
********************************************************************/
-BOOL spoolss_io_r_open_printer(char *desc, SPOOL_R_OPEN_PRINTER *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_open_printer(const char *desc, SPOOL_R_OPEN_PRINTER *r_u, prs_struct *ps, int depth)
{
if (r_u == NULL) return False;
@@ -1115,7 +1115,7 @@ BOOL spoolss_io_r_open_printer(char *desc, SPOOL_R_OPEN_PRINTER *r_u, prs_struct
* called from spoolss_q_open_printer_ex (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_q_open_printer_ex(char *desc, SPOOL_Q_OPEN_PRINTER_EX *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_open_printer_ex(const char *desc, SPOOL_Q_OPEN_PRINTER_EX *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL)
return False;
@@ -1151,7 +1151,7 @@ BOOL spoolss_io_q_open_printer_ex(char *desc, SPOOL_Q_OPEN_PRINTER_EX *q_u, prs_
* called from spoolss_open_printer_ex (cli_spoolss.c)
********************************************************************/
-BOOL spoolss_io_r_open_printer_ex(char *desc, SPOOL_R_OPEN_PRINTER_EX *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_open_printer_ex(const char *desc, SPOOL_R_OPEN_PRINTER_EX *r_u, prs_struct *ps, int depth)
{
if (r_u == NULL) return False;
@@ -1240,7 +1240,7 @@ BOOL make_spoolss_q_getprinterdataex(SPOOL_Q_GETPRINTERDATAEX *q_u,
* called from spoolss_q_getprinterdata (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_q_getprinterdata(char *desc, SPOOL_Q_GETPRINTERDATA *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_getprinterdata(const char *desc, SPOOL_Q_GETPRINTERDATA *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL)
return False;
@@ -1269,7 +1269,7 @@ BOOL spoolss_io_q_getprinterdata(char *desc, SPOOL_Q_GETPRINTERDATA *q_u, prs_st
* called from spoolss_q_deleteprinterdata (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_q_deleteprinterdata(char *desc, SPOOL_Q_DELETEPRINTERDATA *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_deleteprinterdata(const char *desc, SPOOL_Q_DELETEPRINTERDATA *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL)
return False;
@@ -1294,7 +1294,7 @@ BOOL spoolss_io_q_deleteprinterdata(char *desc, SPOOL_Q_DELETEPRINTERDATA *q_u,
* called from spoolss_r_deleteprinterdata (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_r_deleteprinterdata(char *desc, SPOOL_R_DELETEPRINTERDATA *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_deleteprinterdata(const char *desc, SPOOL_R_DELETEPRINTERDATA *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_deleteprinterdata");
depth++;
@@ -1309,7 +1309,7 @@ BOOL spoolss_io_r_deleteprinterdata(char *desc, SPOOL_R_DELETEPRINTERDATA *r_u,
* called from spoolss_q_deleteprinterdataex (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_q_deleteprinterdataex(char *desc, SPOOL_Q_DELETEPRINTERDATAEX *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_deleteprinterdataex(const char *desc, SPOOL_Q_DELETEPRINTERDATAEX *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL)
return False;
@@ -1335,7 +1335,7 @@ BOOL spoolss_io_q_deleteprinterdataex(char *desc, SPOOL_Q_DELETEPRINTERDATAEX *q
* called from spoolss_r_deleteprinterdataex (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_r_deleteprinterdataex(char *desc, SPOOL_R_DELETEPRINTERDATAEX *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_deleteprinterdataex(const char *desc, SPOOL_R_DELETEPRINTERDATAEX *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_deleteprinterdataex");
depth++;
@@ -1351,7 +1351,7 @@ BOOL spoolss_io_r_deleteprinterdataex(char *desc, SPOOL_R_DELETEPRINTERDATAEX *r
* called from spoolss_r_getprinterdata (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_r_getprinterdata(char *desc, SPOOL_R_GETPRINTERDATA *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_getprinterdata(const char *desc, SPOOL_R_GETPRINTERDATA *r_u, prs_struct *ps, int depth)
{
if (r_u == NULL)
return False;
@@ -1407,7 +1407,7 @@ BOOL make_spoolss_q_closeprinter(SPOOL_Q_CLOSEPRINTER *q_u, POLICY_HND *hnd)
* called from spoolss_abortprinter (cli_spoolss.c)
********************************************************************/
-BOOL spoolss_io_q_abortprinter(char *desc, SPOOL_Q_ABORTPRINTER *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_abortprinter(const char *desc, SPOOL_Q_ABORTPRINTER *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL) return False;
@@ -1428,7 +1428,7 @@ BOOL spoolss_io_q_abortprinter(char *desc, SPOOL_Q_ABORTPRINTER *q_u, prs_struct
* called from spoolss_r_abortprinter (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_r_abortprinter(char *desc, SPOOL_R_ABORTPRINTER *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_abortprinter(const char *desc, SPOOL_R_ABORTPRINTER *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_abortprinter");
depth++;
@@ -1444,7 +1444,7 @@ BOOL spoolss_io_r_abortprinter(char *desc, SPOOL_R_ABORTPRINTER *r_u, prs_struct
* called from spoolss_deleteprinter (cli_spoolss.c)
********************************************************************/
-BOOL spoolss_io_q_deleteprinter(char *desc, SPOOL_Q_DELETEPRINTER *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_deleteprinter(const char *desc, SPOOL_Q_DELETEPRINTER *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL) return False;
@@ -1466,7 +1466,7 @@ BOOL spoolss_io_q_deleteprinter(char *desc, SPOOL_Q_DELETEPRINTER *q_u, prs_stru
* called from spoolss_deleteprinter (cli_spoolss.c)
********************************************************************/
-BOOL spoolss_io_r_deleteprinter(char *desc, SPOOL_R_DELETEPRINTER *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_deleteprinter(const char *desc, SPOOL_R_DELETEPRINTER *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_deleteprinter");
depth++;
@@ -1489,7 +1489,7 @@ BOOL spoolss_io_r_deleteprinter(char *desc, SPOOL_R_DELETEPRINTER *r_u, prs_stru
* called from spoolss_deleteprinterdriver (cli_spoolss.c)
********************************************************************/
-BOOL spoolss_io_q_deleteprinterdriver(char *desc, SPOOL_Q_DELETEPRINTERDRIVER *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_deleteprinterdriver(const char *desc, SPOOL_Q_DELETEPRINTERDRIVER *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL) return False;
@@ -1516,7 +1516,7 @@ BOOL spoolss_io_q_deleteprinterdriver(char *desc, SPOOL_Q_DELETEPRINTERDRIVER *q
/*******************************************************************
* write a structure.
********************************************************************/
-BOOL spoolss_io_r_deleteprinterdriver(char *desc, SPOOL_R_DELETEPRINTERDRIVER *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_deleteprinterdriver(const char *desc, SPOOL_R_DELETEPRINTERDRIVER *r_u, prs_struct *ps, int depth)
{
if (r_u == NULL) return False;
@@ -1539,7 +1539,7 @@ BOOL spoolss_io_r_deleteprinterdriver(char *desc, SPOOL_R_DELETEPRINTERDRIVER *r
* called from spoolss_deleteprinterdriver (cli_spoolss.c)
********************************************************************/
-BOOL spoolss_io_q_deleteprinterdriverex(char *desc, SPOOL_Q_DELETEPRINTERDRIVEREX *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_deleteprinterdriverex(const char *desc, SPOOL_Q_DELETEPRINTERDRIVEREX *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL) return False;
@@ -1574,7 +1574,7 @@ BOOL spoolss_io_q_deleteprinterdriverex(char *desc, SPOOL_Q_DELETEPRINTERDRIVERE
/*******************************************************************
* write a structure.
********************************************************************/
-BOOL spoolss_io_r_deleteprinterdriverex(char *desc, SPOOL_R_DELETEPRINTERDRIVEREX *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_deleteprinterdriverex(const char *desc, SPOOL_R_DELETEPRINTERDRIVEREX *r_u, prs_struct *ps, int depth)
{
if (r_u == NULL) return False;
@@ -1598,7 +1598,7 @@ BOOL spoolss_io_r_deleteprinterdriverex(char *desc, SPOOL_R_DELETEPRINTERDRIVERE
* called from spoolss_closeprinter (cli_spoolss.c)
********************************************************************/
-BOOL spoolss_io_q_closeprinter(char *desc, SPOOL_Q_CLOSEPRINTER *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_closeprinter(const char *desc, SPOOL_Q_CLOSEPRINTER *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL) return False;
@@ -1620,7 +1620,7 @@ BOOL spoolss_io_q_closeprinter(char *desc, SPOOL_Q_CLOSEPRINTER *q_u, prs_struct
* called from spoolss_closeprinter (cli_spoolss.c)
********************************************************************/
-BOOL spoolss_io_r_closeprinter(char *desc, SPOOL_R_CLOSEPRINTER *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_closeprinter(const char *desc, SPOOL_R_CLOSEPRINTER *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_closeprinter");
depth++;
@@ -1641,7 +1641,7 @@ BOOL spoolss_io_r_closeprinter(char *desc, SPOOL_R_CLOSEPRINTER *r_u, prs_struct
* called from spoolss_q_startdocprinter (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_q_startdocprinter(char *desc, SPOOL_Q_STARTDOCPRINTER *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_startdocprinter(const char *desc, SPOOL_Q_STARTDOCPRINTER *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL) return False;
@@ -1665,7 +1665,7 @@ BOOL spoolss_io_q_startdocprinter(char *desc, SPOOL_Q_STARTDOCPRINTER *q_u, prs_
* called from spoolss_r_startdocprinter (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_r_startdocprinter(char *desc, SPOOL_R_STARTDOCPRINTER *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_startdocprinter(const char *desc, SPOOL_R_STARTDOCPRINTER *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_startdocprinter");
depth++;
@@ -1682,7 +1682,7 @@ BOOL spoolss_io_r_startdocprinter(char *desc, SPOOL_R_STARTDOCPRINTER *r_u, prs_
* called from spoolss_q_enddocprinter (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_q_enddocprinter(char *desc, SPOOL_Q_ENDDOCPRINTER *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_enddocprinter(const char *desc, SPOOL_Q_ENDDOCPRINTER *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL) return False;
@@ -1703,7 +1703,7 @@ BOOL spoolss_io_q_enddocprinter(char *desc, SPOOL_Q_ENDDOCPRINTER *q_u, prs_stru
* called from spoolss_r_enddocprinter (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_r_enddocprinter(char *desc, SPOOL_R_ENDDOCPRINTER *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_enddocprinter(const char *desc, SPOOL_R_ENDDOCPRINTER *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_enddocprinter");
depth++;
@@ -1718,7 +1718,7 @@ BOOL spoolss_io_r_enddocprinter(char *desc, SPOOL_R_ENDDOCPRINTER *r_u, prs_stru
* called from spoolss_q_startpageprinter (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_q_startpageprinter(char *desc, SPOOL_Q_STARTPAGEPRINTER *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_startpageprinter(const char *desc, SPOOL_Q_STARTPAGEPRINTER *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL) return False;
@@ -1739,7 +1739,7 @@ BOOL spoolss_io_q_startpageprinter(char *desc, SPOOL_Q_STARTPAGEPRINTER *q_u, pr
* called from spoolss_r_startpageprinter (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_r_startpageprinter(char *desc, SPOOL_R_STARTPAGEPRINTER *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_startpageprinter(const char *desc, SPOOL_R_STARTPAGEPRINTER *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_startpageprinter");
depth++;
@@ -1754,7 +1754,7 @@ BOOL spoolss_io_r_startpageprinter(char *desc, SPOOL_R_STARTPAGEPRINTER *r_u, pr
* called from spoolss_q_endpageprinter (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_q_endpageprinter(char *desc, SPOOL_Q_ENDPAGEPRINTER *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_endpageprinter(const char *desc, SPOOL_Q_ENDPAGEPRINTER *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL) return False;
@@ -1775,7 +1775,7 @@ BOOL spoolss_io_q_endpageprinter(char *desc, SPOOL_Q_ENDPAGEPRINTER *q_u, prs_st
* called from spoolss_r_endpageprinter (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_r_endpageprinter(char *desc, SPOOL_R_ENDPAGEPRINTER *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_endpageprinter(const char *desc, SPOOL_R_ENDPAGEPRINTER *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_endpageprinter");
depth++;
@@ -1790,7 +1790,7 @@ BOOL spoolss_io_r_endpageprinter(char *desc, SPOOL_R_ENDPAGEPRINTER *r_u, prs_st
* called from spoolss_q_writeprinter (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_q_writeprinter(char *desc, SPOOL_Q_WRITEPRINTER *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_writeprinter(const char *desc, SPOOL_Q_WRITEPRINTER *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL) return False;
@@ -1827,7 +1827,7 @@ BOOL spoolss_io_q_writeprinter(char *desc, SPOOL_Q_WRITEPRINTER *q_u, prs_struct
* called from spoolss_r_writeprinter (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_r_writeprinter(char *desc, SPOOL_R_WRITEPRINTER *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_writeprinter(const char *desc, SPOOL_R_WRITEPRINTER *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_writeprinter");
depth++;
@@ -1844,7 +1844,7 @@ BOOL spoolss_io_r_writeprinter(char *desc, SPOOL_R_WRITEPRINTER *r_u, prs_struct
* called from spoolss_q_rffpcnex (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_q_rffpcnex(char *desc, SPOOL_Q_RFFPCNEX *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_rffpcnex(const char *desc, SPOOL_Q_RFFPCNEX *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_rffpcnex");
depth++;
@@ -1890,7 +1890,7 @@ BOOL spoolss_io_q_rffpcnex(char *desc, SPOOL_Q_RFFPCNEX *q_u, prs_struct *ps, in
* called from spoolss_r_rffpcnex (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_r_rffpcnex(char *desc, SPOOL_R_RFFPCNEX *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_rffpcnex(const char *desc, SPOOL_R_RFFPCNEX *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_rffpcnex");
depth++;
@@ -1906,7 +1906,7 @@ BOOL spoolss_io_r_rffpcnex(char *desc, SPOOL_R_RFFPCNEX *r_u, prs_struct *ps, in
* called from spoolss_q_rfnpcnex (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_q_rfnpcnex(char *desc, SPOOL_Q_RFNPCNEX *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_rfnpcnex(const char *desc, SPOOL_Q_RFNPCNEX *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_rfnpcnex");
depth++;
@@ -1941,7 +1941,7 @@ BOOL spoolss_io_q_rfnpcnex(char *desc, SPOOL_Q_RFNPCNEX *q_u, prs_struct *ps, in
* called from spoolss_r_rfnpcnex (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_r_rfnpcnex(char *desc, SPOOL_R_RFNPCNEX *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_rfnpcnex(const char *desc, SPOOL_R_RFNPCNEX *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_rfnpcnex");
depth++;
@@ -2061,7 +2061,7 @@ static uint32 size_of_systemtime(SYSTEMTIME *systime)
*
********************************************************************/
-static BOOL smb_io_relstr(char *desc, NEW_BUFFER *buffer, int depth, UNISTR *string)
+static BOOL smb_io_relstr(const char *desc, NEW_BUFFER *buffer, int depth, UNISTR *string)
{
prs_struct *ps=&buffer->prs;
@@ -2123,7 +2123,7 @@ static BOOL smb_io_relstr(char *desc, NEW_BUFFER *buffer, int depth, UNISTR *str
* used by 2 RPC structs
********************************************************************/
-static BOOL smb_io_relarraystr(char *desc, NEW_BUFFER *buffer, int depth, uint16 **string)
+static BOOL smb_io_relarraystr(const char *desc, NEW_BUFFER *buffer, int depth, uint16 **string)
{
UNISTR chaine;
@@ -2251,7 +2251,7 @@ static BOOL smb_io_relarraystr(char *desc, NEW_BUFFER *buffer, int depth, uint16
Parse a DEVMODE structure and its relative pointer.
********************************************************************/
-static BOOL smb_io_relsecdesc(char *desc, NEW_BUFFER *buffer, int depth, SEC_DESC **secdesc)
+static BOOL smb_io_relsecdesc(const char *desc, NEW_BUFFER *buffer, int depth, SEC_DESC **secdesc)
{
prs_struct *ps= &buffer->prs;
@@ -2312,7 +2312,7 @@ static BOOL smb_io_relsecdesc(char *desc, NEW_BUFFER *buffer, int depth, SEC_DES
Parse a DEVMODE structure and its relative pointer.
********************************************************************/
-static BOOL smb_io_reldevmode(char *desc, NEW_BUFFER *buffer, int depth, DEVICEMODE **devmode)
+static BOOL smb_io_reldevmode(const char *desc, NEW_BUFFER *buffer, int depth, DEVICEMODE **devmode)
{
prs_struct *ps=&buffer->prs;
@@ -2380,7 +2380,7 @@ static BOOL smb_io_reldevmode(char *desc, NEW_BUFFER *buffer, int depth, DEVICEM
Parse a PRINTER_INFO_0 structure.
********************************************************************/
-BOOL smb_io_printer_info_0(char *desc, NEW_BUFFER *buffer, PRINTER_INFO_0 *info, int depth)
+BOOL smb_io_printer_info_0(const char *desc, NEW_BUFFER *buffer, PRINTER_INFO_0 *info, int depth)
{
prs_struct *ps=&buffer->prs;
@@ -2481,7 +2481,7 @@ BOOL smb_io_printer_info_0(char *desc, NEW_BUFFER *buffer, PRINTER_INFO_0 *info,
Parse a PRINTER_INFO_1 structure.
********************************************************************/
-BOOL smb_io_printer_info_1(char *desc, NEW_BUFFER *buffer, PRINTER_INFO_1 *info, int depth)
+BOOL smb_io_printer_info_1(const char *desc, NEW_BUFFER *buffer, PRINTER_INFO_1 *info, int depth)
{
prs_struct *ps=&buffer->prs;
@@ -2506,7 +2506,7 @@ BOOL smb_io_printer_info_1(char *desc, NEW_BUFFER *buffer, PRINTER_INFO_1 *info,
Parse a PRINTER_INFO_2 structure.
********************************************************************/
-BOOL smb_io_printer_info_2(char *desc, NEW_BUFFER *buffer, PRINTER_INFO_2 *info, int depth)
+BOOL smb_io_printer_info_2(const char *desc, NEW_BUFFER *buffer, PRINTER_INFO_2 *info, int depth)
{
prs_struct *ps=&buffer->prs;
uint32 dm_offset, sd_offset, current_offset;
@@ -2597,7 +2597,7 @@ BOOL smb_io_printer_info_2(char *desc, NEW_BUFFER *buffer, PRINTER_INFO_2 *info,
Parse a PRINTER_INFO_3 structure.
********************************************************************/
-BOOL smb_io_printer_info_3(char *desc, NEW_BUFFER *buffer, PRINTER_INFO_3 *info, int depth)
+BOOL smb_io_printer_info_3(const char *desc, NEW_BUFFER *buffer, PRINTER_INFO_3 *info, int depth)
{
prs_struct *ps=&buffer->prs;
@@ -2618,7 +2618,7 @@ BOOL smb_io_printer_info_3(char *desc, NEW_BUFFER *buffer, PRINTER_INFO_3 *info,
Parse a PRINTER_INFO_4 structure.
********************************************************************/
-BOOL smb_io_printer_info_4(char *desc, NEW_BUFFER *buffer, PRINTER_INFO_4 *info, int depth)
+BOOL smb_io_printer_info_4(const char *desc, NEW_BUFFER *buffer, PRINTER_INFO_4 *info, int depth)
{
prs_struct *ps=&buffer->prs;
@@ -2640,7 +2640,7 @@ BOOL smb_io_printer_info_4(char *desc, NEW_BUFFER *buffer, PRINTER_INFO_4 *info,
Parse a PRINTER_INFO_5 structure.
********************************************************************/
-BOOL smb_io_printer_info_5(char *desc, NEW_BUFFER *buffer, PRINTER_INFO_5 *info, int depth)
+BOOL smb_io_printer_info_5(const char *desc, NEW_BUFFER *buffer, PRINTER_INFO_5 *info, int depth)
{
prs_struct *ps=&buffer->prs;
@@ -2666,7 +2666,7 @@ BOOL smb_io_printer_info_5(char *desc, NEW_BUFFER *buffer, PRINTER_INFO_5 *info,
Parse a PRINTER_INFO_7 structure.
********************************************************************/
-BOOL smb_io_printer_info_7(char *desc, NEW_BUFFER *buffer, PRINTER_INFO_7 *info, int depth)
+BOOL smb_io_printer_info_7(const char *desc, NEW_BUFFER *buffer, PRINTER_INFO_7 *info, int depth)
{
prs_struct *ps=&buffer->prs;
@@ -2686,7 +2686,7 @@ BOOL smb_io_printer_info_7(char *desc, NEW_BUFFER *buffer, PRINTER_INFO_7 *info,
Parse a PORT_INFO_1 structure.
********************************************************************/
-BOOL smb_io_port_info_1(char *desc, NEW_BUFFER *buffer, PORT_INFO_1 *info, int depth)
+BOOL smb_io_port_info_1(const char *desc, NEW_BUFFER *buffer, PORT_INFO_1 *info, int depth)
{
prs_struct *ps=&buffer->prs;
@@ -2705,7 +2705,7 @@ BOOL smb_io_port_info_1(char *desc, NEW_BUFFER *buffer, PORT_INFO_1 *info, int d
Parse a PORT_INFO_2 structure.
********************************************************************/
-BOOL smb_io_port_info_2(char *desc, NEW_BUFFER *buffer, PORT_INFO_2 *info, int depth)
+BOOL smb_io_port_info_2(const char *desc, NEW_BUFFER *buffer, PORT_INFO_2 *info, int depth)
{
prs_struct *ps=&buffer->prs;
@@ -2732,7 +2732,7 @@ BOOL smb_io_port_info_2(char *desc, NEW_BUFFER *buffer, PORT_INFO_2 *info, int d
Parse a DRIVER_INFO_1 structure.
********************************************************************/
-BOOL smb_io_printer_driver_info_1(char *desc, NEW_BUFFER *buffer, DRIVER_INFO_1 *info, int depth)
+BOOL smb_io_printer_driver_info_1(const char *desc, NEW_BUFFER *buffer, DRIVER_INFO_1 *info, int depth)
{
prs_struct *ps=&buffer->prs;
@@ -2751,7 +2751,7 @@ BOOL smb_io_printer_driver_info_1(char *desc, NEW_BUFFER *buffer, DRIVER_INFO_1
Parse a DRIVER_INFO_2 structure.
********************************************************************/
-BOOL smb_io_printer_driver_info_2(char *desc, NEW_BUFFER *buffer, DRIVER_INFO_2 *info, int depth)
+BOOL smb_io_printer_driver_info_2(const char *desc, NEW_BUFFER *buffer, DRIVER_INFO_2 *info, int depth)
{
prs_struct *ps=&buffer->prs;
@@ -2780,7 +2780,7 @@ BOOL smb_io_printer_driver_info_2(char *desc, NEW_BUFFER *buffer, DRIVER_INFO_2
Parse a DRIVER_INFO_3 structure.
********************************************************************/
-BOOL smb_io_printer_driver_info_3(char *desc, NEW_BUFFER *buffer, DRIVER_INFO_3 *info, int depth)
+BOOL smb_io_printer_driver_info_3(const char *desc, NEW_BUFFER *buffer, DRIVER_INFO_3 *info, int depth)
{
prs_struct *ps=&buffer->prs;
@@ -2819,7 +2819,7 @@ BOOL smb_io_printer_driver_info_3(char *desc, NEW_BUFFER *buffer, DRIVER_INFO_3
Parse a DRIVER_INFO_6 structure.
********************************************************************/
-BOOL smb_io_printer_driver_info_6(char *desc, NEW_BUFFER *buffer, DRIVER_INFO_6 *info, int depth)
+BOOL smb_io_printer_driver_info_6(const char *desc, NEW_BUFFER *buffer, DRIVER_INFO_6 *info, int depth)
{
prs_struct *ps=&buffer->prs;
@@ -2884,7 +2884,7 @@ BOOL smb_io_printer_driver_info_6(char *desc, NEW_BUFFER *buffer, DRIVER_INFO_6
Parse a JOB_INFO_1 structure.
********************************************************************/
-BOOL smb_io_job_info_1(char *desc, NEW_BUFFER *buffer, JOB_INFO_1 *info, int depth)
+BOOL smb_io_job_info_1(const char *desc, NEW_BUFFER *buffer, JOB_INFO_1 *info, int depth)
{
prs_struct *ps=&buffer->prs;
@@ -2927,7 +2927,7 @@ BOOL smb_io_job_info_1(char *desc, NEW_BUFFER *buffer, JOB_INFO_1 *info, int dep
Parse a JOB_INFO_2 structure.
********************************************************************/
-BOOL smb_io_job_info_2(char *desc, NEW_BUFFER *buffer, JOB_INFO_2 *info, int depth)
+BOOL smb_io_job_info_2(const char *desc, NEW_BUFFER *buffer, JOB_INFO_2 *info, int depth)
{
uint32 pipo=0;
prs_struct *ps=&buffer->prs;
@@ -2994,7 +2994,7 @@ BOOL smb_io_job_info_2(char *desc, NEW_BUFFER *buffer, JOB_INFO_2 *info, int dep
/*******************************************************************
********************************************************************/
-BOOL smb_io_form_1(char *desc, NEW_BUFFER *buffer, FORM_1 *info, int depth)
+BOOL smb_io_form_1(const char *desc, NEW_BUFFER *buffer, FORM_1 *info, int depth)
{
prs_struct *ps=&buffer->prs;
@@ -3029,7 +3029,7 @@ BOOL smb_io_form_1(char *desc, NEW_BUFFER *buffer, FORM_1 *info, int depth)
Read/write a BUFFER struct.
********************************************************************/
-static BOOL spoolss_io_buffer(char *desc, prs_struct *ps, int depth, NEW_BUFFER **pp_buffer)
+static BOOL spoolss_io_buffer(const char *desc, prs_struct *ps, int depth, NEW_BUFFER **pp_buffer)
{
NEW_BUFFER *buffer = *pp_buffer;
@@ -3141,7 +3141,7 @@ uint32 new_get_buffer_size(NEW_BUFFER *buffer)
Parse a DRIVER_DIRECTORY_1 structure.
********************************************************************/
-BOOL smb_io_driverdir_1(char *desc, NEW_BUFFER *buffer, DRIVER_DIRECTORY_1 *info, int depth)
+BOOL smb_io_driverdir_1(const char *desc, NEW_BUFFER *buffer, DRIVER_DIRECTORY_1 *info, int depth)
{
prs_struct *ps=&buffer->prs;
@@ -3160,7 +3160,7 @@ BOOL smb_io_driverdir_1(char *desc, NEW_BUFFER *buffer, DRIVER_DIRECTORY_1 *info
Parse a PORT_INFO_1 structure.
********************************************************************/
-BOOL smb_io_port_1(char *desc, NEW_BUFFER *buffer, PORT_INFO_1 *info, int depth)
+BOOL smb_io_port_1(const char *desc, NEW_BUFFER *buffer, PORT_INFO_1 *info, int depth)
{
prs_struct *ps=&buffer->prs;
@@ -3179,7 +3179,7 @@ BOOL smb_io_port_1(char *desc, NEW_BUFFER *buffer, PORT_INFO_1 *info, int depth)
Parse a PORT_INFO_2 structure.
********************************************************************/
-BOOL smb_io_port_2(char *desc, NEW_BUFFER *buffer, PORT_INFO_2 *info, int depth)
+BOOL smb_io_port_2(const char *desc, NEW_BUFFER *buffer, PORT_INFO_2 *info, int depth)
{
prs_struct *ps=&buffer->prs;
@@ -3205,7 +3205,7 @@ BOOL smb_io_port_2(char *desc, NEW_BUFFER *buffer, PORT_INFO_2 *info, int depth)
/*******************************************************************
********************************************************************/
-BOOL smb_io_printprocessor_info_1(char *desc, NEW_BUFFER *buffer, PRINTPROCESSOR_1 *info, int depth)
+BOOL smb_io_printprocessor_info_1(const char *desc, NEW_BUFFER *buffer, PRINTPROCESSOR_1 *info, int depth)
{
prs_struct *ps=&buffer->prs;
@@ -3223,7 +3223,7 @@ BOOL smb_io_printprocessor_info_1(char *desc, NEW_BUFFER *buffer, PRINTPROCESSOR
/*******************************************************************
********************************************************************/
-BOOL smb_io_printprocdatatype_info_1(char *desc, NEW_BUFFER *buffer, PRINTPROCDATATYPE_1 *info, int depth)
+BOOL smb_io_printprocdatatype_info_1(const char *desc, NEW_BUFFER *buffer, PRINTPROCDATATYPE_1 *info, int depth)
{
prs_struct *ps=&buffer->prs;
@@ -3241,7 +3241,7 @@ BOOL smb_io_printprocdatatype_info_1(char *desc, NEW_BUFFER *buffer, PRINTPROCDA
/*******************************************************************
********************************************************************/
-BOOL smb_io_printmonitor_info_1(char *desc, NEW_BUFFER *buffer, PRINTMONITOR_1 *info, int depth)
+BOOL smb_io_printmonitor_info_1(const char *desc, NEW_BUFFER *buffer, PRINTMONITOR_1 *info, int depth)
{
prs_struct *ps=&buffer->prs;
@@ -3259,7 +3259,7 @@ BOOL smb_io_printmonitor_info_1(char *desc, NEW_BUFFER *buffer, PRINTMONITOR_1 *
/*******************************************************************
********************************************************************/
-BOOL smb_io_printmonitor_info_2(char *desc, NEW_BUFFER *buffer, PRINTMONITOR_2 *info, int depth)
+BOOL smb_io_printmonitor_info_2(const char *desc, NEW_BUFFER *buffer, PRINTMONITOR_2 *info, int depth)
{
prs_struct *ps=&buffer->prs;
@@ -3806,7 +3806,7 @@ BOOL make_spoolss_q_getprinterdriver2(SPOOL_Q_GETPRINTERDRIVER2 *q_u,
* called from spoolss_getprinterdriver2 (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_q_getprinterdriver2(char *desc, SPOOL_Q_GETPRINTERDRIVER2 *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_getprinterdriver2(const char *desc, SPOOL_Q_GETPRINTERDRIVER2 *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_getprinterdriver2");
depth++;
@@ -3848,7 +3848,7 @@ BOOL spoolss_io_q_getprinterdriver2(char *desc, SPOOL_Q_GETPRINTERDRIVER2 *q_u,
* called from spoolss_getprinterdriver2 (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_r_getprinterdriver2(char *desc, SPOOL_R_GETPRINTERDRIVER2 *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_getprinterdriver2(const char *desc, SPOOL_R_GETPRINTERDRIVER2 *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_getprinterdriver2");
depth++;
@@ -3921,7 +3921,7 @@ BOOL make_spoolss_q_enumports(SPOOL_Q_ENUMPORTS *q_u,
* called from spoolss_enumprinters (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_q_enumprinters(char *desc, SPOOL_Q_ENUMPRINTERS *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_enumprinters(const char *desc, SPOOL_Q_ENUMPRINTERS *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_enumprinters");
depth++;
@@ -3957,7 +3957,7 @@ BOOL spoolss_io_q_enumprinters(char *desc, SPOOL_Q_ENUMPRINTERS *q_u, prs_struct
Parse a SPOOL_R_ENUMPRINTERS structure.
********************************************************************/
-BOOL spoolss_io_r_enumprinters(char *desc, SPOOL_R_ENUMPRINTERS *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_enumprinters(const char *desc, SPOOL_R_ENUMPRINTERS *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_enumprinters");
depth++;
@@ -3989,7 +3989,7 @@ BOOL spoolss_io_r_enumprinters(char *desc, SPOOL_R_ENUMPRINTERS *r_u, prs_struct
*
********************************************************************/
-BOOL spoolss_io_r_getprinter(char *desc, SPOOL_R_GETPRINTER *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_getprinter(const char *desc, SPOOL_R_GETPRINTER *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_getprinter");
depth++;
@@ -4017,7 +4017,7 @@ BOOL spoolss_io_r_getprinter(char *desc, SPOOL_R_GETPRINTER *r_u, prs_struct *ps
* called from spoolss_getprinter (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_q_getprinter(char *desc, SPOOL_Q_GETPRINTER *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_getprinter(const char *desc, SPOOL_Q_GETPRINTER *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_getprinter");
depth++;
@@ -4129,7 +4129,7 @@ BOOL make_spoolss_q_setprinter(TALLOC_CTX *mem_ctx, SPOOL_Q_SETPRINTER *q_u,
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_r_setprinter(char *desc, SPOOL_R_SETPRINTER *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_setprinter(const char *desc, SPOOL_R_SETPRINTER *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_setprinter");
depth++;
@@ -4147,7 +4147,7 @@ BOOL spoolss_io_r_setprinter(char *desc, SPOOL_R_SETPRINTER *r_u, prs_struct *ps
Marshall/unmarshall a SPOOL_Q_SETPRINTER struct.
********************************************************************/
-BOOL spoolss_io_q_setprinter(char *desc, SPOOL_Q_SETPRINTER *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_setprinter(const char *desc, SPOOL_Q_SETPRINTER *q_u, prs_struct *ps, int depth)
{
uint32 ptr_sec_desc = 0;
@@ -4210,7 +4210,7 @@ BOOL spoolss_io_q_setprinter(char *desc, SPOOL_Q_SETPRINTER *q_u, prs_struct *ps
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_r_fcpn(char *desc, SPOOL_R_FCPN *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_fcpn(const char *desc, SPOOL_R_FCPN *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_fcpn");
depth++;
@@ -4227,7 +4227,7 @@ BOOL spoolss_io_r_fcpn(char *desc, SPOOL_R_FCPN *r_u, prs_struct *ps, int depth)
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_q_fcpn(char *desc, SPOOL_Q_FCPN *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_fcpn(const char *desc, SPOOL_Q_FCPN *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_fcpn");
@@ -4246,7 +4246,7 @@ BOOL spoolss_io_q_fcpn(char *desc, SPOOL_Q_FCPN *q_u, prs_struct *ps, int depth)
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_r_addjob(char *desc, SPOOL_R_ADDJOB *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_addjob(const char *desc, SPOOL_R_ADDJOB *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "");
depth++;
@@ -4272,7 +4272,7 @@ BOOL spoolss_io_r_addjob(char *desc, SPOOL_R_ADDJOB *r_u, prs_struct *ps, int de
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_q_addjob(char *desc, SPOOL_Q_ADDJOB *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_addjob(const char *desc, SPOOL_Q_ADDJOB *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "");
depth++;
@@ -4300,7 +4300,7 @@ BOOL spoolss_io_q_addjob(char *desc, SPOOL_Q_ADDJOB *q_u, prs_struct *ps, int de
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_r_enumjobs(char *desc, SPOOL_R_ENUMJOBS *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_enumjobs(const char *desc, SPOOL_R_ENUMJOBS *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_enumjobs");
depth++;
@@ -4352,7 +4352,7 @@ BOOL make_spoolss_q_enumjobs(SPOOL_Q_ENUMJOBS *q_u, const POLICY_HND *hnd,
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_q_enumjobs(char *desc, SPOOL_Q_ENUMJOBS *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_enumjobs(const char *desc, SPOOL_Q_ENUMJOBS *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_enumjobs");
depth++;
@@ -4385,7 +4385,7 @@ BOOL spoolss_io_q_enumjobs(char *desc, SPOOL_Q_ENUMJOBS *q_u, prs_struct *ps, in
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_r_schedulejob(char *desc, SPOOL_R_SCHEDULEJOB *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_schedulejob(const char *desc, SPOOL_R_SCHEDULEJOB *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_schedulejob");
depth++;
@@ -4402,7 +4402,7 @@ BOOL spoolss_io_r_schedulejob(char *desc, SPOOL_R_SCHEDULEJOB *r_u, prs_struct *
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_q_schedulejob(char *desc, SPOOL_Q_SCHEDULEJOB *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_schedulejob(const char *desc, SPOOL_Q_SCHEDULEJOB *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_schedulejob");
depth++;
@@ -4421,7 +4421,7 @@ BOOL spoolss_io_q_schedulejob(char *desc, SPOOL_Q_SCHEDULEJOB *q_u, prs_struct *
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_r_setjob(char *desc, SPOOL_R_SETJOB *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_setjob(const char *desc, SPOOL_R_SETJOB *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_setjob");
depth++;
@@ -4438,7 +4438,7 @@ BOOL spoolss_io_r_setjob(char *desc, SPOOL_R_SETJOB *r_u, prs_struct *ps, int de
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_q_setjob(char *desc, SPOOL_Q_SETJOB *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_setjob(const char *desc, SPOOL_Q_SETJOB *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_setjob");
depth++;
@@ -4466,7 +4466,7 @@ BOOL spoolss_io_q_setjob(char *desc, SPOOL_Q_SETJOB *q_u, prs_struct *ps, int de
Parse a SPOOL_R_ENUMPRINTERDRIVERS structure.
********************************************************************/
-BOOL spoolss_io_r_enumprinterdrivers(char *desc, SPOOL_R_ENUMPRINTERDRIVERS *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_enumprinterdrivers(const char *desc, SPOOL_R_ENUMPRINTERDRIVERS *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_enumprinterdrivers");
depth++;
@@ -4516,7 +4516,7 @@ BOOL make_spoolss_q_enumprinterdrivers(SPOOL_Q_ENUMPRINTERDRIVERS *q_u,
Parse a SPOOL_Q_ENUMPRINTERDRIVERS structure.
********************************************************************/
-BOOL spoolss_io_q_enumprinterdrivers(char *desc, SPOOL_Q_ENUMPRINTERDRIVERS *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_enumprinterdrivers(const char *desc, SPOOL_Q_ENUMPRINTERDRIVERS *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_enumprinterdrivers");
@@ -4557,7 +4557,7 @@ BOOL spoolss_io_q_enumprinterdrivers(char *desc, SPOOL_Q_ENUMPRINTERDRIVERS *q_u
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_q_enumforms(char *desc, SPOOL_Q_ENUMFORMS *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_enumforms(const char *desc, SPOOL_Q_ENUMFORMS *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_enumforms");
@@ -4584,7 +4584,7 @@ BOOL spoolss_io_q_enumforms(char *desc, SPOOL_Q_ENUMFORMS *q_u, prs_struct *ps,
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_r_enumforms(char *desc, SPOOL_R_ENUMFORMS *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_enumforms(const char *desc, SPOOL_R_ENUMFORMS *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_enumforms");
depth++;
@@ -4613,7 +4613,7 @@ BOOL spoolss_io_r_enumforms(char *desc, SPOOL_R_ENUMFORMS *r_u, prs_struct *ps,
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_q_getform(char *desc, SPOOL_Q_GETFORM *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_getform(const char *desc, SPOOL_Q_GETFORM *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_getform");
@@ -4646,7 +4646,7 @@ BOOL spoolss_io_q_getform(char *desc, SPOOL_Q_GETFORM *q_u, prs_struct *ps, int
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_r_getform(char *desc, SPOOL_R_GETFORM *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_getform(const char *desc, SPOOL_R_GETFORM *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_getform");
depth++;
@@ -4673,7 +4673,7 @@ BOOL spoolss_io_r_getform(char *desc, SPOOL_R_GETFORM *r_u, prs_struct *ps, int
Parse a SPOOL_R_ENUMPORTS structure.
********************************************************************/
-BOOL spoolss_io_r_enumports(char *desc, SPOOL_R_ENUMPORTS *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_enumports(const char *desc, SPOOL_R_ENUMPORTS *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_enumports");
depth++;
@@ -4702,7 +4702,7 @@ BOOL spoolss_io_r_enumports(char *desc, SPOOL_R_ENUMPORTS *r_u, prs_struct *ps,
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_q_enumports(char *desc, SPOOL_Q_ENUMPORTS *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_enumports(const char *desc, SPOOL_Q_ENUMPORTS *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "");
depth++;
@@ -4735,7 +4735,7 @@ BOOL spoolss_io_q_enumports(char *desc, SPOOL_Q_ENUMPORTS *q_u, prs_struct *ps,
Parse a SPOOL_PRINTER_INFO_LEVEL_1 structure.
********************************************************************/
-BOOL spool_io_printer_info_level_1(char *desc, SPOOL_PRINTER_INFO_LEVEL_1 *il, prs_struct *ps, int depth)
+BOOL spool_io_printer_info_level_1(const char *desc, SPOOL_PRINTER_INFO_LEVEL_1 *il, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spool_io_printer_info_level_1");
depth++;
@@ -4766,7 +4766,7 @@ BOOL spool_io_printer_info_level_1(char *desc, SPOOL_PRINTER_INFO_LEVEL_1 *il, p
Parse a SPOOL_PRINTER_INFO_LEVEL_3 structure.
********************************************************************/
-BOOL spool_io_printer_info_level_3(char *desc, SPOOL_PRINTER_INFO_LEVEL_3 *il, prs_struct *ps, int depth)
+BOOL spool_io_printer_info_level_3(const char *desc, SPOOL_PRINTER_INFO_LEVEL_3 *il, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spool_io_printer_info_level_3");
depth++;
@@ -4784,7 +4784,7 @@ BOOL spool_io_printer_info_level_3(char *desc, SPOOL_PRINTER_INFO_LEVEL_3 *il, p
Parse a SPOOL_PRINTER_INFO_LEVEL_2 structure.
********************************************************************/
-BOOL spool_io_printer_info_level_2(char *desc, SPOOL_PRINTER_INFO_LEVEL_2 *il, prs_struct *ps, int depth)
+BOOL spool_io_printer_info_level_2(const char *desc, SPOOL_PRINTER_INFO_LEVEL_2 *il, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spool_io_printer_info_level_2");
depth++;
@@ -4863,7 +4863,7 @@ BOOL spool_io_printer_info_level_2(char *desc, SPOOL_PRINTER_INFO_LEVEL_2 *il, p
return True;
}
-BOOL spool_io_printer_info_level_7(char *desc, SPOOL_PRINTER_INFO_LEVEL_7 *il, prs_struct *ps, int depth)
+BOOL spool_io_printer_info_level_7(const char *desc, SPOOL_PRINTER_INFO_LEVEL_7 *il, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spool_io_printer_info_level_7");
depth++;
@@ -4884,7 +4884,7 @@ BOOL spool_io_printer_info_level_7(char *desc, SPOOL_PRINTER_INFO_LEVEL_7 *il, p
/*******************************************************************
********************************************************************/
-BOOL spool_io_printer_info_level(char *desc, SPOOL_PRINTER_INFO_LEVEL *il, prs_struct *ps, int depth)
+BOOL spool_io_printer_info_level(const char *desc, SPOOL_PRINTER_INFO_LEVEL *il, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spool_io_printer_info_level");
depth++;
@@ -4961,7 +4961,7 @@ BOOL spool_io_printer_info_level(char *desc, SPOOL_PRINTER_INFO_LEVEL *il, prs_s
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_q_addprinterex(char *desc, SPOOL_Q_ADDPRINTEREX *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_addprinterex(const char *desc, SPOOL_Q_ADDPRINTEREX *q_u, prs_struct *ps, int depth)
{
uint32 ptr_sec_desc = 0;
@@ -5025,7 +5025,7 @@ BOOL spoolss_io_q_addprinterex(char *desc, SPOOL_Q_ADDPRINTEREX *q_u, prs_struct
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_r_addprinterex(char *desc, SPOOL_R_ADDPRINTEREX *r_u,
+BOOL spoolss_io_r_addprinterex(const char *desc, SPOOL_R_ADDPRINTEREX *r_u,
prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_addprinterex");
@@ -5043,7 +5043,7 @@ BOOL spoolss_io_r_addprinterex(char *desc, SPOOL_R_ADDPRINTEREX *r_u,
/*******************************************************************
********************************************************************/
-BOOL spool_io_printer_driver_info_level_3(char *desc, SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 **q_u,
+BOOL spool_io_printer_driver_info_level_3(const char *desc, SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 **q_u,
prs_struct *ps, int depth)
{
SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 *il;
@@ -5121,7 +5121,7 @@ BOOL spool_io_printer_driver_info_level_3(char *desc, SPOOL_PRINTER_DRIVER_INFO_
parse a SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 structure
********************************************************************/
-BOOL spool_io_printer_driver_info_level_6(char *desc, SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 **q_u,
+BOOL spool_io_printer_driver_info_level_6(const char *desc, SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 **q_u,
prs_struct *ps, int depth)
{
SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 *il;
@@ -5312,7 +5312,7 @@ static BOOL uniarray_2_dosarray(BUFFER5 *buf5, fstring **ar)
and size of array at beginning
********************************************************************/
-BOOL smb_io_unibuffer(char *desc, UNISTR2 *buffer, prs_struct *ps, int depth)
+BOOL smb_io_unibuffer(const char *desc, UNISTR2 *buffer, prs_struct *ps, int depth)
{
if (buffer==NULL) return False;
@@ -5331,7 +5331,7 @@ BOOL smb_io_unibuffer(char *desc, UNISTR2 *buffer, prs_struct *ps, int depth)
/*******************************************************************
********************************************************************/
-BOOL spool_io_printer_driver_info_level(char *desc, SPOOL_PRINTER_DRIVER_INFO_LEVEL *il, prs_struct *ps, int depth)
+BOOL spool_io_printer_driver_info_level(const char *desc, SPOOL_PRINTER_DRIVER_INFO_LEVEL *il, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spool_io_printer_driver_info_level");
depth++;
@@ -5480,7 +5480,7 @@ BOOL make_spoolss_buffer5(TALLOC_CTX *mem_ctx, BUFFER5 *buf5, uint32 len, uint16
fill in the prs_struct for a ADDPRINTERDRIVER request PDU
********************************************************************/
-BOOL spoolss_io_q_addprinterdriver(char *desc, SPOOL_Q_ADDPRINTERDRIVER *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_addprinterdriver(const char *desc, SPOOL_Q_ADDPRINTERDRIVER *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_addprinterdriver");
depth++;
@@ -5507,7 +5507,7 @@ BOOL spoolss_io_q_addprinterdriver(char *desc, SPOOL_Q_ADDPRINTERDRIVER *q_u, pr
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_r_addprinterdriver(char *desc, SPOOL_R_ADDPRINTERDRIVER *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_addprinterdriver(const char *desc, SPOOL_R_ADDPRINTERDRIVER *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_addprinterdriver");
depth++;
@@ -5522,7 +5522,7 @@ BOOL spoolss_io_r_addprinterdriver(char *desc, SPOOL_R_ADDPRINTERDRIVER *q_u, pr
fill in the prs_struct for a ADDPRINTERDRIVER request PDU
********************************************************************/
-BOOL spoolss_io_q_addprinterdriverex(char *desc, SPOOL_Q_ADDPRINTERDRIVEREX *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_addprinterdriverex(const char *desc, SPOOL_Q_ADDPRINTERDRIVEREX *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_addprinterdriverex");
depth++;
@@ -5554,7 +5554,7 @@ BOOL spoolss_io_q_addprinterdriverex(char *desc, SPOOL_Q_ADDPRINTERDRIVEREX *q_u
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_r_addprinterdriverex(char *desc, SPOOL_R_ADDPRINTERDRIVEREX *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_addprinterdriverex(const char *desc, SPOOL_R_ADDPRINTERDRIVEREX *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_addprinterdriverex");
depth++;
@@ -5737,7 +5737,7 @@ BOOL make_spoolss_q_getprinterdriverdir(SPOOL_Q_GETPRINTERDRIVERDIR *q_u,
Parse a SPOOL_Q_GETPRINTERDRIVERDIR structure.
********************************************************************/
-BOOL spoolss_io_q_getprinterdriverdir(char *desc, SPOOL_Q_GETPRINTERDRIVERDIR *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_getprinterdriverdir(const char *desc, SPOOL_Q_GETPRINTERDRIVERDIR *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_getprinterdriverdir");
depth++;
@@ -5779,7 +5779,7 @@ BOOL spoolss_io_q_getprinterdriverdir(char *desc, SPOOL_Q_GETPRINTERDRIVERDIR *q
Parse a SPOOL_R_GETPRINTERDRIVERDIR structure.
********************************************************************/
-BOOL spoolss_io_r_getprinterdriverdir(char *desc, SPOOL_R_GETPRINTERDRIVERDIR *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_getprinterdriverdir(const char *desc, SPOOL_R_GETPRINTERDRIVERDIR *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_getprinterdriverdir");
depth++;
@@ -5805,7 +5805,7 @@ BOOL spoolss_io_r_getprinterdriverdir(char *desc, SPOOL_R_GETPRINTERDRIVERDIR *r
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_r_enumprintprocessors(char *desc, SPOOL_R_ENUMPRINTPROCESSORS *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_enumprintprocessors(const char *desc, SPOOL_R_ENUMPRINTPROCESSORS *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_enumprintprocessors");
depth++;
@@ -5834,7 +5834,7 @@ BOOL spoolss_io_r_enumprintprocessors(char *desc, SPOOL_R_ENUMPRINTPROCESSORS *r
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_q_enumprintprocessors(char *desc, SPOOL_Q_ENUMPRINTPROCESSORS *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_enumprintprocessors(const char *desc, SPOOL_Q_ENUMPRINTPROCESSORS *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_enumprintprocessors");
depth++;
@@ -5876,7 +5876,7 @@ BOOL spoolss_io_q_enumprintprocessors(char *desc, SPOOL_Q_ENUMPRINTPROCESSORS *q
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_q_addprintprocessor(char *desc, SPOOL_Q_ADDPRINTPROCESSOR *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_addprintprocessor(const char *desc, SPOOL_Q_ADDPRINTPROCESSOR *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_addprintprocessor");
depth++;
@@ -5910,7 +5910,7 @@ BOOL spoolss_io_q_addprintprocessor(char *desc, SPOOL_Q_ADDPRINTPROCESSOR *q_u,
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_r_addprintprocessor(char *desc, SPOOL_R_ADDPRINTPROCESSOR *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_addprintprocessor(const char *desc, SPOOL_R_ADDPRINTPROCESSOR *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_addprintproicessor");
depth++;
@@ -5927,7 +5927,7 @@ BOOL spoolss_io_r_addprintprocessor(char *desc, SPOOL_R_ADDPRINTPROCESSOR *r_u,
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_r_enumprintprocdatatypes(char *desc, SPOOL_R_ENUMPRINTPROCDATATYPES *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_enumprintprocdatatypes(const char *desc, SPOOL_R_ENUMPRINTPROCDATATYPES *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_enumprintprocdatatypes");
depth++;
@@ -5956,7 +5956,7 @@ BOOL spoolss_io_r_enumprintprocdatatypes(char *desc, SPOOL_R_ENUMPRINTPROCDATATY
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_q_enumprintprocdatatypes(char *desc, SPOOL_Q_ENUMPRINTPROCDATATYPES *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_enumprintprocdatatypes(const char *desc, SPOOL_Q_ENUMPRINTPROCDATATYPES *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_enumprintprocdatatypes");
depth++;
@@ -5999,7 +5999,7 @@ BOOL spoolss_io_q_enumprintprocdatatypes(char *desc, SPOOL_Q_ENUMPRINTPROCDATATY
Parse a SPOOL_Q_ENUMPRINTMONITORS structure.
********************************************************************/
-BOOL spoolss_io_q_enumprintmonitors(char *desc, SPOOL_Q_ENUMPRINTMONITORS *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_enumprintmonitors(const char *desc, SPOOL_Q_ENUMPRINTMONITORS *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_enumprintmonitors");
depth++;
@@ -6033,7 +6033,7 @@ BOOL spoolss_io_q_enumprintmonitors(char *desc, SPOOL_Q_ENUMPRINTMONITORS *q_u,
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_r_enumprintmonitors(char *desc, SPOOL_R_ENUMPRINTMONITORS *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_enumprintmonitors(const char *desc, SPOOL_R_ENUMPRINTMONITORS *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_enumprintmonitors");
depth++;
@@ -6062,7 +6062,7 @@ BOOL spoolss_io_r_enumprintmonitors(char *desc, SPOOL_R_ENUMPRINTMONITORS *r_u,
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_r_enumprinterdata(char *desc, SPOOL_R_ENUMPRINTERDATA *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_enumprinterdata(const char *desc, SPOOL_R_ENUMPRINTERDATA *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_enumprinterdata");
depth++;
@@ -6119,7 +6119,7 @@ BOOL spoolss_io_r_enumprinterdata(char *desc, SPOOL_R_ENUMPRINTERDATA *r_u, prs_
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_q_enumprinterdata(char *desc, SPOOL_Q_ENUMPRINTERDATA *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_enumprinterdata(const char *desc, SPOOL_Q_ENUMPRINTERDATA *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_enumprinterdata");
depth++;
@@ -6157,7 +6157,7 @@ BOOL make_spoolss_q_enumprinterdata(SPOOL_Q_ENUMPRINTERDATA *q_u,
********************************************************************/
BOOL make_spoolss_q_enumprinterdataex(SPOOL_Q_ENUMPRINTERDATAEX *q_u,
- const POLICY_HND *hnd, char *key,
+ const POLICY_HND *hnd, const char *key,
uint32 size)
{
memcpy(&q_u->handle, hnd, sizeof(q_u->handle));
@@ -6202,7 +6202,7 @@ BOOL make_spoolss_q_setprinterdataex(SPOOL_Q_SETPRINTERDATAEX *q_u, const POLICY
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_q_setprinterdata(char *desc, SPOOL_Q_SETPRINTERDATA *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_setprinterdata(const char *desc, SPOOL_Q_SETPRINTERDATA *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_setprinterdata");
depth++;
@@ -6251,7 +6251,7 @@ BOOL spoolss_io_q_setprinterdata(char *desc, SPOOL_Q_SETPRINTERDATA *q_u, prs_st
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_r_setprinterdata(char *desc, SPOOL_R_SETPRINTERDATA *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_setprinterdata(const char *desc, SPOOL_R_SETPRINTERDATA *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_setprinterdata");
depth++;
@@ -6266,7 +6266,7 @@ BOOL spoolss_io_r_setprinterdata(char *desc, SPOOL_R_SETPRINTERDATA *r_u, prs_st
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_q_resetprinter(char *desc, SPOOL_Q_RESETPRINTER *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_resetprinter(const char *desc, SPOOL_Q_RESETPRINTER *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_resetprinter");
depth++;
@@ -6293,7 +6293,7 @@ BOOL spoolss_io_q_resetprinter(char *desc, SPOOL_Q_RESETPRINTER *q_u, prs_struct
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_r_resetprinter(char *desc, SPOOL_R_RESETPRINTER *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_resetprinter(const char *desc, SPOOL_R_RESETPRINTER *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_resetprinter");
depth++;
@@ -6309,7 +6309,7 @@ BOOL spoolss_io_r_resetprinter(char *desc, SPOOL_R_RESETPRINTER *r_u, prs_struct
/*******************************************************************
********************************************************************/
-static BOOL spoolss_io_addform(char *desc, FORM *f, uint32 ptr, prs_struct *ps, int depth)
+static BOOL spoolss_io_addform(const char *desc, FORM *f, uint32 ptr, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_addform");
depth++;
@@ -6345,7 +6345,7 @@ static BOOL spoolss_io_addform(char *desc, FORM *f, uint32 ptr, prs_struct *ps,
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_q_deleteform(char *desc, SPOOL_Q_DELETEFORM *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_deleteform(const char *desc, SPOOL_Q_DELETEFORM *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_deleteform");
depth++;
@@ -6363,7 +6363,7 @@ BOOL spoolss_io_q_deleteform(char *desc, SPOOL_Q_DELETEFORM *q_u, prs_struct *ps
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_r_deleteform(char *desc, SPOOL_R_DELETEFORM *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_deleteform(const char *desc, SPOOL_R_DELETEFORM *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_deleteform");
depth++;
@@ -6379,7 +6379,7 @@ BOOL spoolss_io_r_deleteform(char *desc, SPOOL_R_DELETEFORM *r_u, prs_struct *ps
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_q_addform(char *desc, SPOOL_Q_ADDFORM *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_addform(const char *desc, SPOOL_Q_ADDFORM *q_u, prs_struct *ps, int depth)
{
uint32 useless_ptr=1;
prs_debug(ps, depth, desc, "spoolss_io_q_addform");
@@ -6408,7 +6408,7 @@ BOOL spoolss_io_q_addform(char *desc, SPOOL_Q_ADDFORM *q_u, prs_struct *ps, int
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_r_addform(char *desc, SPOOL_R_ADDFORM *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_addform(const char *desc, SPOOL_R_ADDFORM *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_addform");
depth++;
@@ -6424,7 +6424,7 @@ BOOL spoolss_io_r_addform(char *desc, SPOOL_R_ADDFORM *r_u, prs_struct *ps, int
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_q_setform(char *desc, SPOOL_Q_SETFORM *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_setform(const char *desc, SPOOL_Q_SETFORM *q_u, prs_struct *ps, int depth)
{
uint32 useless_ptr=1;
prs_debug(ps, depth, desc, "spoolss_io_q_setform");
@@ -6459,7 +6459,7 @@ BOOL spoolss_io_q_setform(char *desc, SPOOL_Q_SETFORM *q_u, prs_struct *ps, int
/*******************************************************************
********************************************************************/
-BOOL spoolss_io_r_setform(char *desc, SPOOL_R_SETFORM *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_setform(const char *desc, SPOOL_R_SETFORM *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_setform");
depth++;
@@ -6476,7 +6476,7 @@ BOOL spoolss_io_r_setform(char *desc, SPOOL_R_SETFORM *r_u, prs_struct *ps, int
Parse a SPOOL_R_GETJOB structure.
********************************************************************/
-BOOL spoolss_io_r_getjob(char *desc, SPOOL_R_GETJOB *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_getjob(const char *desc, SPOOL_R_GETJOB *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_getjob");
depth++;
@@ -6503,7 +6503,7 @@ BOOL spoolss_io_r_getjob(char *desc, SPOOL_R_GETJOB *r_u, prs_struct *ps, int de
Parse a SPOOL_Q_GETJOB structure.
********************************************************************/
-BOOL spoolss_io_q_getjob(char *desc, SPOOL_Q_GETJOB *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_getjob(const char *desc, SPOOL_Q_GETJOB *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "");
depth++;
@@ -6603,7 +6603,7 @@ BOOL make_spoolss_q_replyopenprinter(SPOOL_Q_REPLYOPENPRINTER *q_u,
Parse a SPOOL_Q_REPLYOPENPRINTER structure.
********************************************************************/
-BOOL spoolss_io_q_replyopenprinter(char *desc, SPOOL_Q_REPLYOPENPRINTER *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_replyopenprinter(const char *desc, SPOOL_Q_REPLYOPENPRINTER *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_replyopenprinter");
depth++;
@@ -6634,7 +6634,7 @@ BOOL spoolss_io_q_replyopenprinter(char *desc, SPOOL_Q_REPLYOPENPRINTER *q_u, pr
Parse a SPOOL_R_REPLYOPENPRINTER structure.
********************************************************************/
-BOOL spoolss_io_r_replyopenprinter(char *desc, SPOOL_R_REPLYOPENPRINTER *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_replyopenprinter(const char *desc, SPOOL_R_REPLYOPENPRINTER *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_replyopenprinter");
depth++;
@@ -6674,7 +6674,7 @@ BOOL make_spoolss_q_routerreplyprinter(SPOOL_Q_ROUTERREPLYPRINTER *q_u, POLICY_H
/*******************************************************************
Parse a SPOOL_Q_ROUTERREPLYPRINTER structure.
********************************************************************/
-BOOL spoolss_io_q_routerreplyprinter (char *desc, SPOOL_Q_ROUTERREPLYPRINTER *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_routerreplyprinter (const char *desc, SPOOL_Q_ROUTERREPLYPRINTER *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_routerreplyprinter");
@@ -6704,7 +6704,7 @@ BOOL spoolss_io_q_routerreplyprinter (char *desc, SPOOL_Q_ROUTERREPLYPRINTER *q_
/*******************************************************************
Parse a SPOOL_R_ROUTERREPLYPRINTER structure.
********************************************************************/
-BOOL spoolss_io_r_routerreplyprinter (char *desc, SPOOL_R_ROUTERREPLYPRINTER *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_routerreplyprinter (const char *desc, SPOOL_R_ROUTERREPLYPRINTER *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_routerreplyprinter");
depth++;
@@ -6736,7 +6736,7 @@ BOOL make_spoolss_q_reply_closeprinter(SPOOL_Q_REPLYCLOSEPRINTER *q_u, POLICY_HN
Parse a SPOOL_Q_REPLYCLOSEPRINTER structure.
********************************************************************/
-BOOL spoolss_io_q_replycloseprinter(char *desc, SPOOL_Q_REPLYCLOSEPRINTER *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_replycloseprinter(const char *desc, SPOOL_Q_REPLYCLOSEPRINTER *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_replycloseprinter");
depth++;
@@ -6754,7 +6754,7 @@ BOOL spoolss_io_q_replycloseprinter(char *desc, SPOOL_Q_REPLYCLOSEPRINTER *q_u,
Parse a SPOOL_R_REPLYCLOSEPRINTER structure.
********************************************************************/
-BOOL spoolss_io_r_replycloseprinter(char *desc, SPOOL_R_REPLYCLOSEPRINTER *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_replycloseprinter(const char *desc, SPOOL_R_REPLYCLOSEPRINTER *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_replycloseprinter");
depth++;
@@ -6881,7 +6881,7 @@ BOOL make_spoolss_q_reply_rrpcn(SPOOL_Q_REPLY_RRPCN *q_u, POLICY_HND *hnd,
Parse a SPOOL_Q_REPLY_RRPCN structure.
********************************************************************/
-BOOL spoolss_io_q_reply_rrpcn(char *desc, SPOOL_Q_REPLY_RRPCN *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_reply_rrpcn(const char *desc, SPOOL_Q_REPLY_RRPCN *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_reply_rrpcn");
depth++;
@@ -6918,7 +6918,7 @@ BOOL spoolss_io_q_reply_rrpcn(char *desc, SPOOL_Q_REPLY_RRPCN *q_u, prs_struct *
Parse a SPOOL_R_REPLY_RRPCN structure.
********************************************************************/
-BOOL spoolss_io_r_reply_rrpcn(char *desc, SPOOL_R_REPLY_RRPCN *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_reply_rrpcn(const char *desc, SPOOL_R_REPLY_RRPCN *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_reply_rrpcn");
depth++;
@@ -6940,7 +6940,7 @@ BOOL spoolss_io_r_reply_rrpcn(char *desc, SPOOL_R_REPLY_RRPCN *r_u, prs_struct *
* called from spoolss_q_getprinterdataex (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_q_getprinterdataex(char *desc, SPOOL_Q_GETPRINTERDATAEX *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_getprinterdataex(const char *desc, SPOOL_Q_GETPRINTERDATAEX *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL)
return False;
@@ -6973,7 +6973,7 @@ BOOL spoolss_io_q_getprinterdataex(char *desc, SPOOL_Q_GETPRINTERDATAEX *q_u, pr
* called from spoolss_r_getprinterdataex (srv_spoolss.c)
********************************************************************/
-BOOL spoolss_io_r_getprinterdataex(char *desc, SPOOL_R_GETPRINTERDATAEX *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_getprinterdataex(const char *desc, SPOOL_R_GETPRINTERDATAEX *r_u, prs_struct *ps, int depth)
{
if (r_u == NULL)
return False;
@@ -7012,7 +7012,7 @@ BOOL spoolss_io_r_getprinterdataex(char *desc, SPOOL_R_GETPRINTERDATAEX *r_u, pr
* read a structure.
********************************************************************/
-BOOL spoolss_io_q_setprinterdataex(char *desc, SPOOL_Q_SETPRINTERDATAEX *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_setprinterdataex(const char *desc, SPOOL_Q_SETPRINTERDATAEX *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_setprinterdataex");
depth++;
@@ -7068,7 +7068,7 @@ BOOL spoolss_io_q_setprinterdataex(char *desc, SPOOL_Q_SETPRINTERDATAEX *q_u, pr
* write a structure.
********************************************************************/
-BOOL spoolss_io_r_setprinterdataex(char *desc, SPOOL_R_SETPRINTERDATAEX *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_setprinterdataex(const char *desc, SPOOL_R_SETPRINTERDATAEX *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_setprinterdataex");
depth++;
@@ -7085,7 +7085,8 @@ BOOL spoolss_io_r_setprinterdataex(char *desc, SPOOL_R_SETPRINTERDATAEX *r_u, pr
* read a structure.
********************************************************************/
BOOL make_spoolss_q_enumprinterkey(SPOOL_Q_ENUMPRINTERKEY *q_u,
- POLICY_HND *hnd, char *key, uint32 size)
+ POLICY_HND *hnd, const char *key,
+ uint32 size)
{
DEBUG(5,("make_spoolss_q_enumprinterkey\n"));
@@ -7100,7 +7101,7 @@ BOOL make_spoolss_q_enumprinterkey(SPOOL_Q_ENUMPRINTERKEY *q_u,
* read a structure.
********************************************************************/
-BOOL spoolss_io_q_enumprinterkey(char *desc, SPOOL_Q_ENUMPRINTERKEY *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_enumprinterkey(const char *desc, SPOOL_Q_ENUMPRINTERKEY *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_enumprinterkey");
depth++;
@@ -7126,7 +7127,7 @@ BOOL spoolss_io_q_enumprinterkey(char *desc, SPOOL_Q_ENUMPRINTERKEY *q_u, prs_st
* write a structure.
********************************************************************/
-BOOL spoolss_io_r_enumprinterkey(char *desc, SPOOL_R_ENUMPRINTERKEY *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_enumprinterkey(const char *desc, SPOOL_R_ENUMPRINTERKEY *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_enumprinterkey");
depth++;
@@ -7168,7 +7169,7 @@ BOOL make_spoolss_q_deleteprinterkey(SPOOL_Q_DELETEPRINTERKEY *q_u,
* read a structure.
********************************************************************/
-BOOL spoolss_io_q_deleteprinterkey(char *desc, SPOOL_Q_DELETEPRINTERKEY *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_deleteprinterkey(const char *desc, SPOOL_Q_DELETEPRINTERKEY *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_deleteprinterkey");
depth++;
@@ -7188,7 +7189,7 @@ BOOL spoolss_io_q_deleteprinterkey(char *desc, SPOOL_Q_DELETEPRINTERKEY *q_u, pr
* write a structure.
********************************************************************/
-BOOL spoolss_io_r_deleteprinterkey(char *desc, SPOOL_R_DELETEPRINTERKEY *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_deleteprinterkey(const char *desc, SPOOL_R_DELETEPRINTERKEY *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_deleteprinterkey");
depth++;
@@ -7207,7 +7208,7 @@ BOOL spoolss_io_r_deleteprinterkey(char *desc, SPOOL_R_DELETEPRINTERKEY *r_u, pr
* read a structure.
********************************************************************/
-BOOL spoolss_io_q_enumprinterdataex(char *desc, SPOOL_Q_ENUMPRINTERDATAEX *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_enumprinterdataex(const char *desc, SPOOL_Q_ENUMPRINTERDATAEX *q_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_q_enumprinterdataex");
depth++;
@@ -7232,7 +7233,7 @@ BOOL spoolss_io_q_enumprinterdataex(char *desc, SPOOL_Q_ENUMPRINTERDATAEX *q_u,
/*******************************************************************
********************************************************************/
-static BOOL spoolss_io_printer_enum_values_ctr(char *desc, prs_struct *ps,
+static BOOL spoolss_io_printer_enum_values_ctr(const char *desc, prs_struct *ps,
PRINTER_ENUM_VALUES_CTR *ctr, int depth)
{
int i;
@@ -7315,7 +7316,7 @@ static BOOL spoolss_io_printer_enum_values_ctr(char *desc, prs_struct *ps,
* write a structure.
********************************************************************/
-BOOL spoolss_io_r_enumprinterdataex(char *desc, SPOOL_R_ENUMPRINTERDATAEX *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_enumprinterdataex(const char *desc, SPOOL_R_ENUMPRINTERDATAEX *r_u, prs_struct *ps, int depth)
{
uint32 data_offset, end_offset;
prs_debug(ps, depth, desc, "spoolss_io_r_enumprinterdataex");
@@ -7392,7 +7393,7 @@ BOOL make_spoolss_q_getprintprocessordirectory(SPOOL_Q_GETPRINTPROCESSORDIRECTOR
return True;
}
-BOOL spoolss_io_q_getprintprocessordirectory(char *desc, SPOOL_Q_GETPRINTPROCESSORDIRECTORY *q_u, prs_struct *ps, int depth)
+BOOL spoolss_io_q_getprintprocessordirectory(const char *desc, SPOOL_Q_GETPRINTPROCESSORDIRECTORY *q_u, prs_struct *ps, int depth)
{
uint32 ptr;
@@ -7444,7 +7445,7 @@ BOOL spoolss_io_q_getprintprocessordirectory(char *desc, SPOOL_Q_GETPRINTPROCESS
* write a structure.
********************************************************************/
-BOOL spoolss_io_r_getprintprocessordirectory(char *desc, SPOOL_R_GETPRINTPROCESSORDIRECTORY *r_u, prs_struct *ps, int depth)
+BOOL spoolss_io_r_getprintprocessordirectory(const char *desc, SPOOL_R_GETPRINTPROCESSORDIRECTORY *r_u, prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "spoolss_io_r_getprintprocessordirectory");
depth++;
@@ -7467,7 +7468,7 @@ BOOL spoolss_io_r_getprintprocessordirectory(char *desc, SPOOL_R_GETPRINTPROCESS
return True;
}
-BOOL smb_io_printprocessordirectory_1(char *desc, NEW_BUFFER *buffer, PRINTPROCESSOR_DIRECTORY_1 *info, int depth)
+BOOL smb_io_printprocessordirectory_1(const char *desc, NEW_BUFFER *buffer, PRINTPROCESSOR_DIRECTORY_1 *info, int depth)
{
prs_struct *ps=&buffer->prs;
diff --git a/source3/rpc_parse/parse_srv.c b/source3/rpc_parse/parse_srv.c
index b3d33645b90..bfa1a13be9c 100644
--- a/source3/rpc_parse/parse_srv.c
+++ b/source3/rpc_parse/parse_srv.c
@@ -32,7 +32,7 @@
Inits a SH_INFO_0_STR structure
********************************************************************/
-void init_srv_share_info0_str(SH_INFO_0_STR *sh0, char *net_name)
+void init_srv_share_info0_str(SH_INFO_0_STR *sh0, const char *net_name)
{
DEBUG(5,("init_srv_share_info0_str\n"));
@@ -44,7 +44,7 @@ void init_srv_share_info0_str(SH_INFO_0_STR *sh0, char *net_name)
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_share_info0_str(char *desc, SH_INFO_0_STR *sh0, prs_struct *ps, int depth)
+static BOOL srv_io_share_info0_str(const char *desc, SH_INFO_0_STR *sh0, prs_struct *ps, int depth)
{
if (sh0 == NULL)
return False;
@@ -65,7 +65,7 @@ static BOOL srv_io_share_info0_str(char *desc, SH_INFO_0_STR *sh0, prs_struct *p
makes a SH_INFO_0 structure
********************************************************************/
-void init_srv_share_info0(SH_INFO_0 *sh0, char *net_name)
+void init_srv_share_info0(SH_INFO_0 *sh0, const char *net_name)
{
DEBUG(5,("init_srv_share_info0: %s\n", net_name));
@@ -76,7 +76,7 @@ void init_srv_share_info0(SH_INFO_0 *sh0, char *net_name)
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_share_info0(char *desc, SH_INFO_0 *sh0, prs_struct *ps, int depth)
+static BOOL srv_io_share_info0(const char *desc, SH_INFO_0 *sh0, prs_struct *ps, int depth)
{
if (sh0 == NULL)
return False;
@@ -97,7 +97,7 @@ static BOOL srv_io_share_info0(char *desc, SH_INFO_0 *sh0, prs_struct *ps, int d
Inits a SH_INFO_1_STR structure
********************************************************************/
-void init_srv_share_info1_str(SH_INFO_1_STR *sh1, char *net_name, char *remark)
+void init_srv_share_info1_str(SH_INFO_1_STR *sh1, const char *net_name, const char *remark)
{
DEBUG(5,("init_srv_share_info1_str\n"));
@@ -111,7 +111,7 @@ void init_srv_share_info1_str(SH_INFO_1_STR *sh1, char *net_name, char *remark)
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_share_info1_str(char *desc, SH_INFO_1_STR *sh1, prs_struct *ps, int depth)
+static BOOL srv_io_share_info1_str(const char *desc, SH_INFO_1_STR *sh1, prs_struct *ps, int depth)
{
if (sh1 == NULL)
return False;
@@ -140,7 +140,7 @@ static BOOL srv_io_share_info1_str(char *desc, SH_INFO_1_STR *sh1, prs_struct *p
makes a SH_INFO_1 structure
********************************************************************/
-void init_srv_share_info1(SH_INFO_1 *sh1, char *net_name, uint32 type, char *remark)
+void init_srv_share_info1(SH_INFO_1 *sh1, const char *net_name, uint32 type, const char *remark)
{
DEBUG(5,("init_srv_share_info1: %s %8x %s\n", net_name, type, remark));
@@ -153,7 +153,7 @@ void init_srv_share_info1(SH_INFO_1 *sh1, char *net_name, uint32 type, char *rem
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_share_info1(char *desc, SH_INFO_1 *sh1, prs_struct *ps, int depth)
+static BOOL srv_io_share_info1(const char *desc, SH_INFO_1 *sh1, prs_struct *ps, int depth)
{
if (sh1 == NULL)
return False;
@@ -179,8 +179,8 @@ static BOOL srv_io_share_info1(char *desc, SH_INFO_1 *sh1, prs_struct *ps, int d
********************************************************************/
void init_srv_share_info2_str(SH_INFO_2_STR *sh2,
- char *net_name, char *remark,
- char *path, char *passwd)
+ const char *net_name, const char *remark,
+ const char *path, const char *passwd)
{
DEBUG(5,("init_srv_share_info2_str\n"));
@@ -198,7 +198,7 @@ void init_srv_share_info2_str(SH_INFO_2_STR *sh2,
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_share_info2_str(char *desc, SH_INFO_2 *sh, SH_INFO_2_STR *sh2, prs_struct *ps, int depth)
+static BOOL srv_io_share_info2_str(const char *desc, SH_INFO_2 *sh, SH_INFO_2_STR *sh2, prs_struct *ps, int depth)
{
if (sh2 == NULL)
return False;
@@ -236,9 +236,9 @@ static BOOL srv_io_share_info2_str(char *desc, SH_INFO_2 *sh, SH_INFO_2_STR *sh2
********************************************************************/
void init_srv_share_info2(SH_INFO_2 *sh2,
- char *net_name, uint32 type, char *remark,
+ const char *net_name, uint32 type, const char *remark,
uint32 perms, uint32 max_uses, uint32 num_uses,
- char *path, char *passwd)
+ const char *path, const char *passwd)
{
DEBUG(5,("init_srv_share_info2: %s %8x %s\n", net_name, type, remark));
@@ -256,7 +256,7 @@ void init_srv_share_info2(SH_INFO_2 *sh2,
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_share_info2(char *desc, SH_INFO_2 *sh2, prs_struct *ps, int depth)
+static BOOL srv_io_share_info2(const char *desc, SH_INFO_2 *sh2, prs_struct *ps, int depth)
{
if (sh2 == NULL)
return False;
@@ -292,7 +292,7 @@ static BOOL srv_io_share_info2(char *desc, SH_INFO_2 *sh2, prs_struct *ps, int d
********************************************************************/
void init_srv_share_info501_str(SH_INFO_501_STR *sh501,
- char *net_name, char *remark)
+ const char *net_name, const char *remark)
{
DEBUG(5,("init_srv_share_info501_str\n"));
@@ -306,7 +306,7 @@ void init_srv_share_info501_str(SH_INFO_501_STR *sh501,
Inits a SH_INFO_2 structure
*******************************************************************/
-void init_srv_share_info501(SH_INFO_501 *sh501, char *net_name, uint32 type, char *remark, uint32 csc_policy)
+void init_srv_share_info501(SH_INFO_501 *sh501, const char *net_name, uint32 type, const char *remark, uint32 csc_policy)
{
DEBUG(5,("init_srv_share_info501: %s %8x %s %08x\n", net_name, type,
remark, csc_policy));
@@ -323,7 +323,7 @@ void init_srv_share_info501(SH_INFO_501 *sh501, char *net_name, uint32 type, cha
Reads of writes a structure.
*******************************************************************/
-static BOOL srv_io_share_info501(char *desc, SH_INFO_501 *sh501, prs_struct *ps, int depth)
+static BOOL srv_io_share_info501(const char *desc, SH_INFO_501 *sh501, prs_struct *ps, int depth)
{
if (sh501 == NULL)
return False;
@@ -350,7 +350,7 @@ static BOOL srv_io_share_info501(char *desc, SH_INFO_501 *sh501, prs_struct *ps,
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_share_info501_str(char *desc, SH_INFO_501_STR *sh501, prs_struct *ps, int depth)
+static BOOL srv_io_share_info501_str(const char *desc, SH_INFO_501_STR *sh501, prs_struct *ps, int depth)
{
if (sh501 == NULL)
return False;
@@ -376,9 +376,9 @@ static BOOL srv_io_share_info501_str(char *desc, SH_INFO_501_STR *sh501, prs_str
********************************************************************/
void init_srv_share_info502(SH_INFO_502 *sh502,
- const char *net_name, uint32 type, char *remark,
+ const char *net_name, uint32 type, const char *remark,
uint32 perms, uint32 max_uses, uint32 num_uses,
- char *path, char *passwd, SEC_DESC *psd, size_t sd_size)
+ const char *path, const char *passwd, SEC_DESC *psd, size_t sd_size)
{
DEBUG(5,("init_srv_share_info502: %s %8x %s\n", net_name, type, remark));
@@ -401,7 +401,7 @@ void init_srv_share_info502(SH_INFO_502 *sh502,
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_share_info502(char *desc, SH_INFO_502 *sh502, prs_struct *ps, int depth)
+static BOOL srv_io_share_info502(const char *desc, SH_INFO_502 *sh502, prs_struct *ps, int depth)
{
if (sh502 == NULL)
return False;
@@ -441,8 +441,8 @@ static BOOL srv_io_share_info502(char *desc, SH_INFO_502 *sh502, prs_struct *ps,
********************************************************************/
void init_srv_share_info502_str(SH_INFO_502_STR *sh502str,
- char *net_name, char *remark,
- char *path, char *passwd, SEC_DESC *psd, size_t sd_size)
+ const char *net_name, const char *remark,
+ const char *path, const char *passwd, SEC_DESC *psd, size_t sd_size)
{
DEBUG(5,("init_srv_share_info502_str\n"));
@@ -463,7 +463,7 @@ void init_srv_share_info502_str(SH_INFO_502_STR *sh502str,
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_share_info502_str(char *desc, SH_INFO_502_STR *sh502, prs_struct *ps, int depth)
+static BOOL srv_io_share_info502_str(const char *desc, SH_INFO_502_STR *sh502, prs_struct *ps, int depth)
{
if (sh502 == NULL)
return False;
@@ -547,7 +547,7 @@ static BOOL srv_io_share_info502_str(char *desc, SH_INFO_502_STR *sh502, prs_str
Inits a SH_INFO_1004_STR structure
********************************************************************/
-void init_srv_share_info1004_str(SH_INFO_1004_STR *sh1004, char *remark)
+void init_srv_share_info1004_str(SH_INFO_1004_STR *sh1004, const char *remark)
{
DEBUG(5,("init_srv_share_info1004_str\n"));
@@ -559,7 +559,7 @@ void init_srv_share_info1004_str(SH_INFO_1004_STR *sh1004, char *remark)
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_share_info1004_str(char *desc, SH_INFO_1004_STR *sh1004, prs_struct *ps, int depth)
+static BOOL srv_io_share_info1004_str(const char *desc, SH_INFO_1004_STR *sh1004, prs_struct *ps, int depth)
{
if (sh1004 == NULL)
return False;
@@ -580,7 +580,7 @@ static BOOL srv_io_share_info1004_str(char *desc, SH_INFO_1004_STR *sh1004, prs_
makes a SH_INFO_1004 structure
********************************************************************/
-void init_srv_share_info1004(SH_INFO_1004 *sh1004, char *remark)
+void init_srv_share_info1004(SH_INFO_1004 *sh1004, const char *remark)
{
DEBUG(5,("init_srv_share_info1004: %s\n", remark));
@@ -591,7 +591,7 @@ void init_srv_share_info1004(SH_INFO_1004 *sh1004, char *remark)
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_share_info1004(char *desc, SH_INFO_1004 *sh1004, prs_struct *ps, int depth)
+static BOOL srv_io_share_info1004(const char *desc, SH_INFO_1004 *sh1004, prs_struct *ps, int depth)
{
if (sh1004 == NULL)
return False;
@@ -612,7 +612,7 @@ static BOOL srv_io_share_info1004(char *desc, SH_INFO_1004 *sh1004, prs_struct *
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_share_info1005(char* desc, SRV_SHARE_INFO_1005* sh1005, prs_struct* ps, int depth)
+static BOOL srv_io_share_info1005(const char* desc, SRV_SHARE_INFO_1005* sh1005, prs_struct* ps, int depth)
{
if(sh1005 == NULL)
return False;
@@ -633,7 +633,7 @@ static BOOL srv_io_share_info1005(char* desc, SRV_SHARE_INFO_1005* sh1005, prs_s
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_share_info1006(char* desc, SRV_SHARE_INFO_1006* sh1006, prs_struct* ps, int depth)
+static BOOL srv_io_share_info1006(const char* desc, SRV_SHARE_INFO_1006* sh1006, prs_struct* ps, int depth)
{
if(sh1006 == NULL)
return False;
@@ -666,7 +666,7 @@ void init_srv_share_info1007_str(SH_INFO_1007_STR *sh1007, const char *alternate
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_share_info1007_str(char *desc, SH_INFO_1007_STR *sh1007, prs_struct *ps, int depth)
+static BOOL srv_io_share_info1007_str(const char *desc, SH_INFO_1007_STR *sh1007, prs_struct *ps, int depth)
{
if (sh1007 == NULL)
return False;
@@ -699,7 +699,7 @@ void init_srv_share_info1007(SH_INFO_1007 *sh1007, uint32 flags, const char *alt
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_share_info1007(char *desc, SH_INFO_1007 *sh1007, prs_struct *ps, int depth)
+static BOOL srv_io_share_info1007(const char *desc, SH_INFO_1007 *sh1007, prs_struct *ps, int depth)
{
if (sh1007 == NULL)
return False;
@@ -722,7 +722,7 @@ static BOOL srv_io_share_info1007(char *desc, SH_INFO_1007 *sh1007, prs_struct *
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_share_info1501(char* desc, SRV_SHARE_INFO_1501* sh1501,
+static BOOL srv_io_share_info1501(const char* desc, SRV_SHARE_INFO_1501* sh1501,
prs_struct* ps, int depth)
{
if(sh1501 == NULL)
@@ -744,7 +744,7 @@ static BOOL srv_io_share_info1501(char* desc, SRV_SHARE_INFO_1501* sh1501,
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_srv_share_ctr(char *desc, SRV_SHARE_INFO_CTR *ctr, prs_struct *ps, int depth)
+static BOOL srv_io_srv_share_ctr(const char *desc, SRV_SHARE_INFO_CTR *ctr, prs_struct *ps, int depth)
{
if (ctr == NULL)
return False;
@@ -1045,7 +1045,7 @@ static BOOL srv_io_srv_share_ctr(char *desc, SRV_SHARE_INFO_CTR *ctr, prs_struct
********************************************************************/
void init_srv_q_net_share_enum(SRV_Q_NET_SHARE_ENUM *q_n,
- char *srv_name, uint32 info_level,
+ const char *srv_name, uint32 info_level,
uint32 preferred_len, ENUM_HND *hnd)
{
@@ -1067,7 +1067,7 @@ void init_srv_q_net_share_enum(SRV_Q_NET_SHARE_ENUM *q_n,
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_q_net_share_enum(char *desc, SRV_Q_NET_SHARE_ENUM *q_n, prs_struct *ps, int depth)
+BOOL srv_io_q_net_share_enum(const char *desc, SRV_Q_NET_SHARE_ENUM *q_n, prs_struct *ps, int depth)
{
if (q_n == NULL)
return False;
@@ -1102,7 +1102,7 @@ BOOL srv_io_q_net_share_enum(char *desc, SRV_Q_NET_SHARE_ENUM *q_n, prs_struct *
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_r_net_share_enum(char *desc, SRV_R_NET_SHARE_ENUM *r_n, prs_struct *ps, int depth)
+BOOL srv_io_r_net_share_enum(const char *desc, SRV_R_NET_SHARE_ENUM *r_n, prs_struct *ps, int depth)
{
if (r_n == NULL)
return False;
@@ -1151,7 +1151,7 @@ BOOL init_srv_q_net_share_get_info(SRV_Q_NET_SHARE_GET_INFO *q_n, const char *sr
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_q_net_share_get_info(char *desc, SRV_Q_NET_SHARE_GET_INFO *q_n, prs_struct *ps, int depth)
+BOOL srv_io_q_net_share_get_info(const char *desc, SRV_Q_NET_SHARE_GET_INFO *q_n, prs_struct *ps, int depth)
{
if (q_n == NULL)
return False;
@@ -1183,7 +1183,7 @@ BOOL srv_io_q_net_share_get_info(char *desc, SRV_Q_NET_SHARE_GET_INFO *q_n, prs_
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_srv_share_info(char *desc, prs_struct *ps, int depth, SRV_SHARE_INFO *r_n)
+static BOOL srv_io_srv_share_info(const char *desc, prs_struct *ps, int depth, SRV_SHARE_INFO *r_n)
{
if (r_n == NULL)
return False;
@@ -1294,7 +1294,7 @@ static BOOL srv_io_srv_share_info(char *desc, prs_struct *ps, int depth, SRV_SHA
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_r_net_share_get_info(char *desc, SRV_R_NET_SHARE_GET_INFO *r_n, prs_struct *ps, int depth)
+BOOL srv_io_r_net_share_get_info(const char *desc, SRV_R_NET_SHARE_GET_INFO *r_n, prs_struct *ps, int depth)
{
if (r_n == NULL)
return False;
@@ -1349,7 +1349,7 @@ BOOL init_srv_q_net_share_set_info(SRV_Q_NET_SHARE_SET_INFO *q_n,
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_q_net_share_set_info(char *desc, SRV_Q_NET_SHARE_SET_INFO *q_n, prs_struct *ps, int depth)
+BOOL srv_io_q_net_share_set_info(const char *desc, SRV_Q_NET_SHARE_SET_INFO *q_n, prs_struct *ps, int depth)
{
if (q_n == NULL)
return False;
@@ -1396,7 +1396,7 @@ BOOL srv_io_q_net_share_set_info(char *desc, SRV_Q_NET_SHARE_SET_INFO *q_n, prs_
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_r_net_share_set_info(char *desc, SRV_R_NET_SHARE_SET_INFO *r_n, prs_struct *ps, int depth)
+BOOL srv_io_r_net_share_set_info(const char *desc, SRV_R_NET_SHARE_SET_INFO *r_n, prs_struct *ps, int depth)
{
if (r_n == NULL)
return False;
@@ -1427,7 +1427,7 @@ BOOL srv_io_r_net_share_set_info(char *desc, SRV_R_NET_SHARE_SET_INFO *r_n, prs_
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_q_net_share_add(char *desc, SRV_Q_NET_SHARE_ADD *q_n, prs_struct *ps, int depth)
+BOOL srv_io_q_net_share_add(const char *desc, SRV_Q_NET_SHARE_ADD *q_n, prs_struct *ps, int depth)
{
if (q_n == NULL)
return False;
@@ -1467,10 +1467,10 @@ BOOL srv_io_q_net_share_add(char *desc, SRV_Q_NET_SHARE_ADD *q_n, prs_struct *ps
return True;
}
-void init_srv_q_net_share_add(SRV_Q_NET_SHARE_ADD *q, char *srvname,
- char *netname, uint32 type, char *remark,
+void init_srv_q_net_share_add(SRV_Q_NET_SHARE_ADD *q, const char *srvname,
+ const char *netname, uint32 type, const char *remark,
uint32 perms, uint32 max_uses, uint32 num_uses,
- char *path, char *passwd)
+ const char *path, const char *passwd)
{
q->ptr_srv_name = 1;
init_unistr2(&q->uni_srv_name, srvname, strlen(srvname) +1);
@@ -1490,7 +1490,7 @@ void init_srv_q_net_share_add(SRV_Q_NET_SHARE_ADD *q, char *srvname,
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_r_net_share_add(char *desc, SRV_R_NET_SHARE_ADD *r_n, prs_struct *ps, int depth)
+BOOL srv_io_r_net_share_add(const char *desc, SRV_R_NET_SHARE_ADD *r_n, prs_struct *ps, int depth)
{
if (r_n == NULL)
return False;
@@ -1532,7 +1532,7 @@ void init_srv_q_net_share_del(SRV_Q_NET_SHARE_DEL *del, const char *srvname,
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_q_net_share_del(char *desc, SRV_Q_NET_SHARE_DEL *q_n, prs_struct *ps, int depth)
+BOOL srv_io_q_net_share_del(const char *desc, SRV_Q_NET_SHARE_DEL *q_n, prs_struct *ps, int depth)
{
if (q_n == NULL)
return False;
@@ -1563,7 +1563,7 @@ BOOL srv_io_q_net_share_del(char *desc, SRV_Q_NET_SHARE_DEL *q_n, prs_struct *ps
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_r_net_share_del(char *desc, SRV_R_NET_SHARE_DEL *q_n, prs_struct *ps, int depth)
+BOOL srv_io_r_net_share_del(const char *desc, SRV_R_NET_SHARE_DEL *q_n, prs_struct *ps, int depth)
{
if (q_n == NULL)
return False;
@@ -1584,7 +1584,7 @@ BOOL srv_io_r_net_share_del(char *desc, SRV_R_NET_SHARE_DEL *q_n, prs_struct *ps
Inits a SESS_INFO_0_STR structure
********************************************************************/
-void init_srv_sess_info0_str(SESS_INFO_0_STR *ss0, char *name)
+void init_srv_sess_info0_str(SESS_INFO_0_STR *ss0, const char *name)
{
DEBUG(5,("init_srv_sess_info0_str\n"));
@@ -1595,7 +1595,7 @@ void init_srv_sess_info0_str(SESS_INFO_0_STR *ss0, char *name)
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_sess_info0_str(char *desc, SESS_INFO_0_STR *ss0, prs_struct *ps, int depth)
+static BOOL srv_io_sess_info0_str(const char *desc, SESS_INFO_0_STR *ss0, prs_struct *ps, int depth)
{
if (ss0 == NULL)
return False;
@@ -1616,7 +1616,7 @@ static BOOL srv_io_sess_info0_str(char *desc, SESS_INFO_0_STR *ss0, prs_struct
Inits a SESS_INFO_0 structure
********************************************************************/
-void init_srv_sess_info0(SESS_INFO_0 *ss0, char *name)
+void init_srv_sess_info0(SESS_INFO_0 *ss0, const char *name)
{
DEBUG(5,("init_srv_sess_info0: %s\n", name));
@@ -1627,7 +1627,7 @@ void init_srv_sess_info0(SESS_INFO_0 *ss0, char *name)
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_sess_info0(char *desc, SESS_INFO_0 *ss0, prs_struct *ps, int depth)
+static BOOL srv_io_sess_info0(const char *desc, SESS_INFO_0 *ss0, prs_struct *ps, int depth)
{
if (ss0 == NULL)
return False;
@@ -1648,7 +1648,7 @@ static BOOL srv_io_sess_info0(char *desc, SESS_INFO_0 *ss0, prs_struct *ps, int
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_srv_sess_info_0(char *desc, SRV_SESS_INFO_0 *ss0, prs_struct *ps, int depth)
+static BOOL srv_io_srv_sess_info_0(const char *desc, SRV_SESS_INFO_0 *ss0, prs_struct *ps, int depth)
{
if (ss0 == NULL)
return False;
@@ -1698,7 +1698,7 @@ static BOOL srv_io_srv_sess_info_0(char *desc, SRV_SESS_INFO_0 *ss0, prs_struct
Inits a SESS_INFO_1_STR structure
********************************************************************/
-void init_srv_sess_info1_str(SESS_INFO_1_STR *ss1, char *name, char *user)
+void init_srv_sess_info1_str(SESS_INFO_1_STR *ss1, const char *name, const char *user)
{
DEBUG(5,("init_srv_sess_info1_str\n"));
@@ -1710,7 +1710,7 @@ void init_srv_sess_info1_str(SESS_INFO_1_STR *ss1, char *name, char *user)
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_sess_info1_str(char *desc, SESS_INFO_1_STR *ss1, prs_struct *ps, int depth)
+static BOOL srv_io_sess_info1_str(const char *desc, SESS_INFO_1_STR *ss1, prs_struct *ps, int depth)
{
if (ss1 == NULL)
return False;
@@ -1734,7 +1734,7 @@ static BOOL srv_io_sess_info1_str(char *desc, SESS_INFO_1_STR *ss1, prs_struct *
********************************************************************/
void init_srv_sess_info1(SESS_INFO_1 *ss1,
- char *name, char *user,
+ const char *name, const char *user,
uint32 num_opens, uint32 open_time, uint32 idle_time,
uint32 user_flags)
{
@@ -1753,7 +1753,7 @@ void init_srv_sess_info1(SESS_INFO_1 *ss1,
reads or writes a structure.
********************************************************************/
-static BOOL srv_io_sess_info1(char *desc, SESS_INFO_1 *ss1, prs_struct *ps, int depth)
+static BOOL srv_io_sess_info1(const char *desc, SESS_INFO_1 *ss1, prs_struct *ps, int depth)
{
if (ss1 == NULL)
return False;
@@ -1785,7 +1785,7 @@ static BOOL srv_io_sess_info1(char *desc, SESS_INFO_1 *ss1, prs_struct *ps, int
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_srv_sess_info_1(char *desc, SRV_SESS_INFO_1 *ss1, prs_struct *ps, int depth)
+static BOOL srv_io_srv_sess_info_1(const char *desc, SRV_SESS_INFO_1 *ss1, prs_struct *ps, int depth)
{
if (ss1 == NULL)
return False;
@@ -1835,7 +1835,7 @@ static BOOL srv_io_srv_sess_info_1(char *desc, SRV_SESS_INFO_1 *ss1, prs_struct
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_srv_sess_ctr(char *desc, SRV_SESS_INFO_CTR **pp_ctr, prs_struct *ps, int depth)
+static BOOL srv_io_srv_sess_ctr(const char *desc, SRV_SESS_INFO_CTR **pp_ctr, prs_struct *ps, int depth)
{
SRV_SESS_INFO_CTR *ctr = *pp_ctr;
@@ -1884,8 +1884,8 @@ static BOOL srv_io_srv_sess_ctr(char *desc, SRV_SESS_INFO_CTR **pp_ctr, prs_stru
********************************************************************/
void init_srv_q_net_sess_enum(SRV_Q_NET_SESS_ENUM *q_n,
- char *srv_name, char *qual_name,
- char *user_name, uint32 sess_level,
+ const char *srv_name, const char *qual_name,
+ const char *user_name, uint32 sess_level,
SRV_SESS_INFO_CTR *ctr, uint32 preferred_len,
ENUM_HND *hnd)
{
@@ -1907,7 +1907,7 @@ void init_srv_q_net_sess_enum(SRV_Q_NET_SESS_ENUM *q_n,
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_q_net_sess_enum(char *desc, SRV_Q_NET_SESS_ENUM *q_n, prs_struct *ps, int depth)
+BOOL srv_io_q_net_sess_enum(const char *desc, SRV_Q_NET_SESS_ENUM *q_n, prs_struct *ps, int depth)
{
if (q_n == NULL)
return False;
@@ -1962,7 +1962,7 @@ BOOL srv_io_q_net_sess_enum(char *desc, SRV_Q_NET_SESS_ENUM *q_n, prs_struct *ps
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_r_net_sess_enum(char *desc, SRV_R_NET_SESS_ENUM *r_n, prs_struct *ps, int depth)
+BOOL srv_io_r_net_sess_enum(const char *desc, SRV_R_NET_SESS_ENUM *r_n, prs_struct *ps, int depth)
{
if (r_n == NULL)
return False;
@@ -2006,7 +2006,7 @@ void init_srv_conn_info0(CONN_INFO_0 *ss0, uint32 id)
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_conn_info0(char *desc, CONN_INFO_0 *ss0, prs_struct *ps, int depth)
+static BOOL srv_io_conn_info0(const char *desc, CONN_INFO_0 *ss0, prs_struct *ps, int depth)
{
if (ss0 == NULL)
return False;
@@ -2027,7 +2027,7 @@ static BOOL srv_io_conn_info0(char *desc, CONN_INFO_0 *ss0, prs_struct *ps, int
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_srv_conn_info_0(char *desc, SRV_CONN_INFO_0 *ss0, prs_struct *ps, int depth)
+static BOOL srv_io_srv_conn_info_0(const char *desc, SRV_CONN_INFO_0 *ss0, prs_struct *ps, int depth)
{
if (ss0 == NULL)
return False;
@@ -2070,7 +2070,7 @@ static BOOL srv_io_srv_conn_info_0(char *desc, SRV_CONN_INFO_0 *ss0, prs_struct
Inits a CONN_INFO_1_STR structure
********************************************************************/
-void init_srv_conn_info1_str(CONN_INFO_1_STR *ss1, char *usr_name, char *net_name)
+void init_srv_conn_info1_str(CONN_INFO_1_STR *ss1, const char *usr_name, const char *net_name)
{
DEBUG(5,("init_srv_conn_info1_str\n"));
@@ -2082,7 +2082,7 @@ void init_srv_conn_info1_str(CONN_INFO_1_STR *ss1, char *usr_name, char *net_nam
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_conn_info1_str(char *desc, CONN_INFO_1_STR *ss1, prs_struct *ps, int depth)
+static BOOL srv_io_conn_info1_str(const char *desc, CONN_INFO_1_STR *ss1, prs_struct *ps, int depth)
{
if (ss1 == NULL)
return False;
@@ -2108,7 +2108,7 @@ static BOOL srv_io_conn_info1_str(char *desc, CONN_INFO_1_STR *ss1, prs_struct *
void init_srv_conn_info1(CONN_INFO_1 *ss1,
uint32 id, uint32 type,
uint32 num_opens, uint32 num_users, uint32 open_time,
- char *usr_name, char *net_name)
+ const char *usr_name, const char *net_name)
{
DEBUG(5,("init_srv_conn_info1: %s %s\n", usr_name, net_name));
@@ -2126,7 +2126,7 @@ void init_srv_conn_info1(CONN_INFO_1 *ss1,
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_conn_info1(char *desc, CONN_INFO_1 *ss1, prs_struct *ps, int depth)
+static BOOL srv_io_conn_info1(const char *desc, CONN_INFO_1 *ss1, prs_struct *ps, int depth)
{
if (ss1 == NULL)
return False;
@@ -2160,7 +2160,7 @@ static BOOL srv_io_conn_info1(char *desc, CONN_INFO_1 *ss1, prs_struct *ps, int
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_srv_conn_info_1(char *desc, SRV_CONN_INFO_1 *ss1, prs_struct *ps, int depth)
+static BOOL srv_io_srv_conn_info_1(const char *desc, SRV_CONN_INFO_1 *ss1, prs_struct *ps, int depth)
{
if (ss1 == NULL)
return False;
@@ -2208,7 +2208,7 @@ static BOOL srv_io_srv_conn_info_1(char *desc, SRV_CONN_INFO_1 *ss1, prs_struct
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_srv_conn_ctr(char *desc, SRV_CONN_INFO_CTR **pp_ctr, prs_struct *ps, int depth)
+static BOOL srv_io_srv_conn_ctr(const char *desc, SRV_CONN_INFO_CTR **pp_ctr, prs_struct *ps, int depth)
{
SRV_CONN_INFO_CTR *ctr = *pp_ctr;
@@ -2257,7 +2257,7 @@ static BOOL srv_io_srv_conn_ctr(char *desc, SRV_CONN_INFO_CTR **pp_ctr, prs_stru
********************************************************************/
void init_srv_q_net_conn_enum(SRV_Q_NET_CONN_ENUM *q_n,
- char *srv_name, char *qual_name,
+ const char *srv_name, const char *qual_name,
uint32 conn_level, SRV_CONN_INFO_CTR *ctr,
uint32 preferred_len,
ENUM_HND *hnd)
@@ -2279,7 +2279,7 @@ void init_srv_q_net_conn_enum(SRV_Q_NET_CONN_ENUM *q_n,
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_q_net_conn_enum(char *desc, SRV_Q_NET_CONN_ENUM *q_n, prs_struct *ps, int depth)
+BOOL srv_io_q_net_conn_enum(const char *desc, SRV_Q_NET_CONN_ENUM *q_n, prs_struct *ps, int depth)
{
if (q_n == NULL)
return False;
@@ -2327,7 +2327,7 @@ BOOL srv_io_q_net_conn_enum(char *desc, SRV_Q_NET_CONN_ENUM *q_n, prs_struct *ps
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_r_net_conn_enum(char *desc, SRV_R_NET_CONN_ENUM *r_n, prs_struct *ps, int depth)
+BOOL srv_io_r_net_conn_enum(const char *desc, SRV_R_NET_CONN_ENUM *r_n, prs_struct *ps, int depth)
{
if (r_n == NULL)
return False;
@@ -2360,7 +2360,7 @@ BOOL srv_io_r_net_conn_enum(char *desc, SRV_R_NET_CONN_ENUM *r_n, prs_struct *p
Inits a FILE_INFO_3_STR structure
********************************************************************/
-void init_srv_file_info3_str(FILE_INFO_3_STR *fi3, char *user_name, char *path_name)
+void init_srv_file_info3_str(FILE_INFO_3_STR *fi3, const char *user_name, const char *path_name)
{
DEBUG(5,("init_srv_file_info3_str\n"));
@@ -2372,7 +2372,7 @@ void init_srv_file_info3_str(FILE_INFO_3_STR *fi3, char *user_name, char *path_n
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_file_info3_str(char *desc, FILE_INFO_3_STR *sh1, prs_struct *ps, int depth)
+static BOOL srv_io_file_info3_str(const char *desc, FILE_INFO_3_STR *sh1, prs_struct *ps, int depth)
{
if (sh1 == NULL)
return False;
@@ -2397,7 +2397,7 @@ static BOOL srv_io_file_info3_str(char *desc, FILE_INFO_3_STR *sh1, prs_struct *
void init_srv_file_info3(FILE_INFO_3 *fl3,
uint32 id, uint32 perms, uint32 num_locks,
- char *path_name, char *user_name)
+ const char *path_name, const char *user_name)
{
DEBUG(5,("init_srv_file_info3: %s %s\n", path_name, user_name));
@@ -2413,7 +2413,7 @@ void init_srv_file_info3(FILE_INFO_3 *fl3,
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_file_info3(char *desc, FILE_INFO_3 *fl3, prs_struct *ps, int depth)
+static BOOL srv_io_file_info3(const char *desc, FILE_INFO_3 *fl3, prs_struct *ps, int depth)
{
if (fl3 == NULL)
return False;
@@ -2442,7 +2442,7 @@ static BOOL srv_io_file_info3(char *desc, FILE_INFO_3 *fl3, prs_struct *ps, int
Reads or writes a structure.
********************************************************************/
-static BOOL srv_io_srv_file_ctr(char *desc, SRV_FILE_INFO_CTR *ctr, prs_struct *ps, int depth)
+static BOOL srv_io_srv_file_ctr(const char *desc, SRV_FILE_INFO_CTR *ctr, prs_struct *ps, int depth)
{
if (ctr == NULL)
return False;
@@ -2536,7 +2536,7 @@ void init_srv_q_net_file_enum(SRV_Q_NET_FILE_ENUM *q_n,
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_q_net_file_enum(char *desc, SRV_Q_NET_FILE_ENUM *q_n, prs_struct *ps, int depth)
+BOOL srv_io_q_net_file_enum(const char *desc, SRV_Q_NET_FILE_ENUM *q_n, prs_struct *ps, int depth)
{
if (q_n == NULL)
return False;
@@ -2591,7 +2591,7 @@ BOOL srv_io_q_net_file_enum(char *desc, SRV_Q_NET_FILE_ENUM *q_n, prs_struct *ps
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_r_net_file_enum(char *desc, SRV_R_NET_FILE_ENUM *r_n, prs_struct *ps, int depth)
+BOOL srv_io_r_net_file_enum(const char *desc, SRV_R_NET_FILE_ENUM *r_n, prs_struct *ps, int depth)
{
if (r_n == NULL)
return False;
@@ -2623,7 +2623,7 @@ BOOL srv_io_r_net_file_enum(char *desc, SRV_R_NET_FILE_ENUM *r_n, prs_struct *ps
/*******************************************************************
Initialize a net file close request
********************************************************************/
-void init_srv_q_net_file_close(SRV_Q_NET_FILE_CLOSE *q_n, char *server,
+void init_srv_q_net_file_close(SRV_Q_NET_FILE_CLOSE *q_n, const char *server,
uint32 file_id)
{
q_n->ptr_srv_name = 1;
@@ -2634,7 +2634,7 @@ void init_srv_q_net_file_close(SRV_Q_NET_FILE_CLOSE *q_n, char *server,
/*******************************************************************
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_q_net_file_close(char *desc, SRV_Q_NET_FILE_CLOSE *q_n,
+BOOL srv_io_q_net_file_close(const char *desc, SRV_Q_NET_FILE_CLOSE *q_n,
prs_struct *ps, int depth)
{
if (q_n == NULL)
@@ -2664,7 +2664,7 @@ BOOL srv_io_q_net_file_close(char *desc, SRV_Q_NET_FILE_CLOSE *q_n,
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_r_net_file_close(char *desc, SRV_R_NET_FILE_CLOSE *q_n,
+BOOL srv_io_r_net_file_close(const char *desc, SRV_R_NET_FILE_CLOSE *q_n,
prs_struct *ps, int depth)
{
if (q_n == NULL)
@@ -2698,7 +2698,7 @@ void init_srv_info_100(SRV_INFO_100 *sv100, uint32 platform_id, const char *name
Reads or writes a SRV_INFO_101 structure.
********************************************************************/
-static BOOL srv_io_info_100(char *desc, SRV_INFO_100 *sv100, prs_struct *ps, int depth)
+static BOOL srv_io_info_100(const char *desc, SRV_INFO_100 *sv100, prs_struct *ps, int depth)
{
if (sv100 == NULL)
return False;
@@ -2743,7 +2743,7 @@ void init_srv_info_101(SRV_INFO_101 *sv101, uint32 platform_id, const char *name
Reads or writes a SRV_INFO_101 structure.
********************************************************************/
-static BOOL srv_io_info_101(char *desc, SRV_INFO_101 *sv101, prs_struct *ps, int depth)
+static BOOL srv_io_info_101(const char *desc, SRV_INFO_101 *sv101, prs_struct *ps, int depth)
{
if (sv101 == NULL)
return False;
@@ -2813,7 +2813,7 @@ void init_srv_info_102(SRV_INFO_102 *sv102, uint32 platform_id, const char *name
Reads or writes a SRV_INFO_102 structure.
********************************************************************/
-static BOOL srv_io_info_102(char *desc, SRV_INFO_102 *sv102, prs_struct *ps, int depth)
+static BOOL srv_io_info_102(const char *desc, SRV_INFO_102 *sv102, prs_struct *ps, int depth)
{
if (sv102 == NULL)
return False;
@@ -2872,7 +2872,7 @@ static BOOL srv_io_info_102(char *desc, SRV_INFO_102 *sv102, prs_struct *ps, int
Reads or writes a SRV_INFO_102 structure.
********************************************************************/
-static BOOL srv_io_info_ctr(char *desc, SRV_INFO_CTR *ctr, prs_struct *ps, int depth)
+static BOOL srv_io_info_ctr(const char *desc, SRV_INFO_CTR *ctr, prs_struct *ps, int depth)
{
if (ctr == NULL)
return False;
@@ -2919,7 +2919,7 @@ static BOOL srv_io_info_ctr(char *desc, SRV_INFO_CTR *ctr, prs_struct *ps, int d
********************************************************************/
void init_srv_q_net_srv_get_info(SRV_Q_NET_SRV_GET_INFO *srv,
- char *server_name, uint32 switch_value)
+ const char *server_name, uint32 switch_value)
{
DEBUG(5,("init_srv_q_net_srv_get_info\n"));
@@ -2932,7 +2932,7 @@ void init_srv_q_net_srv_get_info(SRV_Q_NET_SRV_GET_INFO *srv,
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_q_net_srv_get_info(char *desc, SRV_Q_NET_SRV_GET_INFO *q_n, prs_struct *ps, int depth)
+BOOL srv_io_q_net_srv_get_info(const char *desc, SRV_Q_NET_SRV_GET_INFO *q_n, prs_struct *ps, int depth)
{
if (q_n == NULL)
return False;
@@ -2996,7 +2996,7 @@ void init_srv_r_net_srv_set_info(SRV_R_NET_SRV_SET_INFO *srv,
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_q_net_srv_set_info(char *desc, SRV_Q_NET_SRV_SET_INFO *q_n,
+BOOL srv_io_q_net_srv_set_info(const char *desc, SRV_Q_NET_SRV_SET_INFO *q_n,
prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "srv_io_q_net_srv_set_info");
@@ -3034,7 +3034,7 @@ BOOL srv_io_q_net_srv_set_info(char *desc, SRV_Q_NET_SRV_SET_INFO *q_n,
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_r_net_srv_get_info(char *desc, SRV_R_NET_SRV_GET_INFO *r_n, prs_struct *ps, int depth)
+BOOL srv_io_r_net_srv_get_info(const char *desc, SRV_R_NET_SRV_GET_INFO *r_n, prs_struct *ps, int depth)
{
if (r_n == NULL)
return False;
@@ -3058,7 +3058,7 @@ BOOL srv_io_r_net_srv_get_info(char *desc, SRV_R_NET_SRV_GET_INFO *r_n, prs_stru
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_r_net_srv_set_info(char *desc, SRV_R_NET_SRV_SET_INFO *r_n,
+BOOL srv_io_r_net_srv_set_info(const char *desc, SRV_R_NET_SRV_SET_INFO *r_n,
prs_struct *ps, int depth)
{
prs_debug(ps, depth, desc, "srv_io_r_net_srv_set_info");
@@ -3080,7 +3080,7 @@ BOOL srv_io_r_net_srv_set_info(char *desc, SRV_R_NET_SRV_SET_INFO *r_n,
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_q_net_remote_tod(char *desc, SRV_Q_NET_REMOTE_TOD *q_n, prs_struct *ps, int depth)
+BOOL srv_io_q_net_remote_tod(const char *desc, SRV_Q_NET_REMOTE_TOD *q_n, prs_struct *ps, int depth)
{
if (q_n == NULL)
return False;
@@ -3103,7 +3103,7 @@ BOOL srv_io_q_net_remote_tod(char *desc, SRV_Q_NET_REMOTE_TOD *q_n, prs_struct *
Reads or writes a TIME_OF_DAY_INFO structure.
********************************************************************/
-static BOOL srv_io_time_of_day_info(char *desc, TIME_OF_DAY_INFO *tod, prs_struct *ps, int depth)
+static BOOL srv_io_time_of_day_info(const char *desc, TIME_OF_DAY_INFO *tod, prs_struct *ps, int depth)
{
if (tod == NULL)
return False;
@@ -3172,7 +3172,7 @@ void init_time_of_day_info(TIME_OF_DAY_INFO *tod, uint32 elapsedt, uint32 msecs,
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_r_net_remote_tod(char *desc, SRV_R_NET_REMOTE_TOD *r_n, prs_struct *ps, int depth)
+BOOL srv_io_r_net_remote_tod(const char *desc, SRV_R_NET_REMOTE_TOD *r_n, prs_struct *ps, int depth)
{
if (r_n == NULL)
return False;
@@ -3224,7 +3224,7 @@ BOOL init_srv_q_net_disk_enum(SRV_Q_NET_DISK_ENUM *q_n,
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_q_net_disk_enum(char *desc, SRV_Q_NET_DISK_ENUM *q_n, prs_struct *ps, int depth)
+BOOL srv_io_q_net_disk_enum(const char *desc, SRV_Q_NET_DISK_ENUM *q_n, prs_struct *ps, int depth)
{
if (q_n == NULL)
return False;
@@ -3268,7 +3268,7 @@ BOOL srv_io_q_net_disk_enum(char *desc, SRV_Q_NET_DISK_ENUM *q_n, prs_struct *ps
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_r_net_disk_enum(char *desc, SRV_R_NET_DISK_ENUM *r_n, prs_struct *ps, int depth)
+BOOL srv_io_r_net_disk_enum(const char *desc, SRV_R_NET_DISK_ENUM *r_n, prs_struct *ps, int depth)
{
int i;
@@ -3357,7 +3357,7 @@ BOOL init_srv_q_net_name_validate(SRV_Q_NET_NAME_VALIDATE *q_n, const char *srv_
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_q_net_name_validate(char *desc, SRV_Q_NET_NAME_VALIDATE *q_n, prs_struct *ps, int depth)
+BOOL srv_io_q_net_name_validate(const char *desc, SRV_Q_NET_NAME_VALIDATE *q_n, prs_struct *ps, int depth)
{
if (q_n == NULL)
return False;
@@ -3396,7 +3396,7 @@ BOOL srv_io_q_net_name_validate(char *desc, SRV_Q_NET_NAME_VALIDATE *q_n, prs_st
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_r_net_name_validate(char *desc, SRV_R_NET_NAME_VALIDATE *r_n, prs_struct *ps, int depth)
+BOOL srv_io_r_net_name_validate(const char *desc, SRV_R_NET_NAME_VALIDATE *r_n, prs_struct *ps, int depth)
{
if (r_n == NULL)
return False;
@@ -3417,7 +3417,7 @@ BOOL srv_io_r_net_name_validate(char *desc, SRV_R_NET_NAME_VALIDATE *r_n, prs_st
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_q_net_file_query_secdesc(char *desc, SRV_Q_NET_FILE_QUERY_SECDESC *q_n, prs_struct *ps, int depth)
+BOOL srv_io_q_net_file_query_secdesc(const char *desc, SRV_Q_NET_FILE_QUERY_SECDESC *q_n, prs_struct *ps, int depth)
{
if (q_n == NULL)
return False;
@@ -3465,7 +3465,7 @@ BOOL srv_io_q_net_file_query_secdesc(char *desc, SRV_Q_NET_FILE_QUERY_SECDESC *q
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_r_net_file_query_secdesc(char *desc, SRV_R_NET_FILE_QUERY_SECDESC *r_n, prs_struct *ps, int depth)
+BOOL srv_io_r_net_file_query_secdesc(const char *desc, SRV_R_NET_FILE_QUERY_SECDESC *r_n, prs_struct *ps, int depth)
{
if (r_n == NULL)
return False;
@@ -3504,7 +3504,7 @@ BOOL srv_io_r_net_file_query_secdesc(char *desc, SRV_R_NET_FILE_QUERY_SECDESC *r
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_q_net_file_set_secdesc(char *desc, SRV_Q_NET_FILE_SET_SECDESC *q_n, prs_struct *ps, int depth)
+BOOL srv_io_q_net_file_set_secdesc(const char *desc, SRV_Q_NET_FILE_SET_SECDESC *q_n, prs_struct *ps, int depth)
{
if (q_n == NULL)
return False;
@@ -3561,7 +3561,7 @@ BOOL srv_io_q_net_file_set_secdesc(char *desc, SRV_Q_NET_FILE_SET_SECDESC *q_n,
Reads or writes a structure.
********************************************************************/
-BOOL srv_io_r_net_file_set_secdesc(char *desc, SRV_R_NET_FILE_SET_SECDESC *r_n, prs_struct *ps, int depth)
+BOOL srv_io_r_net_file_set_secdesc(const char *desc, SRV_R_NET_FILE_SET_SECDESC *r_n, prs_struct *ps, int depth)
{
if (r_n == NULL)
return False;
@@ -3582,7 +3582,7 @@ BOOL srv_io_r_net_file_set_secdesc(char *desc, SRV_R_NET_FILE_SET_SECDESC *r_n,
Inits a structure
********************************************************************/
-void init_srv_q_net_remote_tod(SRV_Q_NET_REMOTE_TOD *q_u, char *server)
+void init_srv_q_net_remote_tod(SRV_Q_NET_REMOTE_TOD *q_u, const char *server)
{
q_u->ptr_srv_name = 1;
init_unistr2(&q_u->uni_srv_name, server, strlen(server) + 1);
diff --git a/source3/rpc_parse/parse_wks.c b/source3/rpc_parse/parse_wks.c
index 7b8fd76b7b9..b6de058652b 100644
--- a/source3/rpc_parse/parse_wks.c
+++ b/source3/rpc_parse/parse_wks.c
@@ -42,7 +42,7 @@ void init_wks_q_query_info(WKS_Q_QUERY_INFO *q_u,
Reads or writes a WKS_Q_QUERY_INFO structure.
********************************************************************/
-BOOL wks_io_q_query_info(char *desc, WKS_Q_QUERY_INFO *q_u, prs_struct *ps, int depth)
+BOOL wks_io_q_query_info(const char *desc, WKS_Q_QUERY_INFO *q_u, prs_struct *ps, int depth)
{
if (q_u == NULL)
return False;
@@ -90,7 +90,7 @@ void init_wks_info_100(WKS_INFO_100 *inf,
Reads or writes a WKS_INFO_100 structure.
********************************************************************/
-static BOOL wks_io_wks_info_100(char *desc, WKS_INFO_100 *inf, prs_struct *ps, int depth)
+static BOOL wks_io_wks_info_100(const char *desc, WKS_INFO_100 *inf, prs_struct *ps, int depth)
{
if (inf == NULL)
return False;
@@ -150,7 +150,7 @@ void init_wks_r_query_info(WKS_R_QUERY_INFO *r_u,
Reads or writes a structure.
********************************************************************/
-BOOL wks_io_r_query_info(char *desc, WKS_R_QUERY_INFO *r_u, prs_struct *ps, int depth)
+BOOL wks_io_r_query_info(const char *desc, WKS_R_QUERY_INFO *r_u, prs_struct *ps, int depth)
{
if (r_u == NULL)
return False;
diff --git a/source3/rpc_server/srv_lsa.c b/source3/rpc_server/srv_lsa.c
index e3495576c99..a2c2290fb7d 100644
--- a/source3/rpc_server/srv_lsa.c
+++ b/source3/rpc_server/srv_lsa.c
@@ -645,7 +645,7 @@ static BOOL api_lsa_query_info2(pipes_struct *p)
\PIPE\ntlsa commands
***************************************************************************/
-static struct api_struct api_lsa_cmds[] =
+static const struct api_struct api_lsa_cmds[] =
{
{ "LSA_OPENPOLICY2" , LSA_OPENPOLICY2 , api_lsa_open_policy2 },
{ "LSA_OPENPOLICY" , LSA_OPENPOLICY , api_lsa_open_policy },
diff --git a/source3/rpc_server/srv_netlog_nt.c b/source3/rpc_server/srv_netlog_nt.c
index 89e46402cfa..c3d48a65270 100644
--- a/source3/rpc_server/srv_netlog_nt.c
+++ b/source3/rpc_server/srv_netlog_nt.c
@@ -105,7 +105,7 @@ NTSTATUS _net_logon_ctrl2(pipes_struct *p, NET_Q_LOGON_CTRL2 *q_u, NET_R_LOGON_C
uint32 pdc_connection_status = 0x0;
uint32 logon_attempts = 0x0;
uint32 tc_status = ERROR_NO_LOGON_SERVERS;
- char *trusted_domain = "test_domain";
+ const char *trusted_domain = "test_domain";
DEBUG(0, ("*** net long ctrl2 %d, %d, %d\n",
q_u->function_code, q_u->query_level, q_u->switch_value));
@@ -132,7 +132,7 @@ NTSTATUS _net_logon_ctrl2(pipes_struct *p, NET_Q_LOGON_CTRL2 *q_u, NET_R_LOGON_C
NTSTATUS _net_trust_dom_list(pipes_struct *p, NET_Q_TRUST_DOM_LIST *q_u, NET_R_TRUST_DOM_LIST *r_u)
{
- char *trusted_domain = "test_domain";
+ const char *trusted_domain = "test_domain";
uint32 num_trust_domains = 1;
DEBUG(6,("_net_trust_dom_list: %d\n", __LINE__));
@@ -565,7 +565,7 @@ NTSTATUS _net_sam_logon(pipes_struct *p, NET_Q_SAM_LOGON *q_u, NET_R_SAM_LOGON *
DEBUG(3,("User:[%s@%s] Requested Domain:[%s]\n", nt_username,
nt_workstation, nt_domain));
- pstrcpy(current_user_info.smb_name, nt_username);
+ fstrcpy(current_user_info.smb_name, nt_username);
sub_set_smb_name(nt_username);
/*
diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c
index 5a935be279d..8aaab43461a 100644
--- a/source3/rpc_server/srv_pipe.c
+++ b/source3/rpc_server/srv_pipe.c
@@ -457,8 +457,8 @@ failed authentication on named pipe %s.\n", domain, user_name, wks, p->name ));
struct api_cmd
{
- char * pipe_clnt_name;
- char * pipe_srv_name;
+ const char * pipe_clnt_name;
+ const char * pipe_srv_name;
BOOL (*fn) (pipes_struct *);
};
@@ -1173,7 +1173,7 @@ BOOL api_pipe_request(pipes_struct *p)
Calls the underlying RPC function for a named pipe.
********************************************************************/
-BOOL api_rpcTNP(pipes_struct *p, char *rpc_name,
+BOOL api_rpcTNP(pipes_struct *p, const char *rpc_name,
const struct api_struct *api_rpc_cmds)
{
int fn_num;
diff --git a/source3/rpc_server/srv_reg_nt.c b/source3/rpc_server/srv_reg_nt.c
index 215d4684044..cbf237251ec 100644
--- a/source3/rpc_server/srv_reg_nt.c
+++ b/source3/rpc_server/srv_reg_nt.c
@@ -80,7 +80,7 @@ static REGISTRY_KEY *find_regkey_index_by_hnd(pipes_struct *p, POLICY_HND *hnd)
*******************************************************************/
static NTSTATUS open_registry_key(pipes_struct *p, POLICY_HND *hnd, REGISTRY_KEY *parent,
- char *subkeyname, uint32 access_granted )
+ const char *subkeyname, uint32 access_granted )
{
REGISTRY_KEY *regkey = NULL;
NTSTATUS result = NT_STATUS_OK;
@@ -341,7 +341,7 @@ NTSTATUS _reg_info(pipes_struct *p, REG_Q_INFO *q_u, REG_R_INFO *r_u)
{
NTSTATUS status = NT_STATUS_NO_SUCH_FILE;
fstring name;
- char *value_ascii = "";
+ const char *value_ascii = "";
fstring value;
int value_length;
REGISTRY_KEY *regkey = find_regkey_index_by_hnd( p, &q_u->pol );
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 68a2dcb83d5..291ed50ddd9 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -42,7 +42,7 @@
/* Table to map the driver version */
/* to OS */
-char * drv_ver_to_os[] = {
+static const char * drv_ver_to_os[] = {
"WIN9X", /* driver version/cversion 0 */
"", /* unused ? */
"WINNT", /* driver version/cversion 2 */
@@ -50,8 +50,8 @@ char * drv_ver_to_os[] = {
};
struct table_node {
- char *long_archi;
- char *short_archi;
+ const char *long_archi;
+ const char *short_archi;
int version;
};
@@ -712,7 +712,7 @@ static void notify_system_time(struct spoolss_notify_msg *msg,
}
struct notify2_message_table {
- char *name;
+ const char *name;
void (*fn)(struct spoolss_notify_msg *msg,
SPOOL_NOTIFY_INFO_DATA *data, TALLOC_CTX *mem_ctx);
};
@@ -1708,7 +1708,7 @@ static BOOL convert_printer_driver_info(const SPOOL_PRINTER_DRIVER_INFO_LEVEL *u
return result;
}
-BOOL convert_devicemode(char *printername, const DEVICEMODE *devmode,
+BOOL convert_devicemode(const char *printername, const DEVICEMODE *devmode,
NT_DEVICEMODE **pp_nt_devmode)
{
NT_DEVICEMODE *nt_devmode = *pp_nt_devmode;
@@ -2085,7 +2085,7 @@ done:
***************************************************************************/
static WERROR get_printer_dataex( TALLOC_CTX *ctx, NT_PRINTER_INFO_LEVEL *printer,
- char *key, char *value, uint32 *type, uint8 **data,
+ const char *key, const char *value, uint32 *type, uint8 **data,
uint32 *needed, uint32 in_size )
{
REGISTRY_VALUE *val;
@@ -2121,7 +2121,7 @@ static WERROR get_printer_dataex( TALLOC_CTX *ctx, NT_PRINTER_INFO_LEVEL *printe
Internal routine for removing printerdata
***************************************************************************/
-static WERROR delete_printer_dataex( NT_PRINTER_INFO_LEVEL *printer, char *key, char *value )
+static WERROR delete_printer_dataex( NT_PRINTER_INFO_LEVEL *printer, const char *key, const char *value )
{
delete_printer_data( printer->info_2, key, value );
@@ -2132,7 +2132,7 @@ static WERROR delete_printer_dataex( NT_PRINTER_INFO_LEVEL *printer, char *key,
Internal routine for storing printerdata
***************************************************************************/
-static WERROR set_printer_dataex( NT_PRINTER_INFO_LEVEL *printer, char *key, char *value,
+static WERROR set_printer_dataex( NT_PRINTER_INFO_LEVEL *printer, const char *key, const char *value,
uint32 type, uint8 *data, int real_len )
{
delete_printer_data( printer->info_2, key, value );
@@ -3094,7 +3094,7 @@ static void spoolss_notify_job_status_string(int snum,
* Now we're returning job status codes we just return a "" here. JRA.
*/
- char *p = "";
+ const char *p = "";
pstring temp;
uint32 len;
@@ -3247,7 +3247,7 @@ struct s_notify_info_data_table
{
uint16 type;
uint16 field;
- char *name;
+ const char *name;
uint32 size;
void (*fn) (int snum, SPOOL_NOTIFY_INFO_DATA *data,
print_queue_struct *queue,
@@ -3258,7 +3258,7 @@ struct s_notify_info_data_table
whether the notification data is a pointer to a variable sized
buffer, a one value uint32 or a two value uint32. */
-struct s_notify_info_data_table notify_info_data_table[] =
+static const struct s_notify_info_data_table notify_info_data_table[] =
{
{ PRINTER_NOTIFY_TYPE, PRINTER_NOTIFY_SERVER_NAME, "PRINTER_NOTIFY_SERVER_NAME", NOTIFY_STRING, spoolss_notify_server_name },
{ PRINTER_NOTIFY_TYPE, PRINTER_NOTIFY_PRINTER_NAME, "PRINTER_NOTIFY_PRINTER_NAME", NOTIFY_STRING, spoolss_notify_printer_name },
@@ -4897,11 +4897,11 @@ static WERROR construct_printer_driver_info_2(DRIVER_INFO_2 *info, int snum, fst
* convert an array of ascii string to a UNICODE string
********************************************************************/
-static uint32 init_unistr_array(uint16 **uni_array, fstring *char_array, char *servername)
+static uint32 init_unistr_array(uint16 **uni_array, fstring *char_array, const char *servername)
{
int i=0;
int j=0;
- char *v;
+ const char *v;
pstring line;
uint16 *tuary;
@@ -6839,7 +6839,7 @@ WERROR _spoolss_getform(pipes_struct *p, SPOOL_Q_GETFORM *q_u, SPOOL_R_GETFORM *
/****************************************************************************
****************************************************************************/
-static void fill_port_1(PORT_INFO_1 *port, char *name)
+static void fill_port_1(PORT_INFO_1 *port, const char *name)
{
init_unistr(&port->port_name, name);
}
@@ -6847,7 +6847,7 @@ static void fill_port_1(PORT_INFO_1 *port, char *name)
/****************************************************************************
****************************************************************************/
-static void fill_port_2(PORT_INFO_2 *port, char *name)
+static void fill_port_2(PORT_INFO_2 *port, const char *name)
{
init_unistr(&port->port_name, name);
init_unistr(&port->monitor_name, "Local Monitor");
diff --git a/source3/rpc_server/srv_srvsvc_nt.c b/source3/rpc_server/srv_srvsvc_nt.c
index 69f82bb96f2..e0a575f143d 100644
--- a/source3/rpc_server/srv_srvsvc_nt.c
+++ b/source3/rpc_server/srv_srvsvc_nt.c
@@ -128,7 +128,7 @@ static TDB_CONTEXT *share_tdb; /* used for share security descriptors */
BOOL share_info_db_init(void)
{
static pid_t local_pid;
- char *vstring = "INFO/version";
+ const char *vstring = "INFO/version";
int32 vers_id;
if (share_tdb && local_pid == sys_getpid())
@@ -1008,7 +1008,7 @@ static void init_srv_conn_info_0(SRV_CONN_INFO_0 *ss0, uint32 *snum, uint32 *sto
static void init_srv_conn_1_info(CONN_INFO_1 *se1, CONN_INFO_1_STR *str1,
uint32 id, uint32 type,
uint32 num_opens, uint32 num_users, uint32 open_time,
- char *usr_name, char *net_name)
+ const char *usr_name, const char *net_name)
{
init_srv_conn_info1(se1 , id, type, num_opens, num_users, open_time, usr_name, net_name);
init_srv_conn_info1_str(str1, usr_name, net_name);
diff --git a/source3/rpc_server/srv_util.c b/source3/rpc_server/srv_util.c
index 72a057b91c9..4eba9c7d1f5 100644
--- a/source3/rpc_server/srv_util.c
+++ b/source3/rpc_server/srv_util.c
@@ -485,7 +485,7 @@ NTSTATUS local_lookup_user_name(uint32 rid, char *user_name, uint32 *type)
********************************************************************/
NTSTATUS local_lookup_group_rid(char *group_name, uint32 *rid)
{
- char *grp_name;
+ const char *grp_name;
int i = -1; /* start do loop at -1 */
do /* find, if it exists, a group rid for the group name*/
@@ -502,9 +502,9 @@ NTSTATUS local_lookup_group_rid(char *group_name, uint32 *rid)
/*******************************************************************
Look up a local (BUILTIN) alias name and return a rid
********************************************************************/
-NTSTATUS local_lookup_alias_rid(char *alias_name, uint32 *rid)
+NTSTATUS local_lookup_alias_rid(const char *alias_name, uint32 *rid)
{
- char *als_name;
+ const char *als_name;
int i = -1; /* start do loop at -1 */
do /* find, if it exists, a alias rid for the alias name*/
diff --git a/source3/rpcclient/cmd_samr.c b/source3/rpcclient/cmd_samr.c
index 5c6308d07c5..fbc4d498191 100644
--- a/source3/rpcclient/cmd_samr.c
+++ b/source3/rpcclient/cmd_samr.c
@@ -94,7 +94,7 @@ static void display_sam_user_info_21(SAM_USER_INFO_21 *usr)
}
}
-static char *display_time(NTTIME nttime)
+static const char *display_time(NTTIME nttime)
{
static fstring string;
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c
index c76e84580d6..06da00748b4 100644
--- a/source3/rpcclient/cmd_spoolss.c
+++ b/source3/rpcclient/cmd_spoolss.c
@@ -26,12 +26,12 @@
#include "rpcclient.h"
struct table_node {
- char *long_archi;
- char *short_archi;
+ const char *long_archi;
+ const char *short_archi;
int version;
};
-struct table_node archi_table[]= {
+static const struct table_node archi_table[]= {
{"Windows 4.0", "WIN40", 0 },
{"Windows NT x86", "W32X86", 2 },
@@ -45,7 +45,7 @@ struct table_node archi_table[]= {
function to do the mapping between the long architecture name and
the short one.
****************************************************************************/
-BOOL get_short_archi(char *short_archi, char *long_archi)
+BOOL get_short_archi(char *short_archi, const char *long_archi)
{
int i=-1;
@@ -1153,7 +1153,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, char* delim, UNISTR* dest)
+static char* get_driver_3_param (char* str, const char* delim, UNISTR* dest)
{
char *ptr;
@@ -2135,7 +2135,7 @@ static NTSTATUS cmd_spoolss_enum_printerkey( struct cli_state *cli,
BOOL got_hnd = False;
pstring printername;
fstring servername, user;
- char *keyname = NULL;
+ const char *keyname = NULL;
POLICY_HND hnd;
uint16 *keylist = NULL, *curkey;
diff --git a/source3/rpcclient/rpcclient.h b/source3/rpcclient/rpcclient.h
index ae5b5f3c4fb..3276a62437a 100644
--- a/source3/rpcclient/rpcclient.h
+++ b/source3/rpcclient/rpcclient.h
@@ -23,12 +23,12 @@
#define RPCCLIENT_H
struct cmd_set {
- char *name;
+ const char *name;
NTSTATUS (*fn)(struct cli_state*, TALLOC_CTX *mem_ctx, int argc,
char **argv);
int pipe_idx;
- char *description;
- char *usage;
+ const char *description;
+ const char *usage;
};
#endif /* RPCCLIENT_H */
diff --git a/source3/smbd/build_options.c b/source3/smbd/build_options.c
index 085f2874466..da5accebab6 100644
--- a/source3/smbd/build_options.c
+++ b/source3/smbd/build_options.c
@@ -23,7 +23,7 @@
#include "build_env.h"
#include "dynconfig.h"
-static void output(BOOL screen, char *format, ...) PRINTF_ATTRIBUTE(2,3);
+static void output(BOOL screen, const char *format, ...) PRINTF_ATTRIBUTE(2,3);
/*
#define OUTPUT(x) snprintf(outstring,sizeof(outstring),x); output(screen,outstring);
@@ -31,7 +31,7 @@ static void output(BOOL screen, char *format, ...) PRINTF_ATTRIBUTE(2,3);
/****************************************************************************
helper function for build_options
****************************************************************************/
-static void output(BOOL screen, char *format, ...)
+static void output(BOOL screen, const char *format, ...)
{
char *ptr;
va_list ap;
diff --git a/source3/smbd/connection.c b/source3/smbd/connection.c
index ad394a01ca0..a7636e889e3 100644
--- a/source3/smbd/connection.c
+++ b/source3/smbd/connection.c
@@ -35,7 +35,7 @@ TDB_CONTEXT *conn_tdb_ctx(void)
return tdb;
}
-static void make_conn_key(connection_struct *conn,char *name, TDB_DATA *pkbuf, struct connections_key *pkey)
+static void make_conn_key(connection_struct *conn, const char *name, TDB_DATA *pkbuf, struct connections_key *pkey)
{
ZERO_STRUCTP(pkey);
pkey->pid = sys_getpid();
@@ -50,7 +50,7 @@ static void make_conn_key(connection_struct *conn,char *name, TDB_DATA *pkbuf, s
Delete a connection record.
****************************************************************************/
-BOOL yield_connection(connection_struct *conn,char *name)
+BOOL yield_connection(connection_struct *conn, const char *name)
{
struct connections_key key;
TDB_DATA kbuf;
@@ -116,7 +116,7 @@ static int count_fn( TDB_CONTEXT *the_tdb, TDB_DATA kbuf, TDB_DATA dbuf, void *u
Claim an entry in the connections database.
****************************************************************************/
-BOOL claim_connection(connection_struct *conn,char *name,int max_connections,BOOL Clear, uint32 msg_flags)
+BOOL claim_connection(connection_struct *conn, const char *name,int max_connections,BOOL Clear, uint32 msg_flags)
{
struct connections_key key;
struct connections_data crec;
diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c
index 396ecd98c49..d3c71ad24e4 100644
--- a/source3/smbd/dir.c
+++ b/source3/smbd/dir.c
@@ -327,15 +327,20 @@ void dptr_closepath(char *path,uint16 spid)
Start a directory listing.
****************************************************************************/
-static BOOL start_dir(connection_struct *conn,char *directory)
+static BOOL start_dir(connection_struct *conn, pstring directory)
{
+ const char *dir2;
+
DEBUG(5,("start_dir dir=%s\n",directory));
if (!check_name(directory,conn))
return(False);
+
+ /* use a const pointer from here on */
+ dir2 = directory;
- if (! *directory)
- directory = ".";
+ if (! *dir2)
+ dir2 = ".";
conn->dirptr = OpenDir(conn, directory, True);
if (conn->dirptr) {
@@ -392,7 +397,7 @@ static void dptr_close_oldest(BOOL old)
me at Andrew's knee.... :-) :-). JRA.
****************************************************************************/
-int dptr_create(connection_struct *conn,char *path, BOOL old_handle, BOOL expect_close,uint16 spid)
+int dptr_create(connection_struct *conn, pstring path, BOOL old_handle, BOOL expect_close,uint16 spid)
{
dptr_struct *dptr;
@@ -812,10 +817,10 @@ static BOOL file_is_special(connection_struct *conn, char *name, SMB_STRUCT_STAT
Open a directory.
********************************************************************/
-void *OpenDir(connection_struct *conn, char *name, BOOL use_veto)
+void *OpenDir(connection_struct *conn, const char *name, BOOL use_veto)
{
Dir *dirp;
- char *n;
+ const char *n;
DIR *p = conn->vfs_ops.opendir(conn,name);
int used=0;
@@ -1009,7 +1014,7 @@ static ubi_dlNewList( dir_cache );
Output: None.
*****************************************************************************/
-void DirCacheAdd( char *path, char *name, char *dname, int snum )
+void DirCacheAdd( const char *path, char *name, char *dname, int snum )
{
int pathlen;
int namelen;
@@ -1056,7 +1061,7 @@ void DirCacheAdd( char *path, char *name, char *dname, int snum )
for large caches.
*****************************************************************************/
-char *DirCacheCheck( char *path, char *name, int snum )
+char *DirCacheCheck( const char *path, const char *name, int snum )
{
dir_cache_entry *entry;
diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c
index 202bd75d4c8..bcfd366741a 100644
--- a/source3/smbd/filename.c
+++ b/source3/smbd/filename.c
@@ -31,7 +31,7 @@ extern BOOL case_preserve;
extern BOOL short_case_preserve;
extern BOOL use_mangled_map;
-static BOOL scan_directory(char *path, char *name,connection_struct *conn,BOOL docache);
+static BOOL scan_directory(const char *path, pstring name,connection_struct *conn,BOOL docache);
/****************************************************************************
Check if two filenames are equal.
@@ -387,7 +387,7 @@ BOOL unix_convert(pstring name,connection_struct *conn,char *saved_last_componen
a valid one for the user to access.
****************************************************************************/
-BOOL check_name(char *name,connection_struct *conn)
+BOOL check_name(pstring name,connection_struct *conn)
{
BOOL ret;
@@ -428,7 +428,7 @@ BOOL check_name(char *name,connection_struct *conn)
If the name looks like a mangled name then try via the mangling functions
****************************************************************************/
-static BOOL scan_directory(char *path, char *name,connection_struct *conn,BOOL docache)
+static BOOL scan_directory(const char *path, pstring name,connection_struct *conn,BOOL docache)
{
void *cur_dir;
char *dname;
diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c
index f174db5aa65..61288e01671 100644
--- a/source3/smbd/lanman.c
+++ b/source3/smbd/lanman.c
@@ -109,14 +109,14 @@ static char* Expand(connection_struct *conn, int snum, char* s)
/*******************************************************************
check a API string for validity when we only need to check the prefix
******************************************************************/
-static BOOL prefix_ok(char *str,char *prefix)
+static BOOL prefix_ok(const char *str, const char *prefix)
{
return(strncmp(str,prefix,strlen(prefix)) == 0);
}
struct pack_desc {
- char* format; /* formatstring for structure */
- char* subformat; /* subformat for structure */
+ const char* format; /* formatstring for structure */
+ const char* subformat; /* subformat for structure */
char* base; /* baseaddress of buffer */
int buflen; /* remaining size for fixed part; on init: length of base */
int subcount; /* count of substructures */
@@ -125,11 +125,11 @@ struct pack_desc {
char* stringbuf; /* pointer into buffer for remaining variable part */
int neededlen; /* total needed size */
int usedlen; /* total used size (usedlen <= neededlen and usedlen <= buflen) */
- char* curpos; /* current position; pointer into format or subformat */
+ const char* curpos; /* current position; pointer into format or subformat */
int errcode;
};
-static int get_counter(char** p)
+static int get_counter(const char** p)
{
int i, n;
if (!p || !(*p)) return(1);
@@ -144,7 +144,7 @@ static int get_counter(char** p)
}
}
-static int getlen(char* p)
+static int getlen(const char* p)
{
int n = 0;
if (!p) return(0);
@@ -329,7 +329,7 @@ static int package(struct pack_desc* p, ...)
#define PACKl(desc,t,v,l) package(desc,v,l)
#endif
-static void PACKI(struct pack_desc* desc,char *t,int v)
+static void PACKI(struct pack_desc* desc, const char *t,int v)
{
PACK(desc,t,v);
}
@@ -1704,7 +1704,7 @@ static BOOL api_NetUserGetGroups(connection_struct *conn,uint16 vuid, char *para
char *UserName = skip_string(str2,1);
char *p = skip_string(UserName,1);
int uLevel = SVAL(p,0);
- char *p2;
+ const char *level_string;
int count=0;
*rparam_len = 8;
@@ -1715,13 +1715,13 @@ static BOOL api_NetUserGetGroups(connection_struct *conn,uint16 vuid, char *para
return False;
switch( uLevel ) {
case 0:
- p2 = "B21";
+ level_string = "B21";
break;
default:
return False;
}
- if (strcmp(p2,str2) != 0)
+ if (strcmp(level_string,str2) != 0)
return False;
*rdata_len = mdrcnt + 1024;
@@ -2584,6 +2584,7 @@ static BOOL api_RNetUserGetInfo(connection_struct *conn,uint16 vuid, char *param
char *p = skip_string(UserName,1);
int uLevel = SVAL(p,0);
char *p2;
+ const char *level_string;
/* get NIS home of a previously validated user - simeon */
/* With share level security vuid will always be zero.
@@ -2602,15 +2603,15 @@ static BOOL api_RNetUserGetInfo(connection_struct *conn,uint16 vuid, char *param
if (strcmp(str1,"zWrLh") != 0) return False;
switch( uLevel )
{
- case 0: p2 = "B21"; break;
- case 1: p2 = "B21BB16DWzzWz"; break;
- case 2: p2 = "B21BB16DWzzWzDzzzzDDDDWb21WWzWW"; break;
- case 10: p2 = "B21Bzzz"; break;
- case 11: p2 = "B21BzzzWDDzzDDWWzWzDWb21W"; break;
+ case 0: level_string = "B21"; break;
+ case 1: level_string = "B21BB16DWzzWz"; break;
+ case 2: level_string = "B21BB16DWzzWzDzzzzDDDDWb21WWzWW"; break;
+ case 10: level_string = "B21Bzzz"; break;
+ case 11: level_string = "B21BzzzWDDzzDDWWzWzDWb21W"; break;
default: return False;
}
- if (strcmp(p2,str2) != 0) return False;
+ if (strcmp(level_string,str2) != 0) return False;
*rdata_len = mdrcnt + 1024;
*rdata = REALLOC(*rdata,*rdata_len);
@@ -3407,9 +3408,9 @@ static BOOL api_Unsupported(connection_struct *conn,uint16 vuid, char *param,cha
-const static struct
+static const struct
{
- char *name;
+ const char *name;
int id;
BOOL (*fn)(connection_struct *,uint16,char *,char *,
int,int,char **,char **,int *,int *);
diff --git a/source3/smbd/mangle.c b/source3/smbd/mangle.c
index 392e48afc19..f5c703a5bff 100644
--- a/source3/smbd/mangle.c
+++ b/source3/smbd/mangle.c
@@ -23,8 +23,8 @@
static struct mangle_fns *mangle_fns;
/* this allows us to add more mangling backends */
-static struct {
- char *name;
+static const struct {
+ const char *name;
struct mangle_fns *(*init_fn)(void);
} mangle_backends[] = {
{ "hash", mangle_hash_init },
diff --git a/source3/smbd/mangle_hash.c b/source3/smbd/mangle_hash.c
index 0446a953ff5..929cb0e07fa 100644
--- a/source3/smbd/mangle_hash.c
+++ b/source3/smbd/mangle_hash.c
@@ -361,15 +361,15 @@ done:
*/
static void init_chartest( void )
{
- char *illegalchars = "*\\/?<>|\":";
- unsigned char *s;
+ const char *illegalchars = "*\\/?<>|\":";
+ const unsigned char *s;
memset( (char *)chartest, '\0', 256 );
- for( s = (unsigned char *)illegalchars; *s; s++ )
+ for( s = (const unsigned char *)illegalchars; *s; s++ )
chartest[*s] = ILLEGAL_MASK;
- for( s = (unsigned char *)basechars; *s; s++ )
+ for( s = (const unsigned char *)basechars; *s; s++ )
chartest[*s] |= BASECHAR_MASK;
ct_initialized = True;
diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c
index b91c0c0866b..c8f023514e6 100644
--- a/source3/smbd/negprot.c
+++ b/source3/smbd/negprot.c
@@ -377,9 +377,9 @@ protocol [LANMAN2.1]
#define ARCH_ALL 0x3F
/* List of supported protocols, most desired first */
-static struct {
- char *proto_name;
- char *short_name;
+static const struct {
+ const char *proto_name;
+ const char *short_name;
int (*proto_reply_fn)(char *, char *);
int protocol_level;
} supported_protocols[] = {
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index 740f450db6f..29ebdce5a8e 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -27,7 +27,7 @@ extern BOOL case_sensitive;
extern BOOL case_preserve;
extern BOOL short_case_preserve;
-static char *known_nt_pipes[] = {
+static const char *known_nt_pipes[] = {
"\\LANMAN",
"\\srvsvc",
"\\samr",
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 923b20ad66b..7421c16b40d 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -339,7 +339,7 @@ force write permissions on print services.
functions. Any message that has a NULL function is unimplemented -
please feel free to contribute implementations!
*/
-const static struct smb_message_struct
+static const struct smb_message_struct
{
const char *name;
int (*fn)(connection_struct *conn, char *, char *, int, int);
@@ -890,7 +890,7 @@ return a string containing the function name of a SMB command
****************************************************************************/
const char *smb_fn_name(int type)
{
- static char *unknown_name = "SMBunknown";
+ const char *unknown_name = "SMBunknown";
if (smb_messages[type].name == NULL)
return(unknown_name);
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 4335728afc8..beccc1bba6e 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -271,7 +271,7 @@ int reply_tcon_and_X(connection_struct *conn, char *inbuf,char *outbuf,int lengt
set_message_end(outbuf,p);
} else {
/* NT sets the fstype of IPC$ to the null string */
- char *fsname = IS_IPC(conn) ? "" : lp_fstype(SNUM(conn));
+ const char *fsname = IS_IPC(conn) ? "" : lp_fstype(SNUM(conn));
set_message(outbuf,3,0,True);
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 9bc02c3e175..0a119195771 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -179,11 +179,12 @@ static BOOL open_sockets_smbd(BOOL is_daemon,const char *smb_ports)
if (!smb_ports) {
ports = lp_smb_ports();
if (!ports || !*ports) {
- ports = SMB_PORTS;
+ ports = smb_xstrdup(SMB_PORTS);
+ } else {
+ ports = smb_xstrdup(ports);
}
- ports = strdup(ports);
} else {
- ports = strdup(smb_ports);
+ ports = smb_xstrdup(smb_ports);
}
if (lp_interfaces() && lp_bind_interfaces_only()) {
@@ -543,7 +544,7 @@ static void decrement_smbd_process_count(void)
Exit the server.
****************************************************************************/
-void exit_server(char *reason)
+void exit_server(const char *reason)
{
static int firsttime=1;
extern char *last_inbuf;
diff --git a/source3/smbd/utmp.c b/source3/smbd/utmp.c
index 6b7b0f3ad1e..6c12cfac626 100644
--- a/source3/smbd/utmp.c
+++ b/source3/smbd/utmp.c
@@ -457,7 +457,7 @@ static void sys_utmp_update(struct utmp *u, const char *hostname, BOOL claim)
static int ut_id_encode(int i, char *fourbyte)
{
int nbase;
- char *ut_id_encstr = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
+ const char *ut_id_encstr = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
fourbyte[0] = 'S';
fourbyte[1] = 'M';
diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c
index 7e60d3dacbd..7b8d9d7e9e0 100644
--- a/source3/smbd/vfs.c
+++ b/source3/smbd/vfs.c
@@ -781,7 +781,7 @@ char *vfs_GetWd(connection_struct *conn, char *path)
Widelinks are allowed if widelinks is true.
********************************************************************/
-BOOL reduce_name(connection_struct *conn, char *s,char *dir,BOOL widelinks)
+BOOL reduce_name(connection_struct *conn, pstring s, const char *dir,BOOL widelinks)
{
#ifndef REDUCE_PATHS
return True;
diff --git a/source3/tdb/tdbutil.c b/source3/tdb/tdbutil.c
index 12db8b337f7..d7e4350ada9 100644
--- a/source3/tdb/tdbutil.c
+++ b/source3/tdb/tdbutil.c
@@ -73,7 +73,7 @@ static int tdb_chainlock_with_timeout( TDB_CONTEXT *tdb, TDB_DATA key, unsigned
Lock a chain by string. Return -1 if timeout or lock failed.
****************************************************************************/
-int tdb_lock_bystring(TDB_CONTEXT *tdb, char *keyval, unsigned int timeout)
+int tdb_lock_bystring(TDB_CONTEXT *tdb, const char *keyval, unsigned int timeout)
{
TDB_DATA key;
@@ -87,7 +87,7 @@ int tdb_lock_bystring(TDB_CONTEXT *tdb, char *keyval, unsigned int timeout)
Unlock a chain by string.
****************************************************************************/
-void tdb_unlock_bystring(TDB_CONTEXT *tdb, char *keyval)
+void tdb_unlock_bystring(TDB_CONTEXT *tdb, const char *keyval)
{
TDB_DATA key;
@@ -101,7 +101,7 @@ void tdb_unlock_bystring(TDB_CONTEXT *tdb, char *keyval)
Read lock a chain by string. Return -1 if timeout or lock failed.
****************************************************************************/
-int tdb_read_lock_bystring(TDB_CONTEXT *tdb, char *keyval, unsigned int timeout)
+int tdb_read_lock_bystring(TDB_CONTEXT *tdb, const char *keyval, unsigned int timeout)
{
TDB_DATA key;
@@ -115,7 +115,7 @@ int tdb_read_lock_bystring(TDB_CONTEXT *tdb, char *keyval, unsigned int timeout)
Read unlock a chain by string.
****************************************************************************/
-void tdb_read_unlock_bystring(TDB_CONTEXT *tdb, char *keyval)
+void tdb_read_unlock_bystring(TDB_CONTEXT *tdb, const char *keyval)
{
TDB_DATA key;
@@ -131,7 +131,7 @@ void tdb_read_unlock_bystring(TDB_CONTEXT *tdb, char *keyval)
Output is int32 in native byte order.
****************************************************************************/
-int32 tdb_fetch_int32_byblob(TDB_CONTEXT *tdb, char *keyval, size_t len)
+int32 tdb_fetch_int32_byblob(TDB_CONTEXT *tdb, const char *keyval, size_t len)
{
TDB_DATA key, data;
int32 ret;
@@ -154,7 +154,7 @@ int32 tdb_fetch_int32_byblob(TDB_CONTEXT *tdb, char *keyval, size_t len)
Output is int32 in native byte order.
****************************************************************************/
-int32 tdb_fetch_int32(TDB_CONTEXT *tdb, char *keystr)
+int32 tdb_fetch_int32(TDB_CONTEXT *tdb, const char *keystr)
{
return tdb_fetch_int32_byblob(tdb, keystr, strlen(keystr) + 1);
}
@@ -164,7 +164,7 @@ int32 tdb_fetch_int32(TDB_CONTEXT *tdb, char *keystr)
Input is int32 in native byte order. Output in tdb is in little-endian.
****************************************************************************/
-int tdb_store_int32_byblob(TDB_CONTEXT *tdb, char *keystr, size_t len, int32 v)
+int tdb_store_int32_byblob(TDB_CONTEXT *tdb, const char *keystr, size_t len, int32 v)
{
TDB_DATA key, data;
int32 v_store;
@@ -183,7 +183,7 @@ int tdb_store_int32_byblob(TDB_CONTEXT *tdb, char *keystr, size_t len, int32 v)
Input is int32 in native byte order. Output in tdb is in little-endian.
****************************************************************************/
-int tdb_store_int32(TDB_CONTEXT *tdb, char *keystr, int32 v)
+int tdb_store_int32(TDB_CONTEXT *tdb, const char *keystr, int32 v)
{
return tdb_store_int32_byblob(tdb, keystr, strlen(keystr) + 1, v);
}
@@ -193,7 +193,7 @@ int tdb_store_int32(TDB_CONTEXT *tdb, char *keystr, int32 v)
Output is uint32 in native byte order.
****************************************************************************/
-BOOL tdb_fetch_uint32_byblob(TDB_CONTEXT *tdb, char *keyval, size_t len, uint32 *value)
+BOOL tdb_fetch_uint32_byblob(TDB_CONTEXT *tdb, const char *keyval, size_t len, uint32 *value)
{
TDB_DATA key, data;
@@ -215,7 +215,7 @@ BOOL tdb_fetch_uint32_byblob(TDB_CONTEXT *tdb, char *keyval, size_t len, uint32
Output is uint32 in native byte order.
****************************************************************************/
-BOOL tdb_fetch_uint32(TDB_CONTEXT *tdb, char *keystr, uint32 *value)
+BOOL tdb_fetch_uint32(TDB_CONTEXT *tdb, const char *keystr, uint32 *value)
{
return tdb_fetch_uint32_byblob(tdb, keystr, strlen(keystr) + 1, value);
}
@@ -225,7 +225,7 @@ BOOL tdb_fetch_uint32(TDB_CONTEXT *tdb, char *keystr, uint32 *value)
Input is uint32 in native byte order. Output in tdb is in little-endian.
****************************************************************************/
-BOOL tdb_store_uint32_byblob(TDB_CONTEXT *tdb, char *keystr, size_t len, uint32 value)
+BOOL tdb_store_uint32_byblob(TDB_CONTEXT *tdb, const char *keystr, size_t len, uint32 value)
{
TDB_DATA key, data;
uint32 v_store;
@@ -248,7 +248,7 @@ BOOL tdb_store_uint32_byblob(TDB_CONTEXT *tdb, char *keystr, size_t len, uint32
Input is uint32 in native byte order. Output in tdb is in little-endian.
****************************************************************************/
-BOOL tdb_store_uint32(TDB_CONTEXT *tdb, char *keystr, uint32 value)
+BOOL tdb_store_uint32(TDB_CONTEXT *tdb, const char *keystr, uint32 value)
{
return tdb_store_uint32_byblob(tdb, keystr, strlen(keystr) + 1, value);
}
@@ -257,7 +257,7 @@ BOOL tdb_store_uint32(TDB_CONTEXT *tdb, char *keystr, uint32 value)
on failure.
****************************************************************************/
-int tdb_store_by_string(TDB_CONTEXT *tdb, char *keystr, TDB_DATA data, int flags)
+int tdb_store_by_string(TDB_CONTEXT *tdb, const char *keystr, TDB_DATA data, int flags)
{
TDB_DATA key;
@@ -272,7 +272,7 @@ int tdb_store_by_string(TDB_CONTEXT *tdb, char *keystr, TDB_DATA data, int flags
free() on the result dptr.
****************************************************************************/
-TDB_DATA tdb_fetch_by_string(TDB_CONTEXT *tdb, char *keystr)
+TDB_DATA tdb_fetch_by_string(TDB_CONTEXT *tdb, const char *keystr)
{
TDB_DATA key;
@@ -286,7 +286,7 @@ TDB_DATA tdb_fetch_by_string(TDB_CONTEXT *tdb, char *keystr)
Delete an entry using a null terminated string key.
****************************************************************************/
-int tdb_delete_by_string(TDB_CONTEXT *tdb, char *keystr)
+int tdb_delete_by_string(TDB_CONTEXT *tdb, const char *keystr)
{
TDB_DATA key;
@@ -300,7 +300,7 @@ int tdb_delete_by_string(TDB_CONTEXT *tdb, char *keystr)
Atomic integer change. Returns old value. To create, set initial value in *oldval.
****************************************************************************/
-int32 tdb_change_int32_atomic(TDB_CONTEXT *tdb, char *keystr, int32 *oldval, int32 change_val)
+int32 tdb_change_int32_atomic(TDB_CONTEXT *tdb, const char *keystr, int32 *oldval, int32 change_val)
{
int32 val;
int32 ret = -1;
@@ -341,7 +341,7 @@ int32 tdb_change_int32_atomic(TDB_CONTEXT *tdb, char *keystr, int32 *oldval, int
Atomic unsigned integer change. Returns old value. To create, set initial value in *oldval.
****************************************************************************/
-BOOL tdb_change_uint32_atomic(TDB_CONTEXT *tdb, char *keystr, uint32 *oldval, uint32 change_val)
+BOOL tdb_change_uint32_atomic(TDB_CONTEXT *tdb, const char *keystr, uint32 *oldval, uint32 change_val)
{
uint32 val;
BOOL ret = False;
@@ -384,7 +384,7 @@ BOOL tdb_change_uint32_atomic(TDB_CONTEXT *tdb, char *keystr, uint32 *oldval, ui
integers and strings.
****************************************************************************/
-size_t tdb_pack(char *buf, int bufsize, char *fmt, ...)
+size_t tdb_pack(char *buf, int bufsize, const char *fmt, ...)
{
va_list ap;
uint16 w;
@@ -395,7 +395,7 @@ size_t tdb_pack(char *buf, int bufsize, char *fmt, ...)
char *s;
char c;
char *buf0 = buf;
- char *fmt0 = fmt;
+ const char *fmt0 = fmt;
int bufsize0 = bufsize;
va_start(ap, fmt);
@@ -468,7 +468,7 @@ size_t tdb_pack(char *buf, int bufsize, char *fmt, ...)
integers and strings.
****************************************************************************/
-int tdb_unpack(char *buf, int bufsize, char *fmt, ...)
+int tdb_unpack(char *buf, int bufsize, const char *fmt, ...)
{
va_list ap;
uint16 *w;
@@ -479,7 +479,7 @@ int tdb_unpack(char *buf, int bufsize, char *fmt, ...)
char *s, **b;
char c;
char *buf0 = buf;
- char *fmt0 = fmt;
+ const char *fmt0 = fmt;
int bufsize0 = bufsize;
va_start(ap, fmt);
diff --git a/source3/torture/denytest.c b/source3/torture/denytest.c
index 045246f1269..017bb1c06d6 100644
--- a/source3/torture/denytest.c
+++ b/source3/torture/denytest.c
@@ -27,11 +27,11 @@ extern BOOL torture_showall;
enum deny_result {A_0=0, A_X=1, A_R=2, A_W=3, A_RW=5};
-static char *denystr(int denymode)
+static const char *denystr(int denymode)
{
struct {
int v;
- char *name;
+ const char *name;
} deny_modes[] = {
{DENY_DOS, "DENY_DOS"},
{DENY_ALL, "DENY_ALL"},
@@ -47,11 +47,11 @@ static char *denystr(int denymode)
return "DENY_XXX";
}
-static char *openstr(int mode)
+static const char *openstr(int mode)
{
struct {
int v;
- char *name;
+ const char *name;
} open_modes[] = {
{O_RDWR, "O_RDWR"},
{O_RDONLY, "O_RDONLY"},
@@ -64,11 +64,11 @@ static char *openstr(int mode)
return "O_XXX";
}
-static char *resultstr(enum deny_result res)
+static const char *resultstr(enum deny_result res)
{
struct {
enum deny_result res;
- char *name;
+ const char *name;
} results[] = {
{A_X, "X"},
{A_0, "-"},
@@ -1412,7 +1412,7 @@ BOOL torture_denytest1(int dummy)
int fnum1, fnum2;
int i;
BOOL correct = True;
- char *fnames[2] = {"\\denytest1.dat", "\\denytest1.exe"};
+ const char *fnames[2] = {"\\denytest1.dat", "\\denytest1.exe"};
if (!torture_open_connection(&cli1)) {
return False;
@@ -1431,7 +1431,7 @@ BOOL torture_denytest1(int dummy)
for (i=0; i<ARRAY_SIZE(denytable1); i++) {
enum deny_result res;
- char *fname = fnames[denytable1[i].isexe];
+ const char *fname = fnames[denytable1[i].isexe];
progress_bar(i, ARRAY_SIZE(denytable1));
@@ -1498,7 +1498,7 @@ BOOL torture_denytest2(int dummy)
int fnum1, fnum2;
int i;
BOOL correct = True;
- char *fnames[2] = {"\\denytest2.dat", "\\denytest2.exe"};
+ const char *fnames[2] = {"\\denytest2.dat", "\\denytest2.exe"};
if (!torture_open_connection(&cli1) || !torture_open_connection(&cli2)) {
return False;
@@ -1515,7 +1515,7 @@ BOOL torture_denytest2(int dummy)
for (i=0; i<ARRAY_SIZE(denytable2); i++) {
enum deny_result res;
- char *fname = fnames[denytable2[i].isexe];
+ const char *fname = fnames[denytable2[i].isexe];
progress_bar(i, ARRAY_SIZE(denytable1));
diff --git a/source3/torture/locktest2.c b/source3/torture/locktest2.c
index c4323ac3771..3166d6e3264 100644
--- a/source3/torture/locktest2.c
+++ b/source3/torture/locktest2.c
@@ -62,7 +62,7 @@ struct record {
static struct record *recorded;
-static int try_open(struct cli_state *c, char *nfs, int fstype, char *fname, int flags)
+static int try_open(struct cli_state *c, char *nfs, int fstype, const char *fname, int flags)
{
pstring path;
diff --git a/source3/torture/masktest.c b/source3/torture/masktest.c
index 637e9ef63a0..9b83619e858 100644
--- a/source3/torture/masktest.c
+++ b/source3/torture/masktest.c
@@ -28,16 +28,16 @@ static int got_pass;
static int max_protocol = PROTOCOL_NT1;
static BOOL showall = False;
static BOOL old_list = False;
-static char *maskchars = "<>\"?*abc.";
-static char *filechars = "abcdefghijklm.";
+static const char *maskchars = "<>\"?*abc.";
+static const char *filechars = "abcdefghijklm.";
static int verbose;
static int die_on_error;
static int NumLoops = 0;
/* a test fn for LANMAN mask support */
-int ms_fnmatch_lanman_core(char *pattern, char *string)
+int ms_fnmatch_lanman_core(const char *pattern, const char *string)
{
- char *p = pattern, *n = string;
+ const char *p = pattern, *n = string;
char c;
if (strcmp(p,"?")==0 && strcmp(n,".")==0) goto match;
@@ -109,10 +109,12 @@ next:
return 0;
}
-int ms_fnmatch_lanman(char *pattern, char *string)
+int ms_fnmatch_lanman(const char *pattern, const char *string)
{
if (!strpbrk(pattern, "?*<>\"")) {
- if (strcmp(string,"..") == 0) string = ".";
+ if (strcmp(string,"..") == 0)
+ string = ".";
+
return strcmp(pattern, string);
}
@@ -124,7 +126,7 @@ int ms_fnmatch_lanman(char *pattern, char *string)
return ms_fnmatch_lanman_core(pattern, string);
}
-static BOOL reg_match_one(struct cli_state *cli, char *pattern, char *file)
+static BOOL reg_match_one(struct cli_state *cli, const char *pattern, const char *file)
{
/* oh what a weird world this is */
if (old_list && strcmp(pattern, "*.*") == 0) return True;
diff --git a/source3/torture/nsstest.c b/source3/torture/nsstest.c
index c9b068aa046..a82fa05203e 100644
--- a/source3/torture/nsstest.c
+++ b/source3/torture/nsstest.c
@@ -20,8 +20,8 @@
#include "includes.h"
-static char *so_path = "/lib/libnss_winbind.so";
-static char *nss_name = "winbind";
+static const char *so_path = "/lib/libnss_winbind.so";
+static const char *nss_name = "winbind";
static int nss_errno;
static NSS_STATUS last_error;
static int total_errors;
diff --git a/source3/torture/scanner.c b/source3/torture/scanner.c
index 4f4164ea331..7db3dde9c09 100644
--- a/source3/torture/scanner.c
+++ b/source3/torture/scanner.c
@@ -29,7 +29,7 @@
/****************************************************************************
look for a partial hit
****************************************************************************/
-static void trans2_check_hit(char *format, int op, int level, NTSTATUS status)
+static void trans2_check_hit(const char *format, int op, int level, NTSTATUS status)
{
if (NT_STATUS_V(status) == NT_STATUS_V(NT_STATUS_INVALID_LEVEL) ||
NT_STATUS_V(status) == NT_STATUS_V(NT_STATUS_NOT_IMPLEMENTED) ||
@@ -78,7 +78,7 @@ static NTSTATUS try_trans2(struct cli_state *cli,
static NTSTATUS try_trans2_len(struct cli_state *cli,
- char *format,
+ const char *format,
int op, int level,
char *param, char *data,
int param_len, int *data_len,
@@ -113,7 +113,7 @@ static NTSTATUS try_trans2_len(struct cli_state *cli,
check for existance of a trans2 call
****************************************************************************/
static BOOL scan_trans2(struct cli_state *cli, int op, int level,
- int fnum, int dnum, char *fname)
+ int fnum, int dnum, const char *fname)
{
int data_len = 0;
int param_len = 0;
@@ -193,7 +193,7 @@ BOOL torture_trans2_scan(int dummy)
{
static struct cli_state cli;
int op, level;
- char *fname = "\\scanner.dat";
+ const char *fname = "\\scanner.dat";
int fnum, dnum;
printf("starting trans2 scan test\n");
@@ -233,7 +233,7 @@ BOOL torture_trans2_scan(int dummy)
/****************************************************************************
look for a partial hit
****************************************************************************/
-static void nttrans_check_hit(char *format, int op, int level, NTSTATUS status)
+static void nttrans_check_hit(const char *format, int op, int level, NTSTATUS status)
{
if (NT_STATUS_V(status) == NT_STATUS_V(NT_STATUS_INVALID_LEVEL) ||
NT_STATUS_V(status) == NT_STATUS_V(NT_STATUS_NOT_IMPLEMENTED) ||
@@ -280,7 +280,7 @@ static NTSTATUS try_nttrans(struct cli_state *cli,
static NTSTATUS try_nttrans_len(struct cli_state *cli,
- char *format,
+ const char *format,
int op, int level,
char *param, char *data,
int param_len, int *data_len,
@@ -315,7 +315,7 @@ static NTSTATUS try_nttrans_len(struct cli_state *cli,
check for existance of a nttrans call
****************************************************************************/
static BOOL scan_nttrans(struct cli_state *cli, int op, int level,
- int fnum, int dnum, char *fname)
+ int fnum, int dnum, const char *fname)
{
int data_len = 0;
int param_len = 0;
@@ -395,7 +395,7 @@ BOOL torture_nttrans_scan(int dummy)
{
static struct cli_state cli;
int op, level;
- char *fname = "\\scanner.dat";
+ const char *fname = "\\scanner.dat";
int fnum, dnum;
printf("starting nttrans scan test\n");
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 49ddba52e1b..5b250022139 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -24,7 +24,7 @@
static fstring host, workgroup, share, password, username, myname;
static int max_protocol = PROTOCOL_NT1;
-static char *sockops="TCP_NODELAY";
+static const char *sockops="TCP_NODELAY";
static int nprocs=1;
int torture_numops=100;
static int procnum; /* records process count number when forking */
@@ -32,7 +32,7 @@ static struct cli_state current_cli;
static fstring randomfname;
static BOOL use_oplocks;
static BOOL use_level_II_oplocks;
-static char *client_txt = "client_oplocks.txt";
+static const char *client_txt = "client_oplocks.txt";
static BOOL use_kerberos;
BOOL torture_showall = False;
@@ -221,7 +221,7 @@ static BOOL wait_lock(struct cli_state *c, int fnum, uint32 offset, uint32 len)
static BOOL rw_torture(struct cli_state *c)
{
- char *lockfname = "\\torture.lck";
+ const char *lockfname = "\\torture.lck";
fstring fname;
int fnum;
int fnum2;
@@ -428,7 +428,7 @@ static BOOL rw_torture3(struct cli_state *c, char *lockfname)
static BOOL rw_torture2(struct cli_state *c1, struct cli_state *c2)
{
- char *lockfname = "\\torture2.lck";
+ const char *lockfname = "\\torture2.lck";
int fnum1;
int fnum2;
int i;
@@ -554,7 +554,7 @@ static BOOL run_readwritelarge(int dummy)
{
static struct cli_state cli1;
int fnum1;
- char *lockfname = "\\large.dat";
+ const char *lockfname = "\\large.dat";
size_t fsize;
char buf[126*1024];
BOOL correct = True;
@@ -782,7 +782,7 @@ static BOOL run_nbench(int dummy)
static BOOL run_locktest1(int dummy)
{
static struct cli_state cli1, cli2;
- char *fname = "\\lockt1.lck";
+ const char *fname = "\\lockt1.lck";
int fnum1, fnum2, fnum3;
time_t t1, t2;
unsigned lock_timeout;
@@ -893,7 +893,7 @@ static BOOL run_locktest1(int dummy)
static BOOL run_tcon_test(int dummy)
{
static struct cli_state cli1;
- char *fname = "\\tcontest.tmp";
+ const char *fname = "\\tcontest.tmp";
int fnum1;
uint16 cnum;
char buf[4];
@@ -976,7 +976,7 @@ static BOOL run_tcon_test(int dummy)
static BOOL run_locktest2(int dummy)
{
static struct cli_state cli;
- char *fname = "\\lockt2.lck";
+ const char *fname = "\\lockt2.lck";
int fnum1, fnum2, fnum3;
BOOL correct = True;
@@ -1112,7 +1112,7 @@ static BOOL run_locktest2(int dummy)
static BOOL run_locktest3(int dummy)
{
static struct cli_state cli1, cli2;
- char *fname = "\\lockt3.lck";
+ const char *fname = "\\lockt3.lck";
int fnum1, fnum2, i;
uint32 offset;
BOOL correct = True;
@@ -1237,7 +1237,7 @@ static BOOL run_locktest3(int dummy)
static BOOL run_locktest4(int dummy)
{
static struct cli_state cli1, cli2;
- char *fname = "\\lockt4.lck";
+ const char *fname = "\\lockt4.lck";
int fnum1, fnum2, f;
BOOL ret;
char buf[1000];
@@ -1408,7 +1408,7 @@ static BOOL run_locktest4(int dummy)
static BOOL run_locktest5(int dummy)
{
static struct cli_state cli1, cli2;
- char *fname = "\\lockt5.lck";
+ const char *fname = "\\lockt5.lck";
int fnum1, fnum2, fnum3;
BOOL ret;
char buf[1000];
@@ -1532,7 +1532,7 @@ static BOOL run_locktest5(int dummy)
static BOOL run_locktest6(int dummy)
{
static struct cli_state cli;
- char *fname[1] = { "\\lock6.txt" };
+ const char *fname[1] = { "\\lock6.txt" };
int i;
int fnum;
NTSTATUS status;
@@ -1576,7 +1576,7 @@ security hole)
static BOOL run_fdpasstest(int dummy)
{
static struct cli_state cli1, cli2, cli3;
- char *fname = "\\fdpass.tst";
+ const char *fname = "\\fdpass.tst";
int fnum1;
pstring buf;
@@ -1631,7 +1631,7 @@ static BOOL run_fdpasstest(int dummy)
static BOOL run_unlinktest(int dummy)
{
static struct cli_state cli;
- char *fname = "\\unlink.tst";
+ const char *fname = "\\unlink.tst";
int fnum;
BOOL correct = True;
@@ -1680,7 +1680,7 @@ test how many open files this server supports on the one socket
static BOOL run_maxfidtest(int dummy)
{
static struct cli_state cli;
- char *template = "\\maxfid.%d.%d";
+ const char *template = "\\maxfid.%d.%d";
fstring fname;
int fnums[0x11000], i;
int retries=4;
@@ -1866,7 +1866,7 @@ static BOOL run_attrtest(int dummy)
static struct cli_state cli;
int fnum;
time_t t, t2;
- char *fname = "\\attrib.tst";
+ const char *fname = "\\attrib.tst";
BOOL correct = True;
printf("starting attrib test\n");
@@ -1931,9 +1931,9 @@ static BOOL run_trans2test(int dummy)
int fnum;
size_t size;
time_t c_time, a_time, m_time, w_time, m_time2;
- char *fname = "\\trans2.tst";
- char *dname = "\\trans2";
- char *fname2 = "\\trans2\\trans2.tst";
+ const char *fname = "\\trans2.tst";
+ const char *dname = "\\trans2";
+ const char *fname2 = "\\trans2\\trans2.tst";
pstring pname;
BOOL correct = True;
@@ -2083,7 +2083,7 @@ static BOOL run_w2ktest(int dummy)
{
static struct cli_state cli;
int fnum;
- char *fname = "\\w2ktest\\w2k.tst";
+ const char *fname = "\\w2ktest\\w2k.tst";
int level;
BOOL correct = True;
@@ -2118,7 +2118,7 @@ static BOOL run_w2ktest(int dummy)
static BOOL run_oplock1(int dummy)
{
static struct cli_state cli1;
- char *fname = "\\lockt1.lck";
+ const char *fname = "\\lockt1.lck";
int fnum1;
BOOL correct = True;
@@ -2167,7 +2167,7 @@ static BOOL run_oplock1(int dummy)
static BOOL run_oplock2(int dummy)
{
static struct cli_state cli1, cli2;
- char *fname = "\\lockt2.lck";
+ const char *fname = "\\lockt2.lck";
int fnum1, fnum2;
int saved_use_oplocks = use_oplocks;
char buf[4];
@@ -2309,7 +2309,7 @@ static BOOL oplock3_handler(struct cli_state *cli, int fnum, unsigned char level
static BOOL run_oplock3(int dummy)
{
static struct cli_state cli;
- char *fname = "\\oplockt3.dat";
+ const char *fname = "\\oplockt3.dat";
int fnum;
char buf[4] = "abcd";
BOOL correct = True;
@@ -2364,7 +2364,7 @@ static BOOL run_deletetest(int dummy)
{
static struct cli_state cli1;
static struct cli_state cli2;
- char *fname = "\\delete.file";
+ const char *fname = "\\delete.file";
int fnum1 = -1;
int fnum2 = -1;
BOOL correct = True;
@@ -2843,7 +2843,7 @@ static BOOL run_properties(int dummy)
static BOOL run_xcopy(int dummy)
{
static struct cli_state cli1;
- char *fname = "\\test.txt";
+ const char *fname = "\\test.txt";
BOOL correct = True;
int fnum1, fnum2;
@@ -2885,8 +2885,8 @@ static BOOL run_xcopy(int dummy)
static BOOL run_rename(int dummy)
{
static struct cli_state cli1;
- char *fname = "\\test.txt";
- char *fname1 = "\\test1.txt";
+ const char *fname = "\\test.txt";
+ const char *fname1 = "\\test1.txt";
BOOL correct = True;
int fnum1;
@@ -3004,7 +3004,7 @@ static BOOL run_rename(int dummy)
static BOOL run_pipe_number(int dummy)
{
static struct cli_state cli1;
- char *pipe_name = "\\SPOOLSS";
+ const char *pipe_name = "\\SPOOLSS";
int fnum;
int num_pipes = 0;
@@ -3037,7 +3037,7 @@ static BOOL run_opentest(int dummy)
{
static struct cli_state cli1;
static struct cli_state cli2;
- char *fname = "\\readonly.file";
+ const char *fname = "\\readonly.file";
int fnum1, fnum2;
char buf[20];
size_t fsize;
@@ -3884,7 +3884,7 @@ static double create_procs(BOOL (*fn)(int), BOOL *result)
#define FLAG_MULTIPROC 1
static struct {
- char *name;
+ const char *name;
BOOL (*fn)(int);
unsigned flags;
} torture_ops[] = {
@@ -3935,7 +3935,7 @@ static struct {
/****************************************************************************
run a specified test or "ALL"
****************************************************************************/
-static BOOL run_test(char *name)
+static BOOL run_test(const char *name)
{
BOOL ret = True;
BOOL result = True;
diff --git a/source3/torture/vfstest.c b/source3/torture/vfstest.c
index c8250f15f80..78d22a07ac4 100644
--- a/source3/torture/vfstest.c
+++ b/source3/torture/vfstest.c
@@ -403,7 +403,7 @@ static void process_file(struct vfs_state *pvfs, char *filename) {
}
}
-void exit_server(char *reason)
+void exit_server(const char *reason)
{
DEBUG(3,("Server exit (%s)\n", (reason ? reason : "")));
exit(0);
@@ -484,7 +484,7 @@ int main(int argc, char *argv[])
extern BOOL AllowDebugChange;
static struct vfs_state vfs;
int i;
- static char *filename = "";
+ static const char *filename = "";
/* make sure the vars that get altered (4th field) are in
a fixed location or certain compilers complain */
diff --git a/source3/torture/vfstest.h b/source3/torture/vfstest.h
index b086faa4027..5910c5ce37b 100644
--- a/source3/torture/vfstest.h
+++ b/source3/torture/vfstest.h
@@ -37,9 +37,9 @@ struct vfs_state {
};
struct cmd_set {
- char *name;
+ const char *name;
NTSTATUS (*fn)(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc,
char **argv);
- char *description;
- char *usage;
+ const char *description;
+ const char *usage;
};
diff --git a/source3/ubiqx/debugparse.c b/source3/ubiqx/debugparse.c
index 5da5280f19e..195fc245bc0 100644
--- a/source3/ubiqx/debugparse.c
+++ b/source3/ubiqx/debugparse.c
@@ -45,7 +45,7 @@
* Functions...
*/
-char *dbg_token2string( dbg_Token tok )
+const char *dbg_token2string( dbg_Token tok )
/* ------------------------------------------------------------------------ **
* Given a token, return a string describing the token.
*
diff --git a/source3/ubiqx/debugparse.h b/source3/ubiqx/debugparse.h
index 9ed1777e956..458eee74558 100644
--- a/source3/ubiqx/debugparse.h
+++ b/source3/ubiqx/debugparse.h
@@ -62,7 +62,7 @@ typedef enum
* Function prototypes...
*/
- char *dbg_token2string( dbg_Token tok );
+ const char *dbg_token2string( dbg_Token tok );
/* ------------------------------------------------------------------------ **
* Given a token, return a string describing the token.
*
diff --git a/source3/utils/editreg.c b/source3/utils/editreg.c
index 532dffe0683..fe040521503 100644
--- a/source3/utils/editreg.c
+++ b/source3/utils/editreg.c
@@ -420,10 +420,10 @@ typedef struct key_sec_desc_s {
* There should eventually be one to deal with security keys as well
*/
-typedef int (*key_print_f)(char *path, char *key_name, char *class_name,
+typedef int (*key_print_f)(const char *path, char *key_name, char *class_name,
int root, int terminal, int values);
-typedef int (*val_print_f)(char *path, char *val_name, int val_type,
+typedef int (*val_print_f)(const char *path, char *val_name, int val_type,
int data_len, void *data_blk, int terminal,
int first, int last);
@@ -431,7 +431,7 @@ typedef int (*sec_print_f)(SEC_DESC *sec_desc);
typedef struct regf_struct_s REGF;
-int nt_key_iterator(REGF *regf, REG_KEY *key_tree, int bf, char *path,
+int nt_key_iterator(REGF *regf, REG_KEY *key_tree, int bf, const char *path,
key_print_f key_print, sec_print_f sec_print,
val_print_f val_print);
@@ -476,7 +476,7 @@ int nt_key_list_iterator(REGF *regf, KEY_LIST *key_list, int bf, char *path,
return 1;
}
-int nt_key_iterator(REGF *regf, REG_KEY *key_tree, int bf, char *path,
+int nt_key_iterator(REGF *regf, REG_KEY *key_tree, int bf, const char *path,
key_print_f key_print, sec_print_f sec_print,
val_print_f val_print)
{
@@ -875,10 +875,10 @@ typedef struct vk_struct {
typedef struct _val_str {
unsigned int val;
- char * str;
+ const char * str;
} VAL_STR;
-VAL_STR reg_type_names[] = {
+const VAL_STR reg_type_names[] = {
{ 1, "REG_SZ" },
{ 2, "REG_EXPAND_SZ" },
{ 3, "REG_BIN" },
@@ -887,7 +887,7 @@ VAL_STR reg_type_names[] = {
{ 0, NULL },
};
-char *val_to_str(unsigned int val, VAL_STR *val_array)
+const char *val_to_str(unsigned int val, const VAL_STR *val_array)
{
int i = 0;
@@ -1364,7 +1364,7 @@ VAL_KEY *process_vk(REGF *regf, VK_HDR *vk_hdr, int size)
{
char val_name[1024];
int nam_len, dat_len, flag, dat_type, dat_off, vk_id;
- char *val_type;
+ const char *val_type;
VAL_KEY *tmp = NULL;
if (!vk_hdr) return NULL;
@@ -1754,7 +1754,7 @@ int nt_load_registry(REGF *regf)
* key print function here ...
*/
-int print_key(char *path, char *name, char *class_name, int root,
+int print_key(const char *path, char *name, char *class_name, int root,
int terminal, int vals)
{
@@ -1794,7 +1794,7 @@ int print_sec(SEC_DESC *sec_desc)
/*
* Value print function here ...
*/
-int print_val(char *path, char *val_name, int val_type, int data_len,
+int print_val(const char *path, char *val_name, int val_type, int data_len,
void *data_blk, int terminal, int first, int last)
{
char data_asc[1024];
diff --git a/source3/utils/net.c b/source3/utils/net.c
index ba08feae191..34822670d17 100644
--- a/source3/utils/net.c
+++ b/source3/utils/net.c
@@ -56,10 +56,10 @@
/************************************************************************************/
/* Yes, these buggers are globals.... */
-char *opt_requester_name = NULL;
-char *opt_host = NULL;
-char *opt_password = NULL;
-char *opt_user_name = NULL;
+const char *opt_requester_name = NULL;
+const char *opt_host = NULL;
+const char *opt_password = NULL;
+const char *opt_user_name = NULL;
BOOL opt_user_specified = False;
const char *opt_workgroup = NULL;
int opt_long_list_entries = 0;
@@ -67,11 +67,11 @@ int opt_reboot = 0;
int opt_force = 0;
int opt_port = 0;
int opt_maxusers = -1;
-char *opt_comment = "";
+const char *opt_comment = "";
int opt_flags = -1;
int opt_jobid = 0;
int opt_timeout = 0;
-char *opt_target_workgroup = NULL;
+const char *opt_target_workgroup = NULL;
static int opt_machine_pass = 0;
BOOL opt_have_ip = False;
@@ -615,6 +615,7 @@ static struct functable net_func[] = {
load_interfaces();
if (opt_machine_pass) {
+ char *user;
/* it is very useful to be able to make ads queries as the
machine account for testing purposes and for domain leave */
@@ -623,7 +624,8 @@ static struct functable net_func[] = {
exit(1);
}
- asprintf(&opt_user_name,"%s$", global_myname());
+ asprintf(&user,"%s$", global_myname());
+ opt_user_name = user;
opt_password = secrets_fetch_machine_password();
if (!opt_password) {
d_printf("ERROR: Unable to fetch machine password\n");
diff --git a/source3/utils/net.h b/source3/utils/net.h
index 86bdf2082e3..6fa4bd6bcec 100644
--- a/source3/utils/net.h
+++ b/source3/utils/net.h
@@ -37,20 +37,24 @@
extern int opt_maxusers;
-extern char *opt_comment;
+extern const char *opt_comment;
extern int opt_flags;
-extern char *opt_comment;
+extern const char *opt_comment;
-extern char *opt_target_workgroup;
+extern const char *opt_target_workgroup;
+extern const char *opt_workgroup;
extern int opt_long_list_entries;
extern int opt_reboot;
extern int opt_force;
extern int opt_timeout;
-extern char *opt_host;
-extern char *opt_user_name;
-extern char *opt_password;
+extern const char *opt_host;
+extern const char *opt_user_name;
+extern const char *opt_password;
extern BOOL opt_user_specified;
+extern BOOL opt_have_ip;
+extern struct in_addr opt_dest_ip;
+
extern const char *share_type[];
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c
index 72dbe49c164..25b6f23d2de 100644
--- a/source3/utils/net_ads.c
+++ b/source3/utils/net_ads.c
@@ -544,8 +544,10 @@ static int net_ads_leave(int argc, const char **argv)
}
if (!opt_password) {
- asprintf(&opt_user_name, "%s$", global_myname());
+ char *user_name;
+ asprintf(&user_name, "%s$", global_myname());
opt_password = secrets_fetch_machine_password();
+ opt_user_name = user_name;
}
if (!(ads = ads_startup())) {
@@ -566,6 +568,7 @@ static int net_ads_leave(int argc, const char **argv)
static int net_ads_join_ok(void)
{
+ char *user_name;
ADS_STRUCT *ads = NULL;
if (!secrets_init()) {
@@ -573,7 +576,8 @@ static int net_ads_join_ok(void)
return -1;
}
- asprintf(&opt_user_name, "%s$", global_myname());
+ asprintf(&user_name, "%s$", global_myname());
+ opt_user_name = user_name;
opt_password = secrets_fetch_machine_password();
if (!(ads = ads_startup())) {
@@ -743,11 +747,10 @@ static int net_ads_printer_publish(int argc, const char **argv)
{
ADS_STRUCT *ads;
ADS_STATUS rc;
- char *servername;
+ const char *servername;
struct cli_state *cli;
struct in_addr server_ip;
NTSTATUS nt_status;
- extern char *opt_workgroup;
TALLOC_CTX *mem_ctx = talloc_init("net_ads_printer_publish");
ADS_MODLIST mods = ads_init_mods(mem_ctx);
char *prt_dn, *srv_dn, **srv_cn;
@@ -853,8 +856,8 @@ static int net_ads_printer(int argc, const char **argv)
static int net_ads_password(int argc, const char **argv)
{
ADS_STRUCT *ads;
- char *auth_principal = opt_user_name;
- char *auth_password = opt_password;
+ const char *auth_principal = opt_user_name;
+ const char *auth_password = opt_password;
char *realm = NULL;
char *new_password = NULL;
char *c;
@@ -902,13 +905,16 @@ static int net_ads_change_localhost_pass(int argc, const char **argv)
char *host_principal;
char *hostname;
ADS_STATUS ret;
+ char *user_name;
if (!secrets_init()) {
DEBUG(1,("Failed to initialise secrets database\n"));
return -1;
}
- asprintf(&opt_user_name, "%s$", global_myname());
+ asprintf(&user_name, "%s$", global_myname());
+ opt_user_name = user_name;
+
opt_password = secrets_fetch_machine_password();
if (!(ads = ads_startup())) {
diff --git a/source3/utils/net_rap.c b/source3/utils/net_rap.c
index af0a6adbd29..8f3dd53fa6a 100644
--- a/source3/utils/net_rap.c
+++ b/source3/utils/net_rap.c
@@ -204,7 +204,7 @@ static int rap_share_add(int argc, const char **argv)
strlcpy(sinfo.share_name, sharename, sizeof(sinfo.share_name));
sinfo.reserved1 = '\0';
sinfo.share_type = 0;
- sinfo.comment = opt_comment;
+ sinfo.comment = smb_xstrdup(opt_comment);
sinfo.perms = 0;
sinfo.maximum_users = opt_maxusers;
sinfo.active_users = 0;
@@ -644,7 +644,7 @@ static int rap_user_add(int argc, const char **argv)
userinfo.userflags = opt_flags;
userinfo.reserved1 = '\0';
- userinfo.comment = opt_comment;
+ userinfo.comment = smb_xstrdup(opt_comment);
userinfo.priv = 1;
userinfo.home_dir = NULL;
userinfo.logon_script = NULL;
@@ -757,7 +757,7 @@ static int rap_group_add(int argc, const char **argv)
/* BB check for length 21 or smaller explicitly ? BB */
safe_strcpy(grinfo.group_name, argv[0], sizeof(grinfo.group_name));
grinfo.reserved1 = '\0';
- grinfo.comment = opt_comment;
+ grinfo.comment = smb_xstrdup(opt_comment);
ret = cli_NetGroupAdd(cli, &grinfo);
cli_shutdown(cli);
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index 27ea23d1834..60adcfdf6e2 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -1442,7 +1442,7 @@ static NTSTATUS rpc_shutdown_internals(const DOM_SID *domain_sid, struct cli_sta
int argc, const char **argv)
{
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
- char *msg = "This machine will be shutdown shortly";
+ const char *msg = "This machine will be shutdown shortly";
uint32 timeout = 20;
#if 0
poptContext pc;
@@ -1621,10 +1621,6 @@ static int rpc_trustdom_del(int argc, const char **argv)
* @return Integer status (0 means success)
**/
-extern char *opt_user_name;
-extern char *opt_password;
-extern char *opt_workgroup;
-
static int rpc_trustdom_establish(int argc, const char **argv)
{
struct cli_state *cli;
@@ -1660,7 +1656,6 @@ static int rpc_trustdom_establish(int argc, const char **argv)
* hence it should be set to remote domain name instead of ours
*/
if (opt_workgroup) {
- SAFE_FREE(opt_workgroup);
opt_workgroup = smb_xstrdup(domain_name);
};
@@ -1861,18 +1856,13 @@ static NTSTATUS rpc_query_domain_sid(const DOM_SID *domain_sid, struct cli_state
};
-extern char* opt_workgroup;
-extern char* opt_target_worgroup;
-extern char* opt_host;
-extern char* opt_password;
-
static int rpc_trustdom_list(int argc, const char **argv)
{
/* common variables */
TALLOC_CTX* mem_ctx;
struct cli_state *cli, *remote_cli;
NTSTATUS nt_status;
- char *domain_name = NULL;
+ const char *domain_name = NULL;
DOM_SID queried_dom_sid;
fstring ascii_sid, padding;
int ascii_dom_name_len;
@@ -1900,15 +1890,13 @@ static int rpc_trustdom_list(int argc, const char **argv)
* set domain and pdc name to local samba server (default)
* or to remote one given in command line
*/
- strupper(opt_workgroup);
- if (strcmp(opt_workgroup, lp_workgroup())) {
+
+ if (StrCaseCmp(opt_workgroup, lp_workgroup())) {
domain_name = opt_workgroup;
- if (opt_target_workgroup) SAFE_FREE(opt_target_workgroup);
opt_target_workgroup = opt_workgroup;
} else {
- safe_strcpy(pdc_name, global_myname(), FSTRING_LEN);
+ fstrcpy(pdc_name, global_myname());
domain_name = talloc_strdup(mem_ctx, lp_workgroup());
- if (opt_target_workgroup) SAFE_FREE(opt_target_workgroup);
opt_target_workgroup = domain_name;
};
@@ -2060,7 +2048,6 @@ static int rpc_trustdom_list(int argc, const char **argv)
/* set opt_* variables to remote domain */
strupper(trusting_dom_names[i]);
opt_workgroup = talloc_strdup(mem_ctx, trusting_dom_names[i]);
- if (opt_target_workgroup) SAFE_FREE(opt_target_workgroup);
opt_target_workgroup = opt_workgroup;
d_printf("%s%s", trusting_dom_names[i], padding);
diff --git a/source3/utils/net_time.c b/source3/utils/net_time.c
index 4cf923b1f76..40619a0796d 100644
--- a/source3/utils/net_time.c
+++ b/source3/utils/net_time.c
@@ -65,9 +65,6 @@ done:
/* find the servers time on the opt_host host */
static time_t nettime(int *zone)
{
- extern BOOL opt_have_ip;
- extern struct in_addr opt_dest_ip;
- extern char *opt_host;
return cli_servertime(opt_host, opt_have_ip? &opt_dest_ip : NULL, zone);
}
@@ -155,9 +152,6 @@ static int net_time_zone(int argc, const char **argv)
int net_time(int argc, const char **argv)
{
time_t t;
- extern BOOL opt_have_ip;
- extern struct in_addr opt_dest_ip;
- extern char *opt_host;
struct functable func[] = {
{"SYSTEM", net_time_system},
{"SET", net_time_set},
diff --git a/source3/utils/nmblookup.c b/source3/utils/nmblookup.c
index 81061346997..017efc60ae5 100644
--- a/source3/utils/nmblookup.c
+++ b/source3/utils/nmblookup.c
@@ -121,7 +121,7 @@ static char *query_flags(int flags)
/****************************************************************************
do a node status query
****************************************************************************/
-static void do_node_status(int fd, char *name, int type, struct in_addr ip)
+static void do_node_status(int fd, const char *name, int type, struct in_addr ip)
{
struct nmb_name nname;
int count, i, j;
@@ -150,7 +150,7 @@ static void do_node_status(int fd, char *name, int type, struct in_addr ip)
/****************************************************************************
send out one query
****************************************************************************/
-static BOOL query_one(char *lookup, unsigned int lookup_type)
+static BOOL query_one(const char *lookup, unsigned int lookup_type)
{
int j, count, flags = 0;
struct in_addr *ip_list=NULL;
diff --git a/source3/utils/ntlm_auth.c b/source3/utils/ntlm_auth.c
index e710a8c0d0f..44f97fded20 100644
--- a/source3/utils/ntlm_auth.c
+++ b/source3/utils/ntlm_auth.c
@@ -297,7 +297,7 @@ BOOL hex_decode(const char *hex_buf_in, unsigned char **out_buffer, size_t *size
size_t hex_buf_in_len = strlen(hex_buf_in);
unsigned char partial_byte_hex;
unsigned char partial_byte;
- char *hexchars = "0123456789ABCDEF";
+ const char *hexchars = "0123456789ABCDEF";
char *p;
BOOL high = True;
diff --git a/source3/utils/pdbedit.c b/source3/utils/pdbedit.c
index 90ce3a6890f..c229d100ca9 100644
--- a/source3/utils/pdbedit.c
+++ b/source3/utils/pdbedit.c
@@ -231,7 +231,10 @@ static int print_users_list (struct pdb_context *in, BOOL verbosity, BOOL smbpwd
Set User Info
**********************************************************/
-static int set_user_info (struct pdb_context *in, char *username, char *fullname, char *homedir, char *drive, char *script, char *profile)
+static int set_user_info (struct pdb_context *in, const char *username,
+ const char *fullname, const char *homedir,
+ const char *drive, const char *script,
+ const char *profile)
{
SAM_ACCOUNT *sam_pwent=NULL;
BOOL ret;
@@ -270,7 +273,7 @@ static int set_user_info (struct pdb_context *in, char *username, char *fullname
/*********************************************************
Add New User
**********************************************************/
-static int new_user (struct pdb_context *in, char *username, char *fullname, char *homedir, char *drive, char *script, char *profile)
+static int new_user (struct pdb_context *in, const char *username, const char *fullname, const char *homedir, const char *drive, const char *script, const char *profile)
{
SAM_ACCOUNT *sam_pwent=NULL;
struct passwd *pwd = NULL;
@@ -339,26 +342,27 @@ static int new_user (struct pdb_context *in, char *username, char *fullname, cha
Add New Machine
**********************************************************/
-static int new_machine (struct pdb_context *in, char *machinename)
+static int new_machine (struct pdb_context *in, const char *machine_in)
{
SAM_ACCOUNT *sam_pwent=NULL;
+ fstring machinename;
char name[16];
- char *password = NULL;
if (!NT_STATUS_IS_OK(pdb_init_sam (&sam_pwent))) {
return -1;
}
+ fstrcpy(machinename, machine_in);
+
if (machinename[strlen (machinename) -1] == '$')
machinename[strlen (machinename) -1] = '\0';
+ strlower_m(machinename);
+
safe_strcpy (name, machinename, 16);
safe_strcat (name, "$", 16);
-
- string_set (&password, machinename);
- strlower_m(password);
-
- pdb_set_plaintext_passwd (sam_pwent, password);
+
+ pdb_set_plaintext_passwd (sam_pwent, machinename);
pdb_set_username (sam_pwent, name, PDB_CHANGED);
@@ -381,7 +385,7 @@ static int new_machine (struct pdb_context *in, char *machinename)
Delete user entry
**********************************************************/
-static int delete_user_entry (struct pdb_context *in, char *username)
+static int delete_user_entry (struct pdb_context *in, const char *username)
{
SAM_ACCOUNT *samaccount = NULL;
@@ -401,7 +405,7 @@ static int delete_user_entry (struct pdb_context *in, char *username)
Delete machine entry
**********************************************************/
-static int delete_machine_entry (struct pdb_context *in, char *machinename)
+static int delete_machine_entry (struct pdb_context *in, const char *machinename)
{
char name[16];
SAM_ACCOUNT *samaccount = NULL;
@@ -438,7 +442,7 @@ int main (int argc, char **argv)
uint32 setparms, checkparms;
int opt;
static char *full_name = NULL;
- static char *user_name = NULL;
+ static const char *user_name = NULL;
static char *home_dir = NULL;
static char *home_drive = NULL;
static char *backend = NULL;
diff --git a/source3/utils/profiles.c b/source3/utils/profiles.c
index de18bd0534b..9424233e111 100644
--- a/source3/utils/profiles.c
+++ b/source3/utils/profiles.c
@@ -496,7 +496,7 @@ void process_sid(DOM_SID *sid, DOM_SID *o_sid, DOM_SID *n_sid)
}
-void process_acl(ACL *acl, char *prefix)
+void process_acl(ACL *acl, const char *prefix)
{
int ace_cnt, i;
ACE *ace;
diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c
index 07b2aa7fec9..e41edcf6f8a 100644
--- a/source3/utils/smbcacls.c
+++ b/source3/utils/smbcacls.c
@@ -43,13 +43,13 @@ enum chown_mode {REQUEST_NONE, REQUEST_CHOWN, REQUEST_CHGRP};
enum exit_values {EXIT_OK, EXIT_FAILED, EXIT_PARSE_ERROR};
struct perm_value {
- char *perm;
+ const char *perm;
uint32 mask;
};
/* These values discovered by inspection */
-static struct perm_value special_values[] = {
+static const struct perm_value special_values[] = {
{ "R", 0x00120089 },
{ "W", 0x00120116 },
{ "X", 0x001200a0 },
@@ -59,7 +59,7 @@ static struct perm_value special_values[] = {
{ NULL, 0 },
};
-static struct perm_value standard_values[] = {
+static const struct perm_value standard_values[] = {
{ "READ", 0x001200a9 },
{ "CHANGE", 0x001301bf },
{ "FULL", 0x001f01ff },
@@ -70,7 +70,7 @@ static struct cli_state *global_hack_cli;
static POLICY_HND pol;
static BOOL got_policy_hnd;
-static struct cli_state *connect_one(char *share);
+static struct cli_state *connect_one(const char *share);
/* Open cli connection and policy handle */
@@ -161,7 +161,7 @@ static BOOL StringToSid(DOM_SID *sid, const char *str)
/* print an ACE on a FILE, using either numeric or ascii representation */
static void print_ace(FILE *f, SEC_ACE *ace)
{
- struct perm_value *v;
+ const struct perm_value *v;
fstring sidstr;
int do_print = 0;
uint32 got_mask;
@@ -234,7 +234,7 @@ static BOOL parse_ace(SEC_ACE *ace, char *str)
unsigned atype, aflags, amask;
DOM_SID sid;
SEC_ACCESS mask;
- struct perm_value *v;
+ const struct perm_value *v;
ZERO_STRUCTP(ace);
p = strchr_m(str,':');
@@ -708,7 +708,7 @@ static int cacl_set(struct cli_state *cli, char *filename,
/*****************************************************
return a connection to a server
*******************************************************/
-static struct cli_state *connect_one(char *share)
+static struct cli_state *connect_one(const char *share)
{
struct cli_state *c;
struct in_addr ip;
diff --git a/source3/utils/smbcontrol.c b/source3/utils/smbcontrol.c
index f4d197147fe..10ebf019c53 100644
--- a/source3/utils/smbcontrol.c
+++ b/source3/utils/smbcontrol.c
@@ -24,8 +24,8 @@
extern BOOL AllowDebugChange;
-static struct {
- char *name;
+static const struct {
+ const char *name;
int value;
} msg_types[] = {
{"debug", MSG_DEBUG},
@@ -149,7 +149,7 @@ Prints out the current Profile level returned by MSG_PROFILELEVEL
void profilelevel_function(int msg_type, pid_t src, void *buf, size_t len)
{
int level;
- char *s=NULL;
+ const char *s=NULL;
memcpy(&level, buf, sizeof(int));
if (level) {
diff --git a/source3/utils/smbpasswd.c b/source3/utils/smbpasswd.c
index bcb5629f212..577e467fbdb 100644
--- a/source3/utils/smbpasswd.c
+++ b/source3/utils/smbpasswd.c
@@ -33,7 +33,7 @@ static BOOL got_pass = False, got_username = False;
static BOOL stdin_passwd_get = False;
static fstring user_name, user_password;
static char *new_passwd = NULL;
-static char *remote_machine = NULL;
+static const char *remote_machine = NULL;
static fstring ldap_secret;
@@ -241,7 +241,7 @@ static char *stdin_new_passwd(void)
Used if the '-s' option is set to silently get passwords
to enable scripting.
*************************************************************/
-static char *get_pass( char *prompt, BOOL stdin_get)
+static char *get_pass( const char *prompt, BOOL stdin_get)
{
char *p;
if (stdin_get) {
diff --git a/source3/utils/testprns.c b/source3/utils/testprns.c
index 1c13bb4ce3f..7e52b86afb6 100644
--- a/source3/utils/testprns.c
+++ b/source3/utils/testprns.c
@@ -34,7 +34,7 @@
int main(int argc, char *argv[])
{
- char *pszTemp;
+ const char *pszTemp;
setup_logging(argv[0],True);
diff --git a/source3/web/cgi.c b/source3/web/cgi.c
index 96520c0eef9..018dd3602fd 100644
--- a/source3/web/cgi.c
+++ b/source3/web/cgi.c
@@ -40,7 +40,7 @@ static int num_variables;
static int content_length;
static int request_post;
static char *query_string;
-static char *baseurl;
+static const char *baseurl;
static char *pathinfo;
static char *C_user;
static BOOL inetd_server;
@@ -205,7 +205,7 @@ void cgi_load_variables(void)
browser. Also doesn't allow for variables[] containing multiple variables
with the same name and the same or different values.
***************************************************************************/
-char *cgi_variable(char *name)
+const char *cgi_variable(const char *name)
{
int i;
@@ -218,7 +218,7 @@ char *cgi_variable(char *name)
/***************************************************************************
tell a browser about a fatal error in the http processing
***************************************************************************/
-static void cgi_setup_error(char *err, char *header, char *info)
+static void cgi_setup_error(const char *err, const char *header, const char *info)
{
if (!got_request) {
/* damn browsers don't like getting cut off before they give a request */
@@ -264,10 +264,10 @@ authenticate when we are running as a CGI
***************************************************************************/
static void cgi_web_auth(void)
{
- char *user = getenv("REMOTE_USER");
+ const char *user = getenv("REMOTE_USER");
struct passwd *pwd;
- char *head = "Content-Type: text/html\r\n\r\n<HTML><BODY><H1>SWAT installation Error</H1>\n";
- char *tail = "</BODY></HTML>\r\n";
+ const char *head = "Content-Type: text/html\r\n\r\n<HTML><BODY><H1>SWAT installation Error</H1>\n";
+ const char *tail = "</BODY></HTML>\r\n";
if (!user) {
printf("%sREMOTE_USER not set. Not authenticated by web server.<br>%s\n",
@@ -296,7 +296,7 @@ decode a base64 string in-place - simple and slow algorithm
***************************************************************************/
static void base64_decode(char *s)
{
- char *b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+ const char *b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
int bit_offset, byte_offset, idx, i, n;
unsigned char *d = (unsigned char *)s;
char *p;
@@ -570,7 +570,7 @@ void cgi_setup(const char *rootdir, int auth_required)
/***************************************************************************
return the current pages URL
***************************************************************************/
-char *cgi_baseurl(void)
+const char *cgi_baseurl(void)
{
if (inetd_server) {
return baseurl;
@@ -581,7 +581,7 @@ char *cgi_baseurl(void)
/***************************************************************************
return the current pages path info
***************************************************************************/
-char *cgi_pathinfo(void)
+const char *cgi_pathinfo(void)
{
char *r;
if (inetd_server) {
diff --git a/source3/web/statuspage.c b/source3/web/statuspage.c
index 3b597d44c04..8e41d62cb03 100644
--- a/source3/web/statuspage.c
+++ b/source3/web/statuspage.c
@@ -216,7 +216,7 @@ static int traverse_fn3(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf, void* st
/* show the current server status */
void status_page(void)
{
- char *v;
+ const char *v;
int autorefresh=0;
int refresh_interval=30;
TDB_CONTEXT *tdb;
diff --git a/source3/web/swat.c b/source3/web/swat.c
index fc388522454..21ae104ceff 100644
--- a/source3/web/swat.c
+++ b/source3/web/swat.c
@@ -59,7 +59,7 @@ static int iNumNonAutoPrintServices = 0;
/****************************************************************************
****************************************************************************/
-static int enum_index(int value, struct enum_list *enumlist)
+static int enum_index(int value, const struct enum_list *enumlist)
{
int i;
for (i=0;enumlist[i].name;i++)
@@ -67,7 +67,7 @@ static int enum_index(int value, struct enum_list *enumlist)
return(i);
}
-static char *fix_backslash(char *str)
+static char *fix_backslash(const char *str)
{
static char newstring[1024];
char *p = newstring;
@@ -81,7 +81,7 @@ static char *fix_backslash(char *str)
return newstring;
}
-static char *stripspaceupper(char *str)
+static char *stripspaceupper(const char *str)
{
static char newstring[1024];
char *p = newstring;
@@ -94,7 +94,7 @@ static char *stripspaceupper(char *str)
return newstring;
}
-static char *make_parm_name(char *label)
+static char *make_parm_name(const char *label)
{
static char parmname[1024];
char *p = parmname;
@@ -111,7 +111,7 @@ static char *make_parm_name(char *label)
/****************************************************************************
include a lump of html in a page
****************************************************************************/
-static int include_html(char *fname)
+static int include_html(const char *fname)
{
int fd;
char buf[1024];
@@ -303,8 +303,8 @@ static void show_parameters(int snum, int allparameters, unsigned int parm_filte
{
int i = 0;
struct parm_struct *parm;
- char *heading = NULL;
- char *last_heading = NULL;
+ const char *heading = NULL;
+ const char *last_heading = NULL;
while ((parm = lp_next_parameter(snum, &i, allparameters))) {
if (snum < 0 && parm->class == P_LOCAL && !(parm->flags & FLAG_GLOBAL))
@@ -440,7 +440,7 @@ static int save_reload(int snum)
/****************************************************************************
commit one parameter
****************************************************************************/
-static void commit_parameter(int snum, struct parm_struct *parm, char *v)
+static void commit_parameter(int snum, struct parm_struct *parm, const char *v)
{
int i;
char *s;
@@ -468,7 +468,7 @@ static void commit_parameters(int snum)
int i = 0;
struct parm_struct *parm;
pstring label;
- char *v;
+ const char *v;
while ((parm = lp_next_parameter(snum, &i, 1))) {
slprintf(label, sizeof(label)-1, "parm_%s", make_parm_name(parm->label));
@@ -817,7 +817,7 @@ static void globals_page(void)
****************************************************************************/
static void shares_page(void)
{
- char *share = cgi_variable("share");
+ const char *share = cgi_variable("share");
char *s;
int snum = -1;
int i;
@@ -915,8 +915,8 @@ static void shares_page(void)
/*************************************************************
change a password either locally or remotely
*************************************************************/
-static BOOL change_password(const char *remote_machine, char *user_name,
- char *old_passwd, char *new_passwd,
+static BOOL change_password(const char *remote_machine, const char *user_name,
+ const char *old_passwd, const char *new_passwd,
int local_flags)
{
BOOL ret = False;
@@ -957,7 +957,7 @@ static BOOL change_password(const char *remote_machine, char *user_name,
****************************************************************************/
static void chg_passwd(void)
{
- char *host;
+ const char *host;
BOOL rslt;
int local_flags = 0;
@@ -1042,7 +1042,7 @@ static void chg_passwd(void)
****************************************************************************/
static void passwd_page(void)
{
- char *new_name = cgi_user_name();
+ const char *new_name = cgi_user_name();
/*
* After the first time through here be nice. If the user
@@ -1147,7 +1147,7 @@ static void passwd_page(void)
****************************************************************************/
static void printers_page(void)
{
- char *share = cgi_variable("share");
+ const char *share = cgi_variable("share");
char *s;
int snum=-1;
int i;
diff --git a/source3/wrepld/server.c b/source3/wrepld/server.c
index 144a5b570ce..e39fb148d60 100644
--- a/source3/wrepld/server.c
+++ b/source3/wrepld/server.c
@@ -135,7 +135,7 @@ static BOOL dump_core(void)
/****************************************************************************
exit the server
****************************************************************************/
-void exit_server(char *reason)
+void exit_server(const char *reason)
{
static int firsttime=1;