- signed / unsigned issues.
/* macros for reading / writing arrays */
#define SMBMACRO(macro,buf,pos,val,len,size) \
-{ int l; for (l = 0; l < (len); l++) (val)[l] = macro((buf), (pos) + (size)*l); }
+{ uint32 l; for (l = 0; l < (uint32)(len); l++) (val)[l] = macro((buf), (pos) + (size)*l); }
#define SSMBMACRO(macro,buf,pos,val,len,size) \
-{ int l; for (l = 0; l < (len); l++) macro((buf), (pos) + (size)*l, (val)[l]); }
+{ uint32 l; for (l = 0; l < (uint32)(len); l++) macro((buf), (pos) + (size)*l, (val)[l]); }
/* reads multiple data from an SMB buffer */
#define PCVAL(buf,pos,val,len) SMBMACRO(CVAL,buf,pos,val,len,1)
#define DBG_RW_PCVAL(charmode,string,depth,base,read,inbuf,outbuf,len) \
RW_PCVAL(read,inbuf,outbuf,len) \
- DEBUG(5,("%s%04x %s: ", \
+ DEBUG(10,("%s%04x %s: ", \
tab_depth(depth), base,string)); \
- if (charmode) print_asc(5, (unsigned char*)(outbuf), (len)); else \
- { int idx; for (idx = 0; idx < len; idx++) { DEBUGADD(5,("%02x ", (outbuf)[idx])); } } \
- DEBUG(5,("\n"));
+ if (charmode) print_asc(10, (unsigned char*)(outbuf), (len)); else \
+ { uint32 idx; for (idx = 0; idx < (uint32)(len); idx++) { DEBUGADD(10,("%02x ", (outbuf)[idx])); } } \
+ DEBUG(10,("\n"));
#define DBG_RW_PSVAL(charmode,string,depth,base,read,inbuf,outbuf,len) \
RW_PSVAL(read,inbuf,outbuf,len) \
- DEBUG(5,("%s%04x %s: ", \
+ DEBUG(10,("%s%04x %s: ", \
tab_depth(depth), base,string)); \
- if (charmode) print_asc(5, (unsigned char*)(outbuf), 2*(len)); else \
- { int idx; for (idx = 0; idx < len; idx++) { DEBUGADD(5,("%04x ", (outbuf)[idx])); } } \
- DEBUG(5,("\n"));
+ if (charmode) print_asc(10, (unsigned char*)(outbuf), 2*(len)); else \
+ { uint32 idx; for (idx = 0; idx < (uint32)(len); idx++) { DEBUGADD(10,("%04x ", (outbuf)[idx])); } } \
+ DEBUG(10,("\n"));
#define DBG_RW_PIVAL(charmode,string,depth,base,read,inbuf,outbuf,len) \
RW_PIVAL(read,inbuf,outbuf,len) \
- DEBUG(5,("%s%04x %s: ", \
+ DEBUG(10,("%s%04x %s: ", \
tab_depth(depth), base,string)); \
- if (charmode) print_asc(5, (unsigned char*)(outbuf), 4*(len)); else \
- { int idx; for (idx = 0; idx < len; idx++) { DEBUGADD(5,("%08x ", (outbuf)[idx])); } } \
- DEBUG(5,("\n"));
+ if (charmode) print_asc(10, (unsigned char*)(outbuf), 4*(len)); else \
+ { uint32 idx; for (idx = 0; idx < (uint32)(len); idx++) { DEBUGADD(10,("%08x ", (outbuf)[idx])); } } \
+ DEBUG(10,("\n"));
#define DBG_RW_CVAL(string,depth,base,read,inbuf,outbuf) \
RW_CVAL(read,inbuf,outbuf,0) \
- DEBUG(5,("%s%04x %s: %02x\n", \
+ DEBUG(10,("%s%04x %s: %02x\n", \
tab_depth(depth), base, string, outbuf));
#define DBG_RW_SVAL(string,depth,base,read,inbuf,outbuf) \
RW_SVAL(read,inbuf,outbuf,0) \
- DEBUG(5,("%s%04x %s: %04x\n", \
+ DEBUG(10,("%s%04x %s: %04x\n", \
tab_depth(depth), base, string, outbuf));
#define DBG_RW_IVAL(string,depth,base,read,inbuf,outbuf) \
RW_IVAL(read,inbuf,outbuf,0) \
- DEBUG(5,("%s%04x %s: %08x\n", \
+ DEBUG(10,("%s%04x %s: %08x\n", \
tab_depth(depth), base, string, outbuf));
void hmac_md5_init_limK_to_64(const uchar* key, int key_len,
HMACMD5Context *ctx);
void hmac_md5_update(const uchar* text, int text_len, HMACMD5Context *ctx);
-void hmac_md5_final(caddr_t digest, HMACMD5Context *ctx);
+void hmac_md5_final(uchar *digest, HMACMD5Context *ctx);
/*The following definitions come from lib/interface.c */
BOOL mem_buf_init(struct mem_buf **buf, uint32 margin);
void mem_buf_free(struct mem_buf **buf);
void mem_free_data(struct mem_buf *buf);
-BOOL mem_realloc_data(struct mem_buf *buf, int new_size);
+BOOL mem_realloc_data(struct mem_buf *buf, size_t new_size);
BOOL mem_grow_data(struct mem_buf **buf, BOOL io, int new_size, BOOL force_grow);
uint32 mem_buf_len(struct mem_buf *buf);
char *mem_data(struct mem_buf **buf, uint32 offset);
BOOL sid_front_equal(const DOM_SID *sid1, const DOM_SID *sid2);
BOOL sid_equal(const DOM_SID *sid1, const DOM_SID *sid2);
int sid_size(const DOM_SID *sid);
+DOM_SID *sid_dup(DOM_SID *src);
/*The following definitions come from lib/util_sock.c */
char *safe_strcat(char *dest, const char *src, size_t maxlength);
char *StrCpy(char *dest,const char *src);
char *StrnCpy(char *dest,const char *src,size_t n);
-char *strncpyn(char *dest, const char *src,size_t n, char c);
+char *strncpyn(char *dest, char *src,size_t n, char c);
size_t strhex_to_str(char *p, size_t len, const char *strhex);
BOOL in_list(char *s,char *list,BOOL casesensitive);
BOOL string_init(char **dest,const char *src);
/*The following definitions come from lib/util_unistr.c */
char *ascii_to_unibuf(char *dest, const char *src, int maxlen);
-const char *unibuf_to_ascii(char *dest, const char *src, int maxlen);
+const char* unibuf_to_ascii(char *dest, const char *src, int maxlen);
void ascii_to_unistr(uint16 *dest, const char *src, int maxlen);
void unistr_to_ascii(char *dest, const uint16 *src, int len);
-void unistr2_to_ascii(char *dest, const UNISTR2 *str, int maxlen);
+void unistr2_to_ascii(char *dest, const UNISTR2 *str, size_t maxlen);
char *skip_unibuf(char *srcbuf, int len);
char *uni_strncpy(char *destbuf, const char *srcbuf, int len);
uint32 buffer2_to_uint32(const BUFFER2 *str);
-void buffer2_to_multistr(char *dest, const BUFFER2 *str, int maxlen);
+void buffer2_to_multistr(char *dest, const BUFFER2 *str, size_t maxlen);
/*The following definitions come from libsmb/clientgen.c */
uint32 status);
BOOL lsa_io_r_enum_trust_dom(char *desc, LSA_R_ENUM_TRUST_DOM *r_e, prs_struct *ps, int depth);
BOOL lsa_io_r_query(char *desc, LSA_R_QUERY_INFO *r_q, prs_struct *ps, int depth);
-BOOL make_lsa_sid_enum(LSA_SID_ENUM *sen, int num_entries, DOM_SID **sids);
+BOOL make_lsa_sid_enum(LSA_SID_ENUM *sen, uint32 num_entries, DOM_SID **sids);
BOOL make_q_lookup_sids(LSA_Q_LOOKUP_SIDS *q_l, POLICY_HND *hnd,
int num_sids, DOM_SID **sids,
uint16 level);
BOOL lsa_io_q_lookup_sids(char *desc, LSA_Q_LOOKUP_SIDS *q_s, prs_struct *ps, int depth);
BOOL lsa_io_r_lookup_sids(char *desc, LSA_R_LOOKUP_SIDS *r_s, prs_struct *ps, int depth);
BOOL make_q_lookup_names(LSA_Q_LOOKUP_NAMES *q_l, POLICY_HND *hnd,
- int num_names, char **names);
+ uint32 num_names, char **names);
BOOL lsa_io_q_lookup_names(char *desc, LSA_Q_LOOKUP_NAMES *q_r, prs_struct *ps, int depth);
BOOL lsa_io_r_lookup_names(char *desc, LSA_R_LOOKUP_NAMES *r_r, prs_struct *ps, int depth);
BOOL make_lsa_q_close(LSA_Q_CLOSE *q_c, POLICY_HND *hnd);
BOOL make_unistr(UNISTR *str, char *buf);
BOOL smb_io_unistr(char *desc, UNISTR *uni, prs_struct *ps, int depth);
BOOL make_buffer3_uint32(BUFFER3 *str, uint32 val);
-BOOL make_buffer3_str(BUFFER3 *str, char *buf, int len);
+BOOL make_buffer3_str(BUFFER3 *str, const char *buf, int len);
BOOL make_buffer3_hex(BUFFER3 *str, char *buf);
BOOL make_buffer3_bytes(BUFFER3 *str, uint8 *buf, int len);
BOOL smb_io_buffer3(char *desc, BUFFER3 *buf3, prs_struct *ps, int depth);
BOOL make_srv_share_info1(SH_INFO_1 *sh1, char *net_name, uint32 type, char *remark);
BOOL make_srv_share_info2_str(SH_INFO_2_STR *sh2,
char *net_name, char *remark,
- char *path, char *passwd);
+ char *path, char *pass);
BOOL make_srv_share_info2(SH_INFO_2 *sh2,
char *net_name, uint32 type, char *remark,
uint32 perms, uint32 max_uses, uint32 num_uses,
- char *path, char *passwd);
+ char *path, char *pass);
BOOL make_srv_q_net_share_enum(SRV_Q_NET_SHARE_ENUM *q_n,
char *srv_name,
uint32 share_level, SRV_SHARE_INFO_CTR *ctr,
uint32 crc32_calc_buffer( uint32 count, char *buffer)
{
uint32 crc=0xffffffff;
- int i;
+ uint32 i;
for(i=0;i<count;i++)
{
crc = (crc>>8) ^ CRCTable[(buffer[i] ^ crc) & 0xff];
{
DIR *dp = opendir(name);
pstring fullname;
- int len_left;
- int fullname_len;
+ size_t len_left;
+ size_t fullname_len;
char *pos;
pstrcpy(fullname, name);
/***********************************************************************
finish off hmac_md5 "inner" buffer and generate outer one.
***********************************************************************/
-void hmac_md5_final(caddr_t digest, HMACMD5Context *ctx)
+void hmac_md5_final(uchar *digest, HMACMD5Context *ctx)
{
struct MD5Context ctx_o;
buf->data_size = size + buf->margin;
buf->data_used = size;
- buf->data = malloc(buf->data_size);
+ buf->data = (char*)malloc(buf->data_size);
if (buf->data == NULL && size != 0)
{
if ((*buf) == NULL)
{
- (*buf) = malloc(sizeof(**buf));
+ (*buf) = (struct mem_buf*)malloc(sizeof(**buf));
if ((*buf) != NULL)
{
mem_init((*buf), margin);
/*******************************************************************
reallocate a memory buffer, including a safety margin
********************************************************************/
-BOOL mem_realloc_data(struct mem_buf *buf, int new_size)
+BOOL mem_realloc_data(struct mem_buf *buf, size_t new_size)
{
char *new_data;
return True;
}
- new_data = Realloc(buf->data, new_size + buf->margin);
+ new_data = (char*)Realloc(buf->data, new_size + buf->margin);
if (new_data != NULL)
{
}
return sid->num_auths * sizeof(uint32) + 8;
}
+
+
+/*****************************************************************
+ Duplicates a sid - mallocs the target.
+*****************************************************************/
+
+DOM_SID *sid_dup(DOM_SID *src)
+{
+ DOM_SID *dst;
+
+ if(!src)
+ return NULL;
+
+ if((dst = (DOM_SID*)malloc(sizeof(DOM_SID))) != NULL) {
+ memset(dst, '\0', sizeof(DOM_SID));
+ sid_copy( dst, src);
+ }
+
+ return dst;
+}
like strncpy but copies up to the character marker. always null terminates.
returns a pointer to the character marker in the source string (src).
****************************************************************************/
-char *strncpyn(char *dest, const char *src,size_t n, char c)
+char *strncpyn(char *dest, char *src,size_t n, char c)
{
char *p;
size_t str_len;
/*******************************************************************
Pull an ASCII string out of a UNICODE buffer (little endian).
********************************************************************/
-const char *unibuf_to_ascii(char *dest, const char *src, int maxlen)
+
+const char* unibuf_to_ascii(char *dest, const char *src, int maxlen)
{
char *destend = dest + maxlen;
register char c;
Convert a UNISTR2 structure to an ASCII string
********************************************************************/
-void unistr2_to_ascii(char *dest, const UNISTR2 *str, int maxlen)
+void unistr2_to_ascii(char *dest, const UNISTR2 *str, size_t maxlen)
{
char *destend;
const uint16 *src;
- int len;
+ size_t len;
register uint16 c;
src = str->buffer;
{
if (str->buf_len == 4)
{
- const char *src = str->buffer;
+ const uchar *src = str->buffer;
return IVAL(src, 0);
}
else
/*******************************************************************
Convert a 'multi-string' buffer to space-separated ASCII.
********************************************************************/
-
-void buffer2_to_multistr(char *dest, const BUFFER2 *str, int maxlen)
+void buffer2_to_multistr(char *dest, const BUFFER2 *str, size_t maxlen)
{
char *destend;
- const char *src;
- int len;
+ const uchar *src;
+ size_t len;
register uint16 c;
src = str->buffer;
}
if (valid_response)
{
- int i;
+ uint32 i;
for (i = 0; i < r_l.num_entries; i++)
{
if (t_rids[i].rid_idx >= ref.num_ref_doms_1 &&
}
if (valid_response)
{
- int i;
+ uint32 i;
for (i = 0; i < t_names.num_entries; i++)
{
if (t_names.name[i].domain_idx >= ref.num_ref_doms_1)
if (p)
{
/* check that the returned policy handle is all zeros */
- int i;
+ uint32 i;
valid_close = True;
for (i = 0; i < sizeof(r_c.pol.data); i++)
if (p)
{
valid_query = True;
- unibuf_to_ascii(type, r_o.uni_type.buffer,
+ unibuf_to_ascii(type, (const char*)r_o.uni_type.buffer,
MIN(r_o.uni_type.buf_len, sizeof(fstring)-1));
(*unk_0) = r_o.unknown_0;
(*unk_1) = r_o.unknown_1;
if (p)
{
/* check that the returned policy handle is all zeros */
- int i;
+ uint32 i;
valid_close = True;
for (i = 0; i < sizeof(r_c.pol.data); i++)
if (p)
{
/* check that the returned policy handle is all zeros */
- int i;
+ uint32 i;
valid_close = True;
for (i = 0; i < sizeof(r_c.pol.data); i++)
********************************************************************/
static BOOL lsa_io_dom_r_ref(char *desc, DOM_R_REF *r_r, prs_struct *ps, int depth)
{
- int i, s, n;
+ uint32 i, s, n;
prs_debug(ps, depth, desc, "smb_io_dom_r_ref");
depth++;
/*******************************************************************
makes a LSA_SID_ENUM structure.
********************************************************************/
-BOOL make_lsa_sid_enum(LSA_SID_ENUM *sen, int num_entries, DOM_SID **sids)
+BOOL make_lsa_sid_enum(LSA_SID_ENUM *sen, uint32 num_entries, DOM_SID **sids)
{
- int i, i2;
+ uint32 i, i2;
if (sen == NULL || sids == NULL) return False;
DEBUG(5,("make_lsa_sid_enum\n"));
static BOOL lsa_io_sid_enum(char *desc, LSA_SID_ENUM *sen,
prs_struct *ps, int depth)
{
- int i;
+ uint32 i;
if (sen == NULL) return False;
static BOOL lsa_io_trans_names(char *desc, LSA_TRANS_NAME_ENUM *trn,
prs_struct *ps, int depth)
{
- int i;
+ uint32 i;
if (trn == NULL) return False;
makes a structure.
********************************************************************/
BOOL make_q_lookup_names(LSA_Q_LOOKUP_NAMES *q_l, POLICY_HND *hnd,
- int num_names, char **names)
+ uint32 num_names, char **names)
{
- int i;
+ uint32 i;
if (q_l == NULL) return False;
DEBUG(5,("make_q_lookup_names\n"));
********************************************************************/
BOOL lsa_io_q_lookup_names(char *desc, LSA_Q_LOOKUP_NAMES *q_r, prs_struct *ps, int depth)
{
- int i;
+ uint32 i;
if (q_r == NULL) return False;
********************************************************************/
BOOL lsa_io_r_lookup_names(char *desc, LSA_R_LOOKUP_NAMES *r_r, prs_struct *ps, int depth)
{
- int i;
+ uint32 i;
if (r_r == NULL) return False;
/*******************************************************************
creates a BUFFER3 structure.
********************************************************************/
-BOOL make_buffer3_str(BUFFER3 *str, char *buf, int len)
+BOOL make_buffer3_str(BUFFER3 *str, const char *buf, int len)
{
ZERO_STRUCTP(str);
str->buf_len = len * 2;
/* store the string (little endian buffer) */
- ascii_to_unibuf(str->buffer, buf, str->buf_len);
+ ascii_to_unibuf((char*)str->buffer, buf, str->buf_len);
return True;
}
str->undoc = 0;
/* store the string */
- ascii_to_unibuf(str->buffer, buf, MIN(str->buf_len, sizeof(str->buffer)-1));
+ ascii_to_unibuf((char*)str->buffer, buf,
+ MIN(str->buf_len, sizeof(str->buffer)-1));
return True;
}
BOOL make_r_trust_dom(NET_R_TRUST_DOM_LIST *r_t,
uint32 num_doms, char *dom_name)
{
- int i = 0;
+ uint32 i = 0;
if (r_t == NULL) return False;
********************************************************************/
BOOL net_io_r_trust_dom(char *desc, NET_R_TRUST_DOM_LIST *r_t, prs_struct *ps, int depth)
{
- int i;
+ uint32 i;
if (r_t == NULL) return False;
prs_debug(ps, depth, desc, "net_io_r_trust_dom");
{
/* only cope with one "other" sid, right now. */
/* need to count the number of space-delimited sids */
- int i;
+ uint32 i;
int num_other_sids = 0;
int len_user_name = strlen(user_name );
********************************************************************/
static BOOL net_io_user_info3(char *desc, NET_USER_INFO_3 *usr, prs_struct *ps, int depth)
{
- int i;
+ uint32 i;
if (usr == NULL) return False;
SAM_ACCOUNT_INFO *info, prs_struct *ps, int depth)
{
BUFHDR2 hdr_priv_data;
- int i;
+ uint32 i;
if (info == NULL) return False;
********************************************************************/
static BOOL net_io_sam_group_mem_info(char *desc, SAM_GROUP_MEM_INFO *info, prs_struct *ps, int depth)
{
- int i;
+ uint32 i;
fstring tmp;
if (info == NULL) return False;
********************************************************************/
static BOOL net_io_sam_alias_mem_info(char *desc, SAM_ALIAS_MEM_INFO *info, prs_struct *ps, int depth)
{
- int i;
+ uint32 i;
fstring tmp;
if (info == NULL) return False;
BOOL net_io_r_sam_sync(char *desc, uint8 sess_key[16],
NET_R_SAM_SYNC *r_s, prs_struct *ps, int depth)
{
- int i;
+ uint32 i;
if (r_s == NULL) return False;
dump_data(100, sess_key, 16);
dump_data(100, q, 68);
#endif
- SamOEMhash(q, sess_key, 2);
+ SamOEMhash((uchar*)q, sess_key, 2);
#ifdef DEBUG_PASSWORD
dump_data(100, q, 68);
#endif
}
RW_SVAL(ps->io, q, str->buffer[i],0);
}
- while ((i < sizeof(str->buffer) / sizeof(str->buffer[0])) &&
+ while ((((size_t)i) < sizeof(str->buffer) / sizeof(str->buffer[0])) &&
(str->buffer[i] != 0));
********************************************************************/
BOOL sec_io_acl(char *desc, SEC_ACL *t, prs_struct *ps, int depth)
{
- int i;
+ uint32 i;
uint32 old_offset;
uint32 offset_acl_size;
if (ps->io && t->num_aces != 0)
{
/* reading */
- t->ace = malloc(sizeof(t->ace[0]) * t->num_aces);
+ t->ace = (SEC_ACE*)malloc(sizeof(t->ace[0]) * t->num_aces);
ZERO_STRUCTP(t->ace);
}
if (ps->io)
{
/* reading */
- t->dacl = malloc(sizeof(*t->dacl));
+ t->dacl = (SEC_ACL*)malloc(sizeof(*t->dacl));
ZERO_STRUCTP(t->dacl);
}
if (ps->io)
{
/* reading */
- t->sacl = malloc(sizeof(*t->sacl));
+ t->sacl = (SEC_ACL*)malloc(sizeof(*t->sacl));
ZERO_STRUCTP(t->sacl);
}
if (ps->io)
{
/* reading */
- t->owner_sid = malloc(sizeof(*t->owner_sid));
+ t->owner_sid = (DOM_SID*)malloc(sizeof(*t->owner_sid));
ZERO_STRUCTP(t->owner_sid);
}
if (ps->io)
{
/* reading */
- t->grp_sid = malloc(sizeof(*t->grp_sid));
+ t->grp_sid = (DOM_SID*)malloc(sizeof(*t->grp_sid));
ZERO_STRUCTP(t->grp_sid);
}
if (sec->len != 0 && ps->io)
{
/* reading */
- sec->sec = malloc(sizeof(*sec->sec));
+ sec->sec = (SEC_DESC*)malloc(sizeof(*sec->sec));
ZERO_STRUCTP(sec->sec);
if (sec->sec == NULL)
if (ctr->ptr_share_info != 0)
{
- int i;
- int num_entries = ctr->num_entries_read;
+ uint32 i;
+ uint32 num_entries = ctr->num_entries_read;
if (num_entries > MAX_SHARE_ENTRIES)
{
num_entries = MAX_SHARE_ENTRIES; /* report this! */
********************************************************************/
BOOL make_srv_share_info2_str(SH_INFO_2_STR *sh2,
char *net_name, char *remark,
- char *path, char *passwd)
+ char *path, char *pass)
{
if (sh2 == NULL) return False;
make_unistr2(&(sh2->uni_netname), net_name, strlen(net_name)+1);
make_unistr2(&(sh2->uni_remark ), remark , strlen(remark )+1);
make_unistr2(&(sh2->uni_path ), path , strlen(path )+1);
- make_unistr2(&(sh2->uni_passwd ), passwd , strlen(passwd )+1);
+ make_unistr2(&(sh2->uni_passwd ), pass , strlen(pass )+1);
return True;
}
BOOL make_srv_share_info2(SH_INFO_2 *sh2,
char *net_name, uint32 type, char *remark,
uint32 perms, uint32 max_uses, uint32 num_uses,
- char *path, char *passwd)
+ char *path, char *pass)
{
if (sh2 == NULL) return False;
sh2->num_uses = num_uses;
sh2->type = type;
sh2->ptr_path = path != NULL ? 1 : 0;
- sh2->ptr_passwd = passwd != NULL ? 1 : 0;
+ sh2->ptr_passwd = pass != NULL ? 1 : 0;
return True;
}
if (ctr->ptr_share_info != 0)
{
- int i;
- int num_entries = ctr->num_entries_read;
+ uint32 i;
+ uint32 num_entries = ctr->num_entries_read;
if (num_entries > MAX_SHARE_ENTRIES)
{
num_entries = MAX_SHARE_ENTRIES; /* report this! */
prs_uint32("share_level", ps, depth, &(q_n->share_level ));
- if (q_n->share_level != -1)
+ if (((int)q_n->share_level) != -1)
{
srv_io_srv_share_ctr("share_ctr", q_n->ctr, ps, depth);
}
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! */
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! */
prs_uint32("sess_level", ps, depth, &(q_n->sess_level ));
- if (q_n->sess_level != -1)
+ if (((int)q_n->sess_level) != -1)
{
srv_io_srv_sess_ctr("sess_ctr", q_n->ctr, ps, depth);
}
prs_uint32("sess_level", ps, depth, &(r_n->sess_level));
- if (r_n->sess_level != -1)
+ if (((int)r_n->sess_level) != -1)
{
srv_io_srv_sess_ctr("sess_ctr", r_n->ctr, ps, depth);
}
if (ss0->ptr_conn_info != 0)
{
- int i;
- int num_entries = ss0->num_entries_read;
+ uint32 i;
+ uint32 num_entries = ss0->num_entries_read;
if (num_entries > MAX_CONN_ENTRIES)
{
num_entries = MAX_CONN_ENTRIES; /* report this! */
if (ss1->ptr_conn_info != 0)
{
- int i;
- int num_entries = ss1->num_entries_read;
+ uint32 i;
+ uint32 num_entries = ss1->num_entries_read;
if (num_entries > MAX_CONN_ENTRIES)
{
num_entries = MAX_CONN_ENTRIES; /* report this! */
prs_uint32("conn_level", ps, depth, &(q_n->conn_level ));
- if (q_n->conn_level != -1)
+ if (((int)q_n->conn_level) != -1)
{
srv_io_srv_conn_ctr("conn_ctr", q_n->ctr, ps, depth);
}
prs_uint32("conn_level", ps, depth, &(r_n->conn_level));
- if (r_n->conn_level != -1)
+ if (((int)r_n->conn_level) != -1)
{
srv_io_srv_conn_ctr("conn_ctr", r_n->ctr, ps, depth);
}
prs_uint32("ptr_file_fl3", ps, depth, &(fl3->ptr_file_info));
if (fl3->ptr_file_info != 0)
{
- int i;
- int num_entries = fl3->num_entries_read;
+ uint32 i;
+ uint32 num_entries = fl3->num_entries_read;
+
if (num_entries > MAX_FILE_ENTRIES)
{
num_entries = MAX_FILE_ENTRIES; /* report this! */
prs_uint32("file_id ", ps, depth, &(q_n->file_id ));
prs_uint32("file_level", ps, depth, &(q_n->file_level));
- if (q_n->file_level != -1)
+ if (((int)q_n->file_level) != -1)
{
srv_io_srv_file_ctr("file_ctr", q_n->ctr, ps, depth);
}
if (q_s->ptr_argv != 0)
{
- int i;
+ uint32 i;
prs_uint32("argc2 ", ps, depth, &(q_s->argc2));
********************************************************************/
BOOL svc_io_r_enum_svcs_status(char *desc, SVC_R_ENUM_SVCS_STATUS *svc, prs_struct *ps, int depth)
{
- int i;
+ uint32 i;
if (svc == NULL) return False;
prs_debug(ps, depth, desc, "svc_io_r_enum_svcs_status");
new_offset = ps->offset;
ps->offset = buf_offset;
- svc->svcs = Realloc(NULL, svc->num_svcs * sizeof(ENUM_SRVC_STATUS));
+ svc->svcs = (ENUM_SRVC_STATUS*)Realloc(NULL,
+ svc->num_svcs * sizeof(ENUM_SRVC_STATUS));
if (svc->svcs == NULL)
{
BOOL res = True;
BOOL res1;
BOOL res2;
- int i;
+ uint32 i;
POLICY_HND hnd_secret;
fstring secret_name;
/* close the session */
cli_nt_session_close(smb_cli, nt_pipe_fnum);
- if (res2 && nt_decrypt_string2(&secret, &enc_secret, smb_cli->pwd.smb_nt_pwd))
+ if (res2 && nt_decrypt_string2(&secret, &enc_secret, (char*)(smb_cli->pwd.smb_nt_pwd)))
{
report(out_hnd, "\tValue : ");
for (i = 0; i < secret.str_str_len; i++)