From: Günther Deschner Date: Thu, 18 Feb 2010 01:14:26 +0000 (+0100) Subject: s3-spoolss: fix return code of spoolss_DeletePrinter. X-Git-Url: http://git.samba.org/?p=abartlet%2Fsamba.git%2F.git;a=commitdiff_plain;h=43e3d8f51da4bbdb3108af45e2fddab7e2e91f04 s3-spoolss: fix return code of spoolss_DeletePrinter. When the printer has been removed by the "deleteprinter command", we need to check if it is still there and then fail, not fail if we successfully removed it (found by RPC-SPOOLSS-PRINTER). Guenther --- diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 30bedc69e15..445a65465b1 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -315,7 +315,7 @@ static WERROR delete_printer_hook(TALLOC_CTX *ctx, NT_USER_TOKEN *token, const c reload_services(false); unbecome_root(); - if ( lp_servicenumber( sharename ) < 0 ) + if ( lp_servicenumber( sharename ) > 0 ) return WERR_ACCESS_DENIED; return WERR_OK;