summaryrefslogtreecommitdiff
path: root/source3/rpc_parse
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r--source3/rpc_parse/parse_buffer.c2
-rw-r--r--source3/rpc_parse/parse_prs.c14
-rw-r--r--source3/rpc_parse/parse_sec.c6
-rw-r--r--source3/rpc_parse/parse_spoolss.c4
-rw-r--r--source3/rpc_parse/parse_srv.c5
5 files changed, 19 insertions, 12 deletions
diff --git a/source3/rpc_parse/parse_buffer.c b/source3/rpc_parse/parse_buffer.c
index c30ad487dd..e98822d46e 100644
--- a/source3/rpc_parse/parse_buffer.c
+++ b/source3/rpc_parse/parse_buffer.c
@@ -435,7 +435,7 @@ bool smb_io_relsecdesc(const char *desc, RPC_BUFFER *buffer, int depth, SEC_DESC
}
if (*secdesc != NULL) {
- buffer->string_at_end -= sec_desc_size(*secdesc);
+ buffer->string_at_end -= ndr_size_security_descriptor(*secdesc, 0);
if(!prs_set_offset(ps, buffer->string_at_end))
return False;
diff --git a/source3/rpc_parse/parse_prs.c b/source3/rpc_parse/parse_prs.c
index 23dae9f3a1..638d71a73e 100644
--- a/source3/rpc_parse/parse_prs.c
+++ b/source3/rpc_parse/parse_prs.c
@@ -1544,9 +1544,11 @@ static void schannel_digest(struct schannel_auth_struct *a,
uchar digest_final[16])
{
uchar whole_packet_digest[16];
- static const uchar zeros[4] = { 0, };
+ uchar zeros[4];
struct MD5Context ctx3;
-
+
+ ZERO_STRUCT(zeros);
+
/* verfiy the signature on the packet by MD5 over various bits */
MD5Init(&ctx3);
/* use our sequence number, which ensures the packet is not
@@ -1573,11 +1575,13 @@ static void schannel_get_sealing_key(struct schannel_auth_struct *a,
RPC_AUTH_SCHANNEL_CHK *verf,
uchar sealing_key[16])
{
- static const uchar zeros[4] = { 0, };
+ uchar zeros[4];
uchar digest2[16];
uchar sess_kf0[16];
int i;
+ ZERO_STRUCT(zeros);
+
for (i = 0; i < sizeof(sess_kf0); i++) {
sess_kf0[i] = a->sess_key[i] ^ 0xf0;
}
@@ -1600,10 +1604,12 @@ static void schannel_get_sealing_key(struct schannel_auth_struct *a,
static void schannel_deal_with_seq_num(struct schannel_auth_struct *a,
RPC_AUTH_SCHANNEL_CHK *verf)
{
- static const uchar zeros[4] = { 0, };
+ uchar zeros[4];
uchar sequence_key[16];
uchar digest1[16];
+ ZERO_STRUCT(zeros);
+
hmac_md5(a->sess_key, zeros, sizeof(zeros), digest1);
dump_data_pw("(sequence key) digest1:\n", digest1, sizeof(digest1));
diff --git a/source3/rpc_parse/parse_sec.c b/source3/rpc_parse/parse_sec.c
index 6198a78de0..6ea128d3a4 100644
--- a/source3/rpc_parse/parse_sec.c
+++ b/source3/rpc_parse/parse_sec.c
@@ -291,14 +291,14 @@ bool sec_io_desc(const char *desc, SEC_DESC **ppsd, prs_struct *ps, int depth)
if (psd->owner_sid != NULL) {
off_owner_sid = offset;
- offset += sid_size(psd->owner_sid);
+ offset += ndr_size_dom_sid(psd->owner_sid, 0);
} else {
off_owner_sid = 0;
}
if (psd->group_sid != NULL) {
off_grp_sid = offset;
- offset += sid_size(psd->group_sid);
+ offset += ndr_size_dom_sid(psd->group_sid, 0);
} else {
off_grp_sid = 0;
}
@@ -426,7 +426,7 @@ bool sec_io_desc_buf(const char *desc, SEC_DESC_BUF **ppsdb, prs_struct *ps, int
if(!prs_uint32 ("ptr ", ps, depth, &ptr))
return False;
- len = sec_desc_size(psdb->sd);
+ len = ndr_size_security_descriptor(psdb->sd, 0);
if(!prs_uint32_pre("len ", ps, depth, &len, &off_len))
return False;
diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c
index ea76c57045..3bf8ef27c1 100644
--- a/source3/rpc_parse/parse_spoolss.c
+++ b/source3/rpc_parse/parse_spoolss.c
@@ -3098,7 +3098,7 @@ uint32 spoolss_size_printer_info_2(PRINTER_INFO_2 *info)
size += 4;
- size += sec_desc_size( info->secdesc );
+ size += ndr_size_security_descriptor( info->secdesc, 0 );
size+=size_of_device_mode( info->devmode );
@@ -3185,7 +3185,7 @@ return the size required by a struct in the stream
uint32 spoolss_size_printer_info_3(PRINTER_INFO_3 *info)
{
/* The 8 is for the self relative pointer - 8 byte aligned.. */
- return 8 + (uint32)sec_desc_size( info->secdesc );
+ return 8 + (uint32)ndr_size_security_descriptor( info->secdesc, 0 );
}
/*******************************************************************
diff --git a/source3/rpc_parse/parse_srv.c b/source3/rpc_parse/parse_srv.c
index 6337c53fc1..954aa80600 100644
--- a/source3/rpc_parse/parse_srv.c
+++ b/source3/rpc_parse/parse_srv.c
@@ -507,7 +507,8 @@ static bool srv_io_share_info502_str(const char *desc, SH_INFO_502_STR *sh502, p
if(UNMARSHALLING(ps)) {
- sh502->ptrs->sd_size = sh502->sd_size = sec_desc_size(sh502->sd);
+ sh502->ptrs->sd_size = sh502->sd_size =
+ ndr_size_security_descriptor(sh502->sd, 0);
prs_set_offset(ps, old_offset + sh502->reserved);
}
@@ -1460,7 +1461,7 @@ void init_srv_q_net_share_add(SRV_Q_NET_SHARE_ADD *q, const char *srvname,
{
switch(level) {
case 502: {
- size_t sd_size = sec_desc_size(sd);
+ size_t sd_size = ndr_size_security_descriptor(sd, 0);
q->ptr_srv_name = 1;
init_unistr2(&q->uni_srv_name, srvname, UNI_STR_TERMINATE);
q->info.switch_value = q->info_level = level;