mirror of
https://github.com/samba-team/samba.git
synced 2025-03-24 10:50:22 +03:00
Merge from HEAD - make Samba compile with -Wwrite-strings without additional
warnings. (Adds a lot of const). Andrew Bartlett (This used to be commit 3a7458f9472432ef12c43008414925fd1ce8ea0c)
This commit is contained in:
parent
47a7f0cfb5
commit
634c54310c
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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[] =
|
||||
{
|
||||
|
@ -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 :-} */
|
||||
|
@ -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 */
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -793,7 +793,7 @@ typedef struct smb_wpasswd {
|
||||
|
||||
/* used in net.c */
|
||||
struct functable {
|
||||
char *funcname;
|
||||
const char *funcname;
|
||||
int (*fn)(int argc, const char **argv);
|
||||
};
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -153,7 +153,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;
|
||||
};
|
||||
|
@ -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 */
|
||||
};
|
||||
|
||||
|
@ -129,7 +129,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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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"},
|
||||
|
@ -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;
|
||||
|
@ -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";
|
||||
|
@ -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];
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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[] = {
|
||||
|
@ -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];
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
@ -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[] = {
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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 */
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
@ -316,7 +317,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;
|
||||
|
@ -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;
|
||||
|
@ -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[] = {
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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,
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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();
|
||||
|
@ -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 */
|
||||
|
@ -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[] = {
|
||||
|
@ -521,29 +521,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_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 ( 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_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(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"},
|
||||
@ -553,7 +553,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"},
|
||||
@ -564,7 +564,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"},
|
||||
@ -583,7 +583,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"},
|
||||
@ -599,7 +599,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"},
|
||||
@ -621,7 +621,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"},
|
||||
@ -630,13 +630,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"},
|
||||
@ -653,7 +653,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"},
|
||||
@ -682,7 +682,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"},
|
||||
@ -1846,15 +1846,15 @@ char *lp_parm_string(const char *servicename, const char *type, const char *opti
|
||||
|
||||
/* local prototypes */
|
||||
|
||||
static int map_parameter(char *pszParmName);
|
||||
static int map_parameter(const char *pszParmName);
|
||||
static BOOL set_boolean(BOOL *pb, 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);
|
||||
|
||||
|
||||
@ -2017,7 +2017,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);
|
||||
@ -2087,7 +2087,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;
|
||||
|
||||
@ -2349,7 +2349,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;
|
||||
|
||||
@ -2365,17 +2365,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);
|
||||
@ -2435,7 +2435,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;
|
||||
@ -2475,7 +2475,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 */
|
||||
|
||||
@ -2491,7 +2491,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);
|
||||
@ -2514,7 +2514,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;
|
||||
@ -2610,7 +2610,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;
|
||||
|
||||
@ -2627,7 +2627,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;
|
||||
|
||||
@ -2648,7 +2648,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;
|
||||
|
||||
@ -2669,7 +2669,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;
|
||||
|
||||
@ -2682,7 +2682,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;
|
||||
|
||||
@ -2706,7 +2706,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;
|
||||
|
||||
@ -2731,7 +2731,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;
|
||||
@ -2764,7 +2764,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, "");
|
||||
@ -2810,7 +2810,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 */
|
||||
@ -2949,7 +2949,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);
|
||||
@ -3090,7 +3090,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) ||
|
||||
@ -3839,7 +3839,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);
|
||||
|
@ -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 )
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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) );
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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",
|
||||
|
@ -1007,7 +1007,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) )
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
|
@ -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++;
|
||||
|
@ -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");
|
||||
|
@ -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++;
|
||||
|
@ -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;
|
||||
|
@ -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)) {
|
||||
|
@ -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;
|
||||
@ -1757,7 +1757,7 @@ void init_reg_q_shutdown(REG_Q_SHUTDOWN * q_s,
|
||||
/*******************************************************************
|
||||
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)
|
||||
@ -1794,7 +1794,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)
|
||||
@ -1825,7 +1825,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)
|
||||
@ -1849,7 +1849,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)
|
||||
|
@ -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;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -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;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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 },
|
||||
|
@ -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__));
|
||||
|
@ -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;
|
||||
|
@ -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 );
|
||||
|
@ -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");
|
||||
|
@ -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);
|
||||
|
@ -455,7 +455,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*/
|
||||
@ -472,9 +472,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*/
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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 */
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
@ -2602,6 +2602,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.
|
||||
@ -2620,15 +2621,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);
|
||||
@ -3425,9 +3426,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 *);
|
||||
|
@ -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 },
|
||||
|
@ -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;
|
||||
|
@ -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[] = {
|
||||
|
@ -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",
|
||||
|
@ -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);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user