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
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;
}