summaryrefslogtreecommitdiff
path: root/source3/printing/nt_printing.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-08-09 23:19:50 +0000
committerJeremy Allison <jra@samba.org>2000-08-09 23:19:50 +0000
commit92a54ac60c6416e3454ebb495adb4b89f1d0a3f1 (patch)
tree9fe2ae7a76a473a75eb69ef63d8a368c148a2da2 /source3/printing/nt_printing.c
parent86833bbd564c75d6e30a449084abbf0945ab6a30 (diff)
downloadsamba-92a54ac60c6416e3454ebb495adb4b89f1d0a3f1.tar.gz
samba-92a54ac60c6416e3454ebb495adb4b89f1d0a3f1.tar.bz2
samba-92a54ac60c6416e3454ebb495adb4b89f1d0a3f1.zip
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)
Diffstat (limited to 'source3/printing/nt_printing.c')
-rw-r--r--source3/printing/nt_printing.c10
1 files changed, 10 insertions, 0 deletions
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++) {