diff options
author | Jeremy Allison <jra@samba.org> | 2002-09-27 22:08:25 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-09-27 22:08:25 +0000 |
commit | 3c7334c1b5862b8df3533e228978069d2099ac06 (patch) | |
tree | 31c000c299e1b106e035fc2e07bcd64e71f85766 /source3 | |
parent | 1ac50efaf775631482ada9f369e4921b27e4105d (diff) | |
download | samba-3c7334c1b5862b8df3533e228978069d2099ac06.tar.gz samba-3c7334c1b5862b8df3533e228978069d2099ac06.tar.bz2 samba-3c7334c1b5862b8df3533e228978069d2099ac06.zip |
Check for security on delete printer was reversed...
Jeremy.
(This used to be commit 0d27cc909b4489b54e57481bd8a9494fb077dc3d)
Diffstat (limited to 'source3')
-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(); |