From 92a54ac60c6416e3454ebb495adb4b89f1d0a3f1 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 9 Aug 2000 23:19:50 +0000 Subject: Fixed bug in new printer access check code. If PRINTER_ALL_ACCESS is changed in the ACE's the same thing must be done in the desired access or they will never match. This took me a while to find... :-). Jeremy. (This used to be commit 066520979b2b5d967e6e1d77f16185a5fb19dc0c) --- source3/printing/nt_printing.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source3/printing') diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index c88217cc7e..2f32a5ac2e 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -2180,6 +2180,16 @@ BOOL print_access_check(struct current_user *user, int snum, performing the access check. I'm sure there is a better way to do this! */ + /* You forgot to also change the *required access* from PRINTER_ACE_FULL_CONTROL + to PRINTER_ACE_MANAGE_DOCUMENTS | PRINTER_ACE_PRINT before doing the check. + This took me 3 hours to find !!!!! JRA. + */ + + if (required_access & PRINTER_ACE_FULL_CONTROL) { + required_access |= (PRINTER_ACE_MANAGE_DOCUMENTS | PRINTER_ACE_PRINT); + required_access &= ~PRINTER_ACE_FULL_CONTROL; + } + if (secdesc && secdesc->sec && secdesc->sec->dacl && secdesc->sec->dacl->ace) { for(i = 0; i < secdesc->sec->dacl->num_aces; i++) { -- cgit