summaryrefslogtreecommitdiff
path: root/source3/registry
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/registry
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/registry')
-rw-r--r--source3/registry/reg_api.c2
-rw-r--r--source3/registry/regfio.c5
2 files changed, 4 insertions, 3 deletions
diff --git a/source3/registry/reg_api.c b/source3/registry/reg_api.c
index b3d024d7b4..bc4508ff94 100644
--- a/source3/registry/reg_api.c
+++ b/source3/registry/reg_api.c
@@ -378,7 +378,7 @@ WERROR reg_queryinfokey(struct registry_key *key, uint32_t *num_subkeys,
return err;
}
- *secdescsize = sec_desc_size(secdesc);
+ *secdescsize = ndr_size_security_descriptor(secdesc, 0);
TALLOC_FREE(mem_ctx);
*last_changed_time = 0;
diff --git a/source3/registry/regfio.c b/source3/registry/regfio.c
index 22700e6481..92077aa847 100644
--- a/source3/registry/regfio.c
+++ b/source3/registry/regfio.c
@@ -1554,7 +1554,7 @@ static uint32 sk_record_data_size( SEC_DESC * sd )
/* the record size is sizeof(hdr) + name + static members + data_size_field */
- size = sizeof(uint32)*5 + sec_desc_size( sd ) + sizeof(uint32);
+ size = sizeof(uint32)*5 + ndr_size_security_descriptor(sd, 0) + sizeof(uint32);
/* multiple of 8 */
size_mod8 = size & 0xfffffff8;
@@ -1784,7 +1784,8 @@ static int hashrec_cmp( REGF_HASH_REC *h1, REGF_HASH_REC *h2 )
nk->sec_desc->ref_count = 0;
/* size value must be self-inclusive */
- nk->sec_desc->size = sec_desc_size(sec_desc) + sizeof(uint32);
+ nk->sec_desc->size = ndr_size_security_descriptor(sec_desc, 0)
+ + sizeof(uint32);
DLIST_ADD_END( file->sec_desc_list, nk->sec_desc, REGF_SK_REC *);