summaryrefslogtreecommitdiff
path: root/source3/rpc_parse
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2007-12-29 23:00:49 +0100
committerVolker Lendecke <vl@samba.org>2007-12-29 23:13:26 +0100
commit7cbdb48475b0340154fad60cb4b7cc53dc2bbcfd (patch)
treec46834dc96c1bd189ab4e37d9afe38a309d14abb /source3/rpc_parse
parent7be5525792a2f4aa19c308afb516ef1fe02b7be2 (diff)
downloadsamba-7cbdb48475b0340154fad60cb4b7cc53dc2bbcfd.tar.gz
samba-7cbdb48475b0340154fad60cb4b7cc53dc2bbcfd.tar.bz2
samba-7cbdb48475b0340154fad60cb4b7cc53dc2bbcfd.zip
Remove tiny code duplication
ndr_size_security_descriptor does the same as sec_desc_size (This used to be commit bc3bd7a8e7c6e9e27acb195c86abb92c0f53112f)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r--source3/rpc_parse/parse_buffer.c2
-rw-r--r--source3/rpc_parse/parse_sec.c2
-rw-r--r--source3/rpc_parse/parse_spoolss.c4
-rw-r--r--source3/rpc_parse/parse_srv.c5
4 files changed, 7 insertions, 6 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_sec.c b/source3/rpc_parse/parse_sec.c
index 36bd5825bd..6ea128d3a4 100644
--- a/source3/rpc_parse/parse_sec.c
+++ b/source3/rpc_parse/parse_sec.c
@@ -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;