diff options
author | Tim Potter <tpot@samba.org> | 2000-07-17 05:37:16 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2000-07-17 05:37:16 +0000 |
commit | 8453b27983fd91986867a5eed4f5ae5d65ab4bfb (patch) | |
tree | e0fc4298d0c4c0bdbd7fc5f2d7c275cb64d8fa1e /source3 | |
parent | 2bf08232cd1176038b84e17b7d2e3b3849221578 (diff) | |
download | samba-8453b27983fd91986867a5eed4f5ae5d65ab4bfb.tar.gz samba-8453b27983fd91986867a5eed4f5ae5d65ab4bfb.tar.bz2 samba-8453b27983fd91986867a5eed4f5ae5d65ab4bfb.zip |
Initialise current time to time(NULL) in add_a_printer_2()
Added get and free security old descriptor in nt_printing_setsec() after
access checking was moved up to rpc level.
(This used to be commit a5b7cafc87e14ca3f28dcfc1ed6bcc6f47e79639)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/printing/nt_printing.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index 1496fb90d8..00735ecbc1 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -613,7 +613,7 @@ static uint32 add_a_printer_2(NT_PRINTER_INFO_LEVEL_2 *info) int buflen, len, ret; TDB_DATA kbuf, dbuf; NTTIME time_nt; - time_t time_unix; + time_t time_unix = time(NULL); /* * in addprinter: no servername and the printer is the name @@ -1502,6 +1502,8 @@ uint32 nt_printing_setsec(char *printername, SEC_DESC_BUF *secdesc_ctr) SEC_DESC *psd = NULL; size_t size; + nt_printing_getsec(printername, &old_secdesc_ctr); + /* Pick out correct owner and group sids */ owner_sid = secdesc_ctr->sec->owner_sid ? @@ -1526,6 +1528,7 @@ uint32 nt_printing_setsec(char *printername, SEC_DESC_BUF *secdesc_ctr) /* Free up memory */ free_sec_desc(&psd); + free_sec_desc_buf(&old_secdesc_ctr); } if (!new_secdesc_ctr) { |