From 94fc44a93c46cece9b9fa947bff62087dbcd89fa Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 12 Feb 2001 16:18:02 +0000 Subject: Merge of JohnR's changes to appliance-head, JF's changes to 2.2, updated the POSIX_ACL code to be in sync. Jeremy. (This used to be commit c0517d6f4e3079feca1309fd1ea7b21e83f0de02) --- source3/printing/nt_printing.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'source3/printing') 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. */ -- cgit