summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-12-15 11:03:29 +0100
committerStefan Metzmacher <metze@samba.org>2011-12-15 11:03:29 +0100
commit06c1c338e3fcaf6460f4e462c7f881ce2abc9ac7 (patch)
treeaa7ea83f7fdaafaef151d5ef062416aedeb1c3cb
parente412b8bfcce46720b913d42ac7f56d4e024162f0 (diff)
downloadsamba-06c1c338e3fcaf6460f4e462c7f881ce2abc9ac7.tar.gz
samba-06c1c338e3fcaf6460f4e462c7f881ce2abc9ac7.tar.bz2
samba-06c1c338e3fcaf6460f4e462c7f881ce2abc9ac7.zip
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
-rw-r--r--source3/rpc_server/spoolss/srv_spoolss_nt.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/source3/rpc_server/spoolss/srv_spoolss_nt.c b/source3/rpc_server/spoolss/srv_spoolss_nt.c
index 1a9111c8a5..491d96566a 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;
}