diff options
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r-- | source3/rpc_parse/parse_lsa.c | 14 | ||||
-rw-r--r-- | source3/rpc_parse/parse_misc.c | 6 | ||||
-rw-r--r-- | source3/rpc_parse/parse_net.c | 22 | ||||
-rw-r--r-- | source3/rpc_parse/parse_prs.c | 4 | ||||
-rw-r--r-- | source3/rpc_parse/parse_sec.c | 16 | ||||
-rw-r--r-- | source3/rpc_parse/parse_srv.c | 20 |
6 files changed, 41 insertions, 41 deletions
diff --git a/source3/rpc_parse/parse_lsa.c b/source3/rpc_parse/parse_lsa.c index 3c9c02a23a..0b45c0baf3 100644 --- a/source3/rpc_parse/parse_lsa.c +++ b/source3/rpc_parse/parse_lsa.c @@ -80,7 +80,7 @@ static BOOL lsa_io_trans_name(const char *desc, LSA_TRANS_NAME *trn, prs_struct static BOOL lsa_io_dom_r_ref(const char *desc, DOM_R_REF *r_r, prs_struct *ps, int depth) { - int i; + unsigned int i; prs_debug(ps, depth, desc, "lsa_io_dom_r_ref"); depth++; @@ -531,7 +531,7 @@ BOOL lsa_io_q_enum_trust_dom(const char *desc, LSA_Q_ENUM_TRUST_DOM *q_e, void init_r_enum_trust_dom(TALLOC_CTX *ctx, LSA_R_ENUM_TRUST_DOM *r_e, uint32 enum_context, uint32 req_num_domains, uint32 num_domains, TRUSTDOM **td) { - int i; + unsigned int i; DEBUG(5, ("init_r_enum_trust_dom\n")); @@ -851,7 +851,7 @@ static void init_lsa_sid_enum(TALLOC_CTX *mem_ctx, LSA_SID_ENUM *sen, static BOOL lsa_io_sid_enum(const char *desc, LSA_SID_ENUM *sen, prs_struct *ps, int depth) { - int i; + unsigned int i; prs_debug(ps, depth, desc, "lsa_io_sid_enum"); depth++; @@ -967,7 +967,7 @@ BOOL lsa_io_q_lookup_sids(const char *desc, LSA_Q_LOOKUP_SIDS *q_s, prs_struct * static BOOL lsa_io_trans_names(const char *desc, LSA_TRANS_NAME_ENUM *trn, prs_struct *ps, int depth) { - int i; + unsigned int i; prs_debug(ps, depth, desc, "lsa_io_trans_names"); depth++; @@ -1063,7 +1063,7 @@ makes a structure. void init_q_lookup_names(TALLOC_CTX *mem_ctx, LSA_Q_LOOKUP_NAMES *q_l, POLICY_HND *hnd, int num_names, const char **names) { - int i; + unsigned int i; DEBUG(5, ("init_q_lookup_names\n")); @@ -1102,7 +1102,7 @@ reads or writes a structure. BOOL lsa_io_q_lookup_names(const char *desc, LSA_Q_LOOKUP_NAMES *q_r, prs_struct *ps, int depth) { - int i; + unsigned int i; prs_debug(ps, depth, desc, "lsa_io_q_lookup_names"); depth++; @@ -1166,7 +1166,7 @@ reads or writes a structure. BOOL lsa_io_r_lookup_names(const char *desc, LSA_R_LOOKUP_NAMES *r_r, prs_struct *ps, int depth) { - int i; + unsigned int i; prs_debug(ps, depth, desc, "lsa_io_r_lookup_names"); depth++; diff --git a/source3/rpc_parse/parse_misc.c b/source3/rpc_parse/parse_misc.c index 43d26a691d..f0d4c67d9f 100644 --- a/source3/rpc_parse/parse_misc.c +++ b/source3/rpc_parse/parse_misc.c @@ -697,7 +697,7 @@ BOOL smb_io_buffer5(const char *desc, BUFFER5 *buf5, prs_struct *ps, int depth) Inits a BUFFER2 structure. ********************************************************************/ -void init_buffer2(BUFFER2 *str, const uint8 *buf, int len) +void init_buffer2(BUFFER2 *str, const uint8 *buf, size_t len) { ZERO_STRUCTP(str); @@ -1050,7 +1050,7 @@ BOOL smb_io_unistr2(const char *desc, UNISTR2 *uni2, uint32 buffer, prs_struct * BOOL init_unistr2_array(UNISTR2_ARRAY *array, uint32 count, const char **strings) { - int i; + unsigned int i; array->count = count; array->ref_id = count?1:0; @@ -1078,7 +1078,7 @@ BOOL init_unistr2_array(UNISTR2_ARRAY *array, ********************************************************************/ BOOL smb_io_unistr2_array(const char *desc, UNISTR2_ARRAY *array, prs_struct *ps, int depth) { - int i; + unsigned int i; prs_debug(ps, depth, desc, "smb_io_unistr2_array"); depth++; diff --git a/source3/rpc_parse/parse_net.c b/source3/rpc_parse/parse_net.c index 007cf9e25d..163e6bab3c 100644 --- a/source3/rpc_parse/parse_net.c +++ b/source3/rpc_parse/parse_net.c @@ -432,7 +432,7 @@ BOOL net_io_r_logon_ctrl(const 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, const char *dom_name) { - int i = 0; + unsigned int i = 0; DEBUG(5,("init_r_trust_dom\n")); @@ -1038,12 +1038,12 @@ void init_id_info2(NET_ID_INFO_2 * id, const char *domain_name, uint32 log_id_low, uint32 log_id_high, const char *user_name, const char *wksta_name, const uchar lm_challenge[8], - const uchar * lm_chal_resp, int lm_chal_resp_len, - const uchar * nt_chal_resp, int nt_chal_resp_len) + const uchar * lm_chal_resp, size_t lm_chal_resp_len, + const uchar * nt_chal_resp, size_t nt_chal_resp_len) { - int len_domain_name = strlen(domain_name); - int len_user_name = strlen(user_name ); - int len_wksta_name = strlen(wksta_name ); + size_t len_domain_name = strlen(domain_name); + size_t len_user_name = strlen(user_name ); + size_t len_wksta_name = strlen(wksta_name ); unsigned char lm_owf[24]; unsigned char nt_owf[128]; @@ -1281,7 +1281,7 @@ void init_net_user_info3(TALLOC_CTX *ctx, NET_USER_INFO_3 *usr, { /* only cope with one "other" sid, right now. */ /* need to count the number of space-delimited sids */ - int i; + unsigned int i; int num_other_sids = 0; NTTIME logon_time, logoff_time, kickoff_time, @@ -1390,7 +1390,7 @@ void init_net_user_info3(TALLOC_CTX *ctx, NET_USER_INFO_3 *usr, BOOL net_io_user_info3(const char *desc, NET_USER_INFO_3 *usr, prs_struct *ps, int depth, uint16 validation_level) { - int i; + unsigned int i; if (usr == NULL) return False; @@ -2363,7 +2363,7 @@ reads or writes a structure. static BOOL net_io_sam_policy_info(const char *desc, SAM_DELTA_POLICY *info, prs_struct *ps, int depth) { - int i; + unsigned int i; prs_debug(ps, depth, desc, "net_io_sam_policy_info"); depth++; @@ -2584,7 +2584,7 @@ reads or writes a structure. static BOOL net_io_sam_privs_info(const char *desc, SAM_DELTA_PRIVS *info, prs_struct *ps, int depth) { - int i; + unsigned int i; prs_debug(ps, depth, desc, "net_io_sam_privs_info"); depth++; @@ -2895,7 +2895,7 @@ reads or writes a structure. 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; + unsigned int i; prs_debug(ps, depth, desc, "net_io_r_sam_deltas"); depth++; diff --git a/source3/rpc_parse/parse_prs.c b/source3/rpc_parse/parse_prs.c index 702375be35..aeaa42ac92 100644 --- a/source3/rpc_parse/parse_prs.c +++ b/source3/rpc_parse/parse_prs.c @@ -938,7 +938,7 @@ BOOL prs_buffer2(BOOL charmode, const char *name, prs_struct *ps, int depth, BUF BOOL prs_string2(BOOL charmode, const char *name, prs_struct *ps, int depth, STRING2 *str) { - int i; + unsigned int i; char *q = prs_mem_get(ps, str->str_max_len); if (q == NULL) return False; @@ -1035,7 +1035,7 @@ BOOL prs_unistr3(BOOL charmode, const char *name, UNISTR3 *str, prs_struct *ps, BOOL prs_unistr(const char *name, prs_struct *ps, int depth, UNISTR *str) { - int len = 0; + unsigned int len = 0; unsigned char *p = (unsigned char *)str->buffer; uint8 *start; char *q; diff --git a/source3/rpc_parse/parse_sec.c b/source3/rpc_parse/parse_sec.c index dbd72e5250..47300e083a 100644 --- a/source3/rpc_parse/parse_sec.c +++ b/source3/rpc_parse/parse_sec.c @@ -159,7 +159,7 @@ BOOL sec_io_ace(const char *desc, SEC_ACE *psa, prs_struct *ps, int depth) NTSTATUS sec_ace_add_sid(TALLOC_CTX *ctx, SEC_ACE **new, SEC_ACE *old, unsigned *num, DOM_SID *sid, uint32 mask) { - int i = 0; + unsigned int i = 0; if (!ctx || !new || !old || !sid || !num) return NT_STATUS_INVALID_PARAMETER; @@ -185,7 +185,7 @@ NTSTATUS sec_ace_add_sid(TALLOC_CTX *ctx, SEC_ACE **new, SEC_ACE *old, unsigned NTSTATUS sec_ace_mod_sid(SEC_ACE *ace, size_t num, DOM_SID *sid, uint32 mask) { - int i = 0; + unsigned int i = 0; if (!ace || !sid) return NT_STATUS_INVALID_PARAMETER; @@ -202,14 +202,14 @@ NTSTATUS sec_ace_mod_sid(SEC_ACE *ace, size_t num, DOM_SID *sid, uint32 mask) delete SID from ACL ********************************************************************/ -NTSTATUS sec_ace_del_sid(TALLOC_CTX *ctx, SEC_ACE **new, SEC_ACE *old, size_t *num, DOM_SID *sid) +static NTSTATUS sec_ace_del_sid(TALLOC_CTX *ctx, SEC_ACE **new, SEC_ACE *old, uint32 *num, DOM_SID *sid) { - int i = 0; - int n_del = 0; + unsigned int i = 0; + unsigned int n_del = 0; if (!ctx || !new || !old || !sid || !num) return NT_STATUS_INVALID_PARAMETER; - if((new[0] = (SEC_ACE *) talloc_zero(ctx, *num * sizeof(SEC_ACE))) == 0) + if((new[0] = (SEC_ACE *) talloc_zero(ctx, (*num) * sizeof(SEC_ACE))) == 0) return NT_STATUS_NO_MEMORY; for (i = 0; i < *num; i ++) { @@ -283,7 +283,7 @@ SEC_ACL *dup_sec_acl(TALLOC_CTX *ctx, SEC_ACL *src) BOOL sec_io_acl(const char *desc, SEC_ACL **ppsa, prs_struct *ps, int depth) { - int i; + unsigned int i; uint32 old_offset; uint32 offset_acl_size; SEC_ACL *psa; @@ -407,7 +407,7 @@ BOOL sec_ace_equal(SEC_ACE *s1, SEC_ACE *s2) BOOL sec_acl_equal(SEC_ACL *s1, SEC_ACL *s2) { - int i, j; + unsigned int i, j; /* Trivial cases */ diff --git a/source3/rpc_parse/parse_srv.c b/source3/rpc_parse/parse_srv.c index bfa1a13be9..27763aa224 100644 --- a/source3/rpc_parse/parse_srv.c +++ b/source3/rpc_parse/parse_srv.c @@ -1665,8 +1665,8 @@ static BOOL srv_io_srv_sess_info_0(const char *desc, SRV_SESS_INFO_0 *ss0, prs_s return False; if (ss0->ptr_sess_info != 0) { - int i; - int num_entries = ss0->num_entries_read; + uint32 i; + uint32 num_entries = ss0->num_entries_read; if (num_entries > MAX_SESS_ENTRIES) { num_entries = MAX_SESS_ENTRIES; /* report this! */ @@ -1802,8 +1802,8 @@ static BOOL srv_io_srv_sess_info_1(const char *desc, SRV_SESS_INFO_1 *ss1, prs_s return False; if (ss1->ptr_sess_info != 0) { - int i; - int num_entries = ss1->num_entries_read; + uint32 i; + uint32 num_entries = ss1->num_entries_read; if (num_entries > MAX_SESS_ENTRIES) { num_entries = MAX_SESS_ENTRIES; /* report this! */ @@ -1944,7 +1944,7 @@ BOOL srv_io_q_net_sess_enum(const char *desc, SRV_Q_NET_SESS_ENUM *q_n, prs_stru if(!prs_uint32("sess_level", ps, depth, &q_n->sess_level)) return False; - if (q_n->sess_level != -1) { + if (q_n->sess_level != (uint32)-1) { if(!srv_io_srv_sess_ctr("sess_ctr", &q_n->ctr, ps, depth)) return False; } @@ -1976,7 +1976,7 @@ BOOL srv_io_r_net_sess_enum(const char *desc, SRV_R_NET_SESS_ENUM *r_n, prs_stru if(!prs_uint32("sess_level", ps, depth, &r_n->sess_level)) return False; - if (r_n->sess_level != -1) { + if (r_n->sess_level != (uint32)-1) { if(!srv_io_srv_sess_ctr("sess_ctr", &r_n->ctr, ps, depth)) return False; } @@ -2309,7 +2309,7 @@ BOOL srv_io_q_net_conn_enum(const char *desc, SRV_Q_NET_CONN_ENUM *q_n, prs_stru if(!prs_uint32("conn_level", ps, depth, &q_n->conn_level)) return False; - if (q_n->conn_level != -1) { + if (q_n->conn_level != (uint32)-1) { if(!srv_io_srv_conn_ctr("conn_ctr", &q_n->ctr, ps, depth)) return False; } @@ -2341,7 +2341,7 @@ BOOL srv_io_r_net_conn_enum(const char *desc, SRV_R_NET_CONN_ENUM *r_n, prs_str if(!prs_uint32("conn_level", ps, depth, &r_n->conn_level)) return False; - if (r_n->conn_level != -1) { + if (r_n->conn_level != (uint32)-1) { if(!srv_io_srv_conn_ctr("conn_ctr", &r_n->ctr, ps, depth)) return False; } @@ -2573,7 +2573,7 @@ BOOL srv_io_q_net_file_enum(const char *desc, SRV_Q_NET_FILE_ENUM *q_n, prs_stru if(!prs_uint32("file_level", ps, depth, &q_n->file_level)) return False; - if (q_n->file_level != -1) { + if (q_n->file_level != (uint32)-1) { if(!srv_io_srv_file_ctr("file_ctr", &q_n->ctr, ps, depth)) return False; } @@ -3271,7 +3271,7 @@ BOOL srv_io_q_net_disk_enum(const char *desc, SRV_Q_NET_DISK_ENUM *q_n, prs_stru BOOL srv_io_r_net_disk_enum(const char *desc, SRV_R_NET_DISK_ENUM *r_n, prs_struct *ps, int depth) { - int i; + unsigned int i; uint32 entries_read, entries_read2, entries_read3; if (r_n == NULL) |