diff options
author | Jeremy Allison <jra@samba.org> | 2002-04-11 02:59:31 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-04-11 02:59:31 +0000 |
commit | 8e2f3ec1d175ae530842b502c4f0431b50dd364e (patch) | |
tree | 583e95d76bd9cb7c687bd3664b554c58b6259e13 /source3 | |
parent | 9cd0306baa1b3a78b40ab97b5d199b90a4c34aa6 (diff) | |
download | samba-8e2f3ec1d175ae530842b502c4f0431b50dd364e.tar.gz samba-8e2f3ec1d175ae530842b502c4f0431b50dd364e.tar.bz2 samba-8e2f3ec1d175ae530842b502c4f0431b50dd364e.zip |
Correctly emulate NT in printer handle opening access rights.
Jeremy.
(This used to be commit 42ae2334f21402c347aee560f08fd8e730481169)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 7 |
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 |