summaryrefslogtreecommitdiff
path: root/source3/registry
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2007-06-13 11:04:31 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:23:18 -0500
commit46906b2c754385bb87e987158dd1c657358a420a (patch)
treebbd71a29b592f849d30400032a65c35614781f7e /source3/registry
parent6f28dc588c9f2ad8a55f875406e16602c9244fef (diff)
downloadsamba-46906b2c754385bb87e987158dd1c657358a420a.tar.gz
samba-46906b2c754385bb87e987158dd1c657358a420a.tar.bz2
samba-46906b2c754385bb87e987158dd1c657358a420a.zip
r23465: There was this diff between reg_printing in 3_0 and 3_0_26:
before writing to secdesc_buf->sd, 3_0 checked secdesc_buf->sd while 3_0_26 checked secdesc_buf->sd_size. This patch makes both revisions check _both_ befor writing. Jerry / Jeremy : please check if this is correct! Michael (This used to be commit dfc42178708144ef0b9273438ee15451078d3f4e)
Diffstat (limited to 'source3/registry')
-rw-r--r--source3/registry/reg_printing.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/registry/reg_printing.c b/source3/registry/reg_printing.c
index b9fe0b014a..f33d0ab755 100644
--- a/source3/registry/reg_printing.c
+++ b/source3/registry/reg_printing.c
@@ -449,7 +449,10 @@ static void fill_in_printer_values( NT_PRINTER_INFO_LEVEL_2 *info2, REGVAL_CTR *
/* stream the printer security descriptor */
- if ( info2->secdesc_buf && info2->secdesc_buf->sd ) {
+ if ( info2->secdesc_buf &&
+ info2->secdesc_buf->sd &&
+ info2->secdesc_buf->sd_size )
+ {
if ( sec_io_desc("sec_desc", &info2->secdesc_buf->sd, &prs, 0 ) ) {
offset = prs_offset( &prs );
regval_ctr_addvalue( values, "Security", REG_BINARY, prs_data_p(&prs), offset );