summaryrefslogtreecommitdiff
path: root/source3/printing
diff options
context:
space:
mode:
Diffstat (limited to 'source3/printing')
-rw-r--r--source3/printing/nt_printing.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index ff24849f0b..83c3206a7d 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -3163,22 +3163,33 @@ uint32 printer_write_default_dev(int snum, const PRINTER_DEFAULT *printer_defaul
/*
* Just ignore it if we already have a devmode.
*/
-
+#if 0
if (printer->info_2->devmode != NULL)
goto done;
-
+#endif
/*
* We don't have a devicemode and we're trying to write
* one. Check we have the access needed.
*/
+ DEBUG(5,("printer_write_default_dev: access: %x\n", printer_default->access_required));
+
+ if ( (printer_default->access_required & PRINTER_ACCESS_ADMINISTER) !=
+ PRINTER_ACCESS_ADMINISTER) {
+ DEBUG(5,("printer_write_default_dev: invalid request access to update: %x\n", printer_default->access_required));
+ result = ERROR_ACCESS_DENIED;
+ goto done;
+ }
if (!print_access_check(NULL, snum, PRINTER_ACCESS_ADMINISTER)) {
DEBUG(5,("printer_write_default_dev: Access denied for printer %s\n",
lp_servicename(snum) ));
result = ERROR_ACCESS_DENIED;
+ /*result = NT_STATUS_NO_PROBLEMO;*/
goto done;
}
+ DEBUG(5,("printer_write_default_dev: updating, check OK.\n"));
+
/*
* Convert the on the wire devicemode format to the internal one.
*/