summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 23754602fb..3bc91c2472 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -993,7 +993,6 @@ Can't find printer handle we created for printer %s\n", name ));
/* map an empty access mask to the minimum access mask */
if (printer_default->access_required == 0x0)
printer_default->access_required = PRINTER_ACCESS_USE;
-
/*
* If we are not serving the printer driver for this printer,
@@ -1013,6 +1012,12 @@ Can't find printer handle we created for printer %s\n", name ));
return WERR_ACCESS_DENIED;
}
+ if ((printer_default->access_required & SPECIFIC_RIGHTS_MASK)& ~(PRINTER_ACCESS_ADMINISTER|PRINTER_ACCESS_USE)) {
+ DEBUG(3, ("access DENIED for printer open - unknown bits\n"));
+ close_printer_handle(p, handle);
+ return WERR_ACCESS_DENIED;
+ }
+
if (printer_default->access_required & PRINTER_ACCESS_ADMINISTER)
printer_default->access_required = PRINTER_ACCESS_ADMINISTER;
else