mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
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 a5b7cafc87
)
This commit is contained in:
parent
2bf08232cd
commit
8453b27983
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user