diff options
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 2190215107..dcffa968d5 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -313,11 +313,6 @@ static WERROR delete_printer_handle(pipes_struct *p, POLICY_HND *hnd) return WERR_BADFID; } - if (del_a_printer(Printer->dev.handlename) != 0) { - DEBUG(3,("Error deleting printer %s\n", Printer->dev.handlename)); - return WERR_BADFID; - } - /* Check calling user has permission to delete printer. Note that since we set the snum parameter to -1 only administrators can delete the printer. This stops people with the Full Control @@ -328,6 +323,11 @@ static WERROR delete_printer_handle(pipes_struct *p, POLICY_HND *hnd) return WERR_ACCESS_DENIED; } + if (del_a_printer(Printer->dev.handlename) != 0) { + DEBUG(3,("Error deleting printer %s\n", Printer->dev.handlename)); + return WERR_BADFID; + } + if (*lp_deleteprinter_cmd()) { char *cmd = lp_deleteprinter_cmd(); |