diff options
author | Volker Lendecke <vl@samba.org> | 2007-12-29 23:00:49 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2007-12-29 23:13:26 +0100 |
commit | 7cbdb48475b0340154fad60cb4b7cc53dc2bbcfd (patch) | |
tree | c46834dc96c1bd189ab4e37d9afe38a309d14abb /source3/printing | |
parent | 7be5525792a2f4aa19c308afb516ef1fe02b7be2 (diff) | |
download | samba-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/printing')
-rw-r--r-- | source3/printing/nt_printing.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index f83f898cc0..f115fba91f 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -429,7 +429,8 @@ static int sec_desc_upg_fn( TDB_CONTEXT *the_tdb, TDB_DATA key, /* store it back */ - sd_size = sec_desc_size(sd_store->sd) + sizeof(SEC_DESC_BUF); + sd_size = ndr_size_security_descriptor(sd_store->sd, 0) + + sizeof(SEC_DESC_BUF); prs_init(&ps, sd_size, ctx, MARSHALL); if ( !sec_io_desc_buf( "sec_desc_upg_fn", &sd_store, &ps, 1 ) ) { @@ -5389,8 +5390,9 @@ WERROR nt_printing_setsec(const char *sharename, SEC_DESC_BUF *secdesc_ctr) /* Store the security descriptor in a tdb */ - prs_init(&ps, (uint32)sec_desc_size(new_secdesc_ctr->sd) + - sizeof(SEC_DESC_BUF), mem_ctx, MARSHALL); + prs_init(&ps, + (uint32)ndr_size_security_descriptor(new_secdesc_ctr->sd, 0) + + sizeof(SEC_DESC_BUF), mem_ctx, MARSHALL); if (!sec_io_desc_buf("nt_printing_setsec", &new_secdesc_ctr, &ps, 1)) { @@ -5534,7 +5536,7 @@ bool nt_printing_getsec(TALLOC_CTX *ctx, const char *sharename, SEC_DESC_BUF **s /* Save default security descriptor for later */ - prs_init(&ps, (uint32)sec_desc_size((*secdesc_ctr)->sd) + + prs_init(&ps, (uint32)ndr_size_security_descriptor((*secdesc_ctr)->sd, 0) + sizeof(SEC_DESC_BUF), ctx, MARSHALL); if (sec_io_desc_buf("nt_printing_getsec", secdesc_ctr, &ps, 1)) { |