From 06c1c338e3fcaf6460f4e462c7f881ce2abc9ac7 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 15 Dec 2011 11:03:29 +0100 Subject: [PATCH] s3:rpc_server/spoolss: remove reload_services check from delete_printer_hook() As the spoolss code can run embedded or external relative to the smbd file server process, it's very tricky to verify if a share is still in use. Checking the result of the "deleteprinter command" command should be enough to check for success. We should not return WERR_ACCESS_DENIED if the share is still in use, by the current client, as the primary printer definition is already deleted. metze --- source3/rpc_server/spoolss/srv_spoolss_nt.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/source3/rpc_server/spoolss/srv_spoolss_nt.c b/source3/rpc_server/spoolss/srv_spoolss_nt.c index 1a9111c8a55..491d96566a8 100644 --- a/source3/rpc_server/spoolss/srv_spoolss_nt.c +++ b/source3/rpc_server/spoolss/srv_spoolss_nt.c @@ -417,14 +417,6 @@ static WERROR delete_printer_hook(TALLOC_CTX *ctx, struct security_token *token, if (ret != 0) return WERR_BADFID; /* What to return here? */ - /* go ahead and re-read the services immediately */ - become_root(); - reload_services(msg_ctx, -1, false); - unbecome_root(); - - if ( lp_servicenumber( sharename ) >= 0 ) - return WERR_ACCESS_DENIED; - return WERR_OK; } -- 2.34.1