/*******************************************************************
reads or writes a structure.
********************************************************************/
char* samr_io_q_open_policy(BOOL io, SAMR_Q_OPEN_POLICY *q_u, char *q, char *base, int align, int depth)
{
	if (q_u == NULL) return NULL;

	DEBUG(5,("%s%04x samr_io_q_open_policy\n", tab_depth(depth), PTR_DIFF(q, base)));
	depth++;

	q = align_offset(q, base, align);

	DBG_RW_IVAL("ptr_srv_name", depth, base, io, q, q_u->ptr_srv_name); q += 4;
	q = smb_io_unistr2(io, &(q_u->uni_srv_name), q, base, align, depth); 

	q = align_offset(q, base, align);

	DBG_RW_IVAL("unknown_0   ", depth, base, io, q, q_u->unknown_0   ); q += 4;

	return q;
}
/*******************************************************************
reads or writes a structure.
********************************************************************/
char* samr_io_r_lookup_rids(BOOL io, SAMR_R_LOOKUP_RIDS *r_u, char *q, char *base, int align, int depth)
{
	if (r_u == NULL) return NULL;

	DEBUG(5,("%s%04x samr_io_r_lookup_rids\n", tab_depth(depth), PTR_DIFF(q, base)));
	depth++;

	q = align_offset(q, base, align);

	DBG_RW_IVAL("num_entries ", depth, base, io, q, r_u->num_entries ); q += 4;
	DBG_RW_IVAL("undoc_buffer", depth, base, io, q, r_u->undoc_buffer); q += 4;
	DBG_RW_IVAL("num_entries2", depth, base, io, q, r_u->num_entries2); q += 4;

	q = smb_io_dom_rid3(io, &(r_u->dom_rid[0]), q, base, align, depth);

	DBG_RW_IVAL("num_entries3", depth, base, io, q, r_u->num_entries3); q += 4;

	DBG_RW_IVAL("status", depth, base, io, q, r_u->status); q += 4;

	return q;
}
/*******************************************************************
reads or writes a structure.
********************************************************************/
char* samr_io_q_lookup_rids(BOOL io, SAMR_Q_LOOKUP_RIDS *q_u, char *q, char *base, int align, int depth)
{
	if (q_u == NULL) return NULL;

	DEBUG(5,("%s%04x samr_io_q_lookup_rids\n", tab_depth(depth), PTR_DIFF(q, base)));
	depth++;

	q = align_offset(q, base, align);

	q = smb_io_pol_hnd(io, &(q_u->pol), q, base, align, depth); 
	q = align_offset(q, base, align);

	DBG_RW_IVAL("num_rids1", depth, base, io, q, q_u->num_rids1); q += 4;
	DBG_RW_IVAL("rid      ", depth, base, io, q, q_u->rid      ); q += 4;
	DBG_RW_IVAL("ptr      ", depth, base, io, q, q_u->ptr      ); q += 4;
	DBG_RW_IVAL("num_rids2", depth, base, io, q, q_u->num_rids2); q += 4;

	q = smb_io_unihdr (io, &(q_u->hdr_mach_acct), q, base, align, depth); 
	q = smb_io_unistr2(io, &(q_u->uni_mach_acct), q, base, align, depth); 

	q = align_offset(q, base, align);

	return q;
}
/*******************************************************************
reads or writes a structure.
********************************************************************/
char* samr_io_r_open_secret(BOOL io, SAMR_R_OPEN_SECRET *r_u, char *q, char *base, int align, int depth)
{
	if (r_u == NULL) return NULL;

	DEBUG(5,("%s%04x samr_io_r_open_secret\n", tab_depth(depth), PTR_DIFF(q, base)));
	depth++;

	q = align_offset(q, base, align);

	q = smb_io_pol_hnd(io, &(r_u->pol), q, base, align, depth); 
	q = align_offset(q, base, align);

	DBG_RW_IVAL("status", depth, base, io, q, r_u->status); q += 4;

	return q;
}
Beispiel #5
0
/*******************************************************************
 do IO on a uint32.
 ********************************************************************/
BOOL io_uint32(char *name, io_struct *ps, int depth, uint32 *data32, unsigned flags)
{
	char *q;

	if (!(flags & PARSE_SCALARS)) return True;

	if (!io_align(ps, 4)) return False;

	q = io_mem_get(ps, sizeof(uint32));
	if (q == NULL) return False;

	DBG_RW_IVAL(name, depth, ps->data_offset, ps->io, ps->bigendian_data, q, *data32)
	ps->data_offset += sizeof(uint32);

	return True;
}
/*******************************************************************
reads or writes a structure.
********************************************************************/
char* samr_io_q_unknown_22(BOOL io, SAMR_Q_UNKNOWN_22 *q_u, char *q, char *base, int align, int depth)
{
	if (q_u == NULL) return NULL;

	DEBUG(5,("%s%04x samr_io_q_unknown_22\n", tab_depth(depth), PTR_DIFF(q, base)));
	depth++;

	q = align_offset(q, base, align);

	q = smb_io_pol_hnd(io, &(q_u->pol), q, base, align, depth); 
	q = align_offset(q, base, align);

	DBG_RW_IVAL("unknown_id_0", depth, base, io, q, q_u->unknown_id_0); q += 4;

	q = align_offset(q, base, align);

	return q;
}
/*******************************************************************
reads or writes a structure.
********************************************************************/
char* samr_io_q_open_secret(BOOL io, SAMR_Q_OPEN_SECRET *q_u, char *q, char *base, int align, int depth)
{
	if (q_u == NULL) return NULL;

	DEBUG(5,("%s%04x samr_io_q_open_secret\n", tab_depth(depth), PTR_DIFF(q, base)));
	depth++;

	q = align_offset(q, base, align);

	q = smb_io_pol_hnd(io, &(q_u->pol), q, base, align, depth); 
	q = align_offset(q, base, align);

	DBG_RW_IVAL("unknown_0", depth, base, io, q, q_u->unknown_0); q += 4;

	q = smb_io_dom_sid(io, &(q_u->dom_sid), q, base, align, depth); 
	q = align_offset(q, base, align);

	return q;
}
/*******************************************************************
reads or writes a structure.
********************************************************************/
char* samr_io_q_unknown_32(BOOL io, SAMR_Q_UNKNOWN_32 *q_u, char *q, char *base, int align, int depth)
{
	if (q_u == NULL) return NULL;

	DEBUG(5,("%s%04x samr_io_q_unknown_32\n", tab_depth(depth), PTR_DIFF(q, base)));
	depth++;

	q = align_offset(q, base, align);

	q = smb_io_pol_hnd(io, &(q_u->pol), q, base, align, depth); 
	q = align_offset(q, base, align);

	q = smb_io_unihdr (io, &(q_u->hdr_mach_acct), q, base, align, depth); 
	q = smb_io_unistr2(io, &(q_u->uni_mach_acct), q, base, align, depth); 

	q = align_offset(q, base, align);

	DBG_RW_IVAL("unknown_0", depth, base, io, q, q_u->unknown_0); q += 4;
	DBG_RW_SVAL("unknown_1", depth, base, io, q, q_u->unknown_1); q += 2;
	DBG_RW_SVAL("unknown_2", depth, base, io, q, q_u->unknown_2); q += 2;

	return q;
}
/*******************************************************************
reads or writes a structure.
********************************************************************/
char* samr_io_r_unknown_24(BOOL io, SAMR_R_UNKNOWN_24 *r_u, char *q, char *base, int align, int depth)
{
	if (r_u == NULL) return NULL;

	DEBUG(5,("%s%04x samr_io_r_unknown_24\n", tab_depth(depth), PTR_DIFF(q, base)));
	depth++;

	q = align_offset(q, base, align);

	DBG_RW_IVAL("ptr         ", depth, base, io, q, r_u->ptr         ); q += 4;
	DBG_RW_SVAL("unknown_0   ", depth, base, io, q, r_u->unknown_0   ); q += 2;
	DBG_RW_SVAL("unknown_1   ", depth, base, io, q, r_u->unknown_1   ); q += 2;
	DBG_RW_PCVAL(False, "padding_0   ", depth, base, io, q, r_u->padding_0   , sizeof(r_u->padding_0)); q += sizeof(r_u->padding_0);

	q = smb_io_time(io, &(r_u->expiry), q, base, align, depth); 
	DBG_RW_PCVAL(False, "padding_1   ", depth, base, io, q, r_u->padding_1   , sizeof(r_u->padding_1)); q += sizeof(r_u->padding_1);

	q = smb_io_unihdr (io, &(r_u->hdr_mach_acct), q, base, align, depth); 
	DBG_RW_IVAL("padding_2   ", depth, base, io, q, r_u->padding_2   ); q += 4;

	DBG_RW_IVAL("ptr_1       ", depth, base, io, q, r_u->ptr_1       ); q += 4;
	DBG_RW_PCVAL(False, "padding_3   ", depth, base, io, q, r_u->padding_3   , sizeof(r_u->padding_3)); q += sizeof(r_u->padding_3);
	DBG_RW_IVAL("padding_4   ", depth, base, io, q, r_u->padding_4   ); q += 4;

	DBG_RW_IVAL("ptr_2       ", depth, base, io, q, r_u->ptr_2       ); q += 4;
	DBG_RW_IVAL("padding_5   ", depth, base, io, q, r_u->padding_5   ); q += 4;

	DBG_RW_IVAL("ptr_3       ", depth, base, io, q, r_u->ptr_3       ); q += 4;
	DBG_RW_PCVAL(False, "padding_6   ", depth, base, io, q, r_u->padding_6   , sizeof(r_u->padding_6)); q += sizeof(r_u->padding_6);

	DBG_RW_IVAL("unknown_id_0", depth, base, io, q, r_u->unknown_id_0); q += 4;
	DBG_RW_SVAL("unknown_2   ", depth, base, io, q, r_u->unknown_2   ); q += 2;
	DBG_RW_IVAL("unknown_3   ", depth, base, io, q, r_u->unknown_3   ); q += 4;
	DBG_RW_SVAL("unknown_4   ", depth, base, io, q, r_u->unknown_4   ); q += 2;
	DBG_RW_SVAL("unknown_5   ", depth, base, io, q, r_u->unknown_5   ); q += 2;

	DBG_RW_PCVAL(False, "padding_7   ", depth, base, io, q, r_u->padding_7   , sizeof(r_u->padding_7)); q += sizeof(r_u->padding_7);
	DBG_RW_IVAL("padding_8   ", depth, base, io, q, r_u->padding_8   ); q += 4;
	
	q = smb_io_unistr2(io, &(r_u->uni_mach_acct), q, base, align, depth); 
	q = align_offset(q, base, align);

	DBG_RW_PCVAL(False, "padding_9   ", depth, base, io, q, r_u->padding_9   , sizeof(r_u->padding_9)); q += sizeof(r_u->padding_9);

	DBG_RW_IVAL("status", depth, base, io, q, r_u->status); q += 4;

	return q;
}