From 43e3d8f51da4bbdb3108af45e2fddab7e2e91f04 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 18 Feb 2010 02:14:26 +0100 Subject: 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 --- source3/rpc_server/srv_spoolss_nt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/rpc_server') diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 30bedc69e1..445a65465b 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; -- cgit