s3:rpc_server/spoolss: remove reload_services check from delete_printer_hook()
authorStefan Metzmacher <metze@samba.org>
Thu, 15 Dec 2011 10:03:29 +0000 (11:03 +0100)
committerStefan Metzmacher <metze@samba.org>
Thu, 15 Dec 2011 10:03:29 +0000 (11:03 +0100)
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

index 1a9111c8a55e77fa4c3afb13a67bce3975b1001c..491d96566a8e10b80bd3ab0e9d40287b8dfda156 100644 (file)
@@ -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;
 }