diff options
author | Jeremy Allison <jra@samba.org> | 2002-11-12 23:15:52 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-11-12 23:15:52 +0000 |
commit | 250c9801197ea1c949bd94c1c891f81ab118b130 (patch) | |
tree | 3a0ec79c71a010961d78726e223a70e1bc75c73f /source3/rpc_parse | |
parent | 477025a6f628fd1a8d3bfacd30726e7a41819e50 (diff) | |
download | samba-250c9801197ea1c949bd94c1c891f81ab118b130.tar.gz samba-250c9801197ea1c949bd94c1c891f81ab118b130.tar.bz2 samba-250c9801197ea1c949bd94c1c891f81ab118b130.zip |
Removed global_myworkgroup, global_myname, global_myscope. Added liberal
dashes of const. This is a rather large check-in, some things may break.
It does compile though :-).
Jeremy.
(This used to be commit 82b8f749a36b42e22186297482aad2abb04fab8a)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r-- | source3/rpc_parse/parse_misc.c | 31 | ||||
-rw-r--r-- | source3/rpc_parse/parse_net.c | 31 | ||||
-rw-r--r-- | source3/rpc_parse/parse_rpc.c | 4 | ||||
-rw-r--r-- | source3/rpc_parse/parse_samr.c | 4 | ||||
-rw-r--r-- | source3/rpc_parse/parse_srv.c | 12 |
5 files changed, 42 insertions, 40 deletions
diff --git a/source3/rpc_parse/parse_misc.c b/source3/rpc_parse/parse_misc.c index c20fb85582..5dcb49d399 100644 --- a/source3/rpc_parse/parse_misc.c +++ b/source3/rpc_parse/parse_misc.c @@ -244,14 +244,13 @@ BOOL smb_io_dom_sid(char *desc, DOM_SID *sid, prs_struct *ps, int depth) identauth >= 2^32 can be detected because it will be specified in hex ********************************************************************/ -void init_dom_sid(DOM_SID *sid, char *str_sid) +void init_dom_sid(DOM_SID *sid, const char *str_sid) { pstring domsid; int identauth; char *p; - if (str_sid == NULL) - { + if (str_sid == NULL) { DEBUG(4,("netlogon domain SID: none\n")); sid->sid_rev_num = 0; sid->num_auths = 0; @@ -592,7 +591,7 @@ void init_buffer3_uint32(BUFFER3 *str, uint32 val) Inits a BUFFER3 structure. ********************************************************************/ -void init_buffer3_str(BUFFER3 *str, char *buf, int len) +void init_buffer3_str(BUFFER3 *str, const char *buf, int len) { ZERO_STRUCTP(str); @@ -610,7 +609,7 @@ void init_buffer3_str(BUFFER3 *str, char *buf, int len) Inits a BUFFER3 structure from a hex string. ********************************************************************/ -void init_buffer3_hex(BUFFER3 *str, char *buf) +void init_buffer3_hex(BUFFER3 *str, const char *buf) { ZERO_STRUCTP(str); create_buffer3(str, strlen(buf)); @@ -697,7 +696,7 @@ BOOL smb_io_buffer5(char *desc, BUFFER5 *buf5, prs_struct *ps, int depth) Inits a BUFFER2 structure. ********************************************************************/ -void init_buffer2(BUFFER2 *str, uint8 *buf, int len) +void init_buffer2(BUFFER2 *str, const uint8 *buf, int len) { ZERO_STRUCTP(str); @@ -963,7 +962,7 @@ void init_unistr2_w(TALLOC_CTX *ctx, UNISTR2 *str, const smb_ucs2_t *buf) /******************************************************************* Inits a UNISTR2 structure from a UNISTR ********************************************************************/ -void init_unistr2_from_unistr (UNISTR2 *to, UNISTR *from) +void init_unistr2_from_unistr (UNISTR2 *to, const UNISTR *from) { uint32 i; @@ -1138,7 +1137,7 @@ void init_dom_rid4(DOM_RID4 *rid4, uint16 unknown, uint16 attr, uint32 rid) Inits a DOM_CLNT_SRV structure. ********************************************************************/ -static void init_clnt_srv(DOM_CLNT_SRV *log, char *logon_srv, char *comp_name) +static void init_clnt_srv(DOM_CLNT_SRV *log, const char *logon_srv, const char *comp_name) { DEBUG(5,("init_clnt_srv: %d\n", __LINE__)); @@ -1292,16 +1291,16 @@ BOOL smb_io_cred(char *desc, DOM_CRED *cred, prs_struct *ps, int depth) ********************************************************************/ void init_clnt_info2(DOM_CLNT_INFO2 *clnt, - char *logon_srv, char *comp_name, - DOM_CRED *clnt_cred) + const char *logon_srv, const char *comp_name, + const DOM_CRED *clnt_cred) { DEBUG(5,("make_clnt_info: %d\n", __LINE__)); - init_clnt_srv(&(clnt->login), logon_srv, comp_name); + init_clnt_srv(&clnt->login, logon_srv, comp_name); if (clnt_cred != NULL) { clnt->ptr_cred = 1; - memcpy(&(clnt->cred), clnt_cred, sizeof(clnt->cred)); + memcpy(&clnt->cred, clnt_cred, sizeof(clnt->cred)); } else { clnt->ptr_cred = 0; } @@ -1341,9 +1340,9 @@ BOOL smb_io_clnt_info2(char *desc, DOM_CLNT_INFO2 *clnt, prs_struct *ps, int dep ********************************************************************/ void init_clnt_info(DOM_CLNT_INFO *clnt, - char *logon_srv, char *acct_name, - uint16 sec_chan, char *comp_name, - DOM_CRED *cred) + const char *logon_srv, const char *acct_name, + uint16 sec_chan, const char *comp_name, + const DOM_CRED *cred) { DEBUG(5,("make_clnt_info\n")); @@ -1413,7 +1412,7 @@ BOOL smb_io_logon_id(char *desc, DOM_LOGON_ID *log, prs_struct *ps, int depth) Inits an OWF_INFO structure. ********************************************************************/ -void init_owf_info(OWF_INFO *hash, uint8 data[16]) +void init_owf_info(OWF_INFO *hash, const uint8 data[16]) { DEBUG(5,("init_owf_info: %d\n", __LINE__)); diff --git a/source3/rpc_parse/parse_net.c b/source3/rpc_parse/parse_net.c index e0f710b2d7..c140a1fe01 100644 --- a/source3/rpc_parse/parse_net.c +++ b/source3/rpc_parse/parse_net.c @@ -134,7 +134,7 @@ static BOOL net_io_netinfo_1(char *desc, NETLOGON_INFO_1 *info, prs_struct *ps, ********************************************************************/ static void init_netinfo_2(NETLOGON_INFO_2 *info, uint32 flags, uint32 pdc_status, - uint32 tc_status, char *trusted_dc_name) + uint32 tc_status, const char *trusted_dc_name) { int len_dc_name = strlen(trusted_dc_name); info->flags = flags; @@ -221,7 +221,7 @@ BOOL net_io_q_logon_ctrl2(char *desc, NET_Q_LOGON_CTRL2 *q_l, prs_struct *ps, in Inits an NET_Q_LOGON_CTRL2 structure. ********************************************************************/ -void init_net_q_logon_ctrl2(NET_Q_LOGON_CTRL2 *q_l, char *srv_name, +void init_net_q_logon_ctrl2(NET_Q_LOGON_CTRL2 *q_l, const char *srv_name, uint32 query_level) { DEBUG(5,("init_q_logon_ctrl2\n")); @@ -240,7 +240,7 @@ void init_net_q_logon_ctrl2(NET_Q_LOGON_CTRL2 *q_l, char *srv_name, void init_net_r_logon_ctrl2(NET_R_LOGON_CTRL2 *r_l, uint32 query_level, uint32 flags, uint32 pdc_status, uint32 logon_attempts, uint32 tc_status, - char *trusted_domain_name) + const char *trusted_domain_name) { DEBUG(5,("init_r_logon_ctrl2\n")); @@ -352,7 +352,7 @@ BOOL net_io_q_logon_ctrl(char *desc, NET_Q_LOGON_CTRL *q_l, prs_struct *ps, Inits an NET_Q_LOGON_CTRL structure. ********************************************************************/ -void init_net_q_logon_ctrl(NET_Q_LOGON_CTRL *q_l, char *srv_name, +void init_net_q_logon_ctrl(NET_Q_LOGON_CTRL *q_l, const char *srv_name, uint32 query_level) { DEBUG(5,("init_q_logon_ctrl\n")); @@ -430,7 +430,7 @@ BOOL net_io_r_logon_ctrl(char *desc, NET_R_LOGON_CTRL *r_l, prs_struct *ps, ********************************************************************/ void init_r_trust_dom(NET_R_TRUST_DOM_LIST *r_t, - uint32 num_doms, char *dom_name) + uint32 num_doms, const char *dom_name) { int i = 0; @@ -791,8 +791,10 @@ BOOL net_io_r_auth_3(char *desc, NET_R_AUTH_3 *r_a, prs_struct *ps, int depth) Inits a NET_Q_SRV_PWSET. ********************************************************************/ -void init_q_srv_pwset(NET_Q_SRV_PWSET *q_s, char *logon_srv, char *sess_key, char *acct_name, - uint16 sec_chan, char *comp_name, DOM_CRED *cred, uchar hashed_mach_pwd[16]) +void init_q_srv_pwset(NET_Q_SRV_PWSET *q_s, + const char *logon_srv, const char *sess_key, const char *acct_name, + uint16 sec_chan, const char *comp_name, + DOM_CRED *cred, uchar hashed_mach_pwd[16]) { unsigned char nt_cypher[16]; @@ -857,9 +859,9 @@ BOOL net_io_r_srv_pwset(char *desc, NET_R_SRV_PWSET *r_s, prs_struct *ps, int de Init DOM_SID2 array from a string containing multiple sids *************************************************************************/ -static int init_dom_sid2s(TALLOC_CTX *ctx, char *sids_str, DOM_SID2 **ppsids) +static int init_dom_sid2s(TALLOC_CTX *ctx, const char *sids_str, DOM_SID2 **ppsids) { - char *ptr; + const char *ptr; pstring s2; int count = 0; @@ -898,10 +900,10 @@ static int init_dom_sid2s(TALLOC_CTX *ctx, char *sids_str, DOM_SID2 **ppsids) Inits a NET_ID_INFO_1 structure. ********************************************************************/ -void init_id_info1(NET_ID_INFO_1 *id, char *domain_name, +void init_id_info1(NET_ID_INFO_1 *id, const char *domain_name, uint32 param_ctrl, uint32 log_id_low, uint32 log_id_high, - char *user_name, char *wksta_name, - char *sess_key, + const char *user_name, const char *wksta_name, + const char *sess_key, unsigned char lm_cypher[16], unsigned char nt_cypher[16]) { int len_domain_name = strlen(domain_name); @@ -1143,7 +1145,8 @@ static BOOL net_io_id_info2(char *desc, NET_ID_INFO_2 *id, prs_struct *ps, int ********************************************************************/ void init_sam_info(DOM_SAM_INFO *sam, - char *logon_srv, char *comp_name, DOM_CRED *clnt_cred, + const char *logon_srv, const char *comp_name, + DOM_CRED *clnt_cred, DOM_CRED *rtn_cred, uint16 logon_level, NET_ID_INFO_CTR *ctr) { @@ -1270,7 +1273,7 @@ void init_net_user_info3(TALLOC_CTX *ctx, NET_USER_INFO_3 *usr, uint32 num_groups, const DOM_GID *gids, uint32 user_flgs, uchar *sess_key, const char *logon_srv, const char *logon_dom, - const DOM_SID *dom_sid, char *other_sids) + const DOM_SID *dom_sid, const char *other_sids) { /* only cope with one "other" sid, right now. */ /* need to count the number of space-delimited sids */ diff --git a/source3/rpc_parse/parse_rpc.c b/source3/rpc_parse/parse_rpc.c index 247c83aecd..e8825a2e14 100644 --- a/source3/rpc_parse/parse_rpc.c +++ b/source3/rpc_parse/parse_rpc.c @@ -697,7 +697,7 @@ BOOL smb_io_rpc_auth_verifier(char *desc, RPC_AUTH_VERIFIER *rav, prs_struct *ps void init_rpc_auth_ntlmssp_neg(RPC_AUTH_NTLMSSP_NEG *neg, uint32 neg_flgs, - fstring myname, fstring domain) + const char *myname, const char *domain) { int len_myname = strlen(myname); int len_domain = strlen(domain); @@ -836,7 +836,7 @@ BOOL smb_io_rpc_auth_ntlmssp_chal(char *desc, RPC_AUTH_NTLMSSP_CHAL *chl, prs_st void init_rpc_auth_ntlmssp_resp(RPC_AUTH_NTLMSSP_RESP *rsp, uchar lm_resp[24], uchar nt_resp[24], - char *domain, char *user, char *wks, + const char *domain, const char *user, const char *wks, uint32 neg_flags) { uint32 offset; diff --git a/source3/rpc_parse/parse_samr.c b/source3/rpc_parse/parse_samr.c index 08ed28e80a..d5ca78bda4 100644 --- a/source3/rpc_parse/parse_samr.c +++ b/source3/rpc_parse/parse_samr.c @@ -631,7 +631,7 @@ static BOOL sam_io_unk_info12(char *desc, SAM_UNK_INFO_12 * u_12, /******************************************************************* inits a structure. ********************************************************************/ -void init_unk_info5(SAM_UNK_INFO_5 * u_5,char *server) +void init_unk_info5(SAM_UNK_INFO_5 * u_5,const char *server) { int len_server = strlen(server); @@ -666,7 +666,7 @@ static BOOL sam_io_unk_info5(char *desc, SAM_UNK_INFO_5 * u_5, inits a structure. ********************************************************************/ void init_unk_info2(SAM_UNK_INFO_2 * u_2, - char *domain, char *server, + const char *domain, const char *server, uint32 seq_num, uint32 num_users, uint32 num_groups, uint32 num_alias) { int len_domain = strlen(domain); diff --git a/source3/rpc_parse/parse_srv.c b/source3/rpc_parse/parse_srv.c index 672db36a28..b3d33645b9 100644 --- a/source3/rpc_parse/parse_srv.c +++ b/source3/rpc_parse/parse_srv.c @@ -2686,7 +2686,7 @@ BOOL srv_io_r_net_file_close(char *desc, SRV_R_NET_FILE_CLOSE *q_n, Inits a SRV_INFO_100 structure. ********************************************************************/ -void init_srv_info_100(SRV_INFO_100 *sv100, uint32 platform_id, char *name) +void init_srv_info_100(SRV_INFO_100 *sv100, uint32 platform_id, const char *name) { DEBUG(5,("init_srv_info_100\n")); @@ -2725,9 +2725,9 @@ static BOOL srv_io_info_100(char *desc, SRV_INFO_100 *sv100, prs_struct *ps, int Inits a SRV_INFO_101 structure. ********************************************************************/ -void init_srv_info_101(SRV_INFO_101 *sv101, uint32 platform_id, char *name, +void init_srv_info_101(SRV_INFO_101 *sv101, uint32 platform_id, const char *name, uint32 ver_major, uint32 ver_minor, - uint32 srv_type, char *comment) + uint32 srv_type, const char *comment) { DEBUG(5,("init_srv_info_101\n")); @@ -2782,11 +2782,11 @@ static BOOL srv_io_info_101(char *desc, SRV_INFO_101 *sv101, prs_struct *ps, int Inits a SRV_INFO_102 structure. ********************************************************************/ -void init_srv_info_102(SRV_INFO_102 *sv102, uint32 platform_id, char *name, - char *comment, uint32 ver_major, uint32 ver_minor, +void init_srv_info_102(SRV_INFO_102 *sv102, uint32 platform_id, const char *name, + const char *comment, uint32 ver_major, uint32 ver_minor, uint32 srv_type, uint32 users, uint32 disc, uint32 hidden, uint32 announce, uint32 ann_delta, uint32 licenses, - char *usr_path) + const char *usr_path) { DEBUG(5,("init_srv_info_102\n")); |