diff options
author | David O'Neill <dmo@samba.org> | 2000-09-01 18:49:26 +0000 |
---|---|---|
committer | David O'Neill <dmo@samba.org> | 2000-09-01 18:49:26 +0000 |
commit | a3a28675fafbbc5a5a378b3a7235253d772ef63e (patch) | |
tree | 65eb150c18125c199b8e289b9027de8d69344413 /testsuite | |
parent | bfa751734a1229a25bb3f33edc7710a1efee376d (diff) | |
download | samba-a3a28675fafbbc5a5a378b3a7235253d772ef63e.tar.gz samba-a3a28675fafbbc5a5a378b3a7235253d772ef63e.tar.bz2 samba-a3a28675fafbbc5a5a378b3a7235253d772ef63e.zip |
Changes from APPLIANCE_HEAD (per Tim Potter):
- make proto
- addition of function to convert from errno values to NT status codes
(source/lib/error.c)
- purge queue done without full access permission will purge only the
jobs owned by that user, rather than failing.
- unlock job database tdb before sending job to printer
- in print_job_start(), ensure that we don't pick a jobid with an existing
temporary file that may be owned by another user, as it causes silent
failures.
- fixes for printer permission checking for NT5 clients
(source/include/rpc_spoolss.h, source/printing/nt_printing.c,
source/printing/printing.c, source/rpc_server/srv_spoolss_nt.c)
- change from uint8 to 'enum SID_NAME_USE' (source/rpc_server/srv_lsa.c)
- fixed memory leaks for win95 driver download process
(source/smbd/lanman.c)
- properly free prs_structs and dacl in testsuite/printing/psec.c
(This used to be commit 74af3e2caec7197e5d1ca389e2f78054a4197502)
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/printing/psec.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/testsuite/printing/psec.c b/testsuite/printing/psec.c index 28c4ee0ca5..9b1fc7c46c 100644 --- a/testsuite/printing/psec.c +++ b/testsuite/printing/psec.c @@ -165,6 +165,8 @@ int psec_getsec(char *printer) prs_struct ps; int result = 0, i; + ZERO_STRUCT(ps); + /* Open tdb for reading */ slprintf(tdb_path, sizeof(tdb_path) - 1, "%s/ntdrivers.tdb", LOCKDIR); @@ -242,6 +244,7 @@ int psec_getsec(char *printer) if (tdb) tdb_close(tdb); if (mem_ctx) talloc_destroy(mem_ctx); if (secdesc_ctr) free_sec_desc_buf(&secdesc_ctr); + prs_mem_free(&ps); return result; } @@ -252,7 +255,7 @@ int psec_setsec(char *printer) { DOM_SID user_sid, group_sid; SEC_ACE *ace_list = NULL; - SEC_ACL *dacl; + SEC_ACL *dacl = NULL; SEC_DESC *sd; SEC_DESC_BUF *sdb = NULL; int result = 0, num_aces = 0; @@ -262,6 +265,8 @@ int psec_setsec(char *printer) TALLOC_CTX *mem_ctx = NULL; BOOL has_user_sid = False, has_group_sid = False; + ZERO_STRUCT(ps); + /* Open tdb for reading */ slprintf(tdb_path, sizeof(tdb_path) - 1, "%s/ntdrivers.tdb", LOCKDIR); @@ -327,6 +332,8 @@ int psec_setsec(char *printer) dacl, /* Discretionary ACL */ &size); + free_sec_acl(&dacl); + sdb = make_sec_desc_buf(size, sd); free_sec_desc(&sd); @@ -360,6 +367,7 @@ int psec_setsec(char *printer) if (tdb) tdb_close(tdb); if (sdb) free_sec_desc_buf(&sdb); if (mem_ctx) talloc_destroy(mem_ctx); + prs_mem_free(&ps); return result; } |