struct tevent_context *ev;
const char *socketpath;
struct named_pipe_auth_req *npa_req;
+ bool probe_only;
struct tstream_context *npa_stream;
};
* @param[in] local_server_addr The server addr to transmit
* @param[in] session_info The authorization info to use
* @param[in] need_idle_server Does this need to be an exclusive server?
+ * @param[in] probe_only Only check the pipename for EEXIST
* @return The tevent_req that was started
*/
const char *local_server_name,
const struct tsocket_address *local_server_addr,
const struct auth_session_info *session_info,
- bool need_idle_server)
+ bool need_idle_server,
+ bool probe_only)
{
struct tevent_req *req = NULL, *subreq = NULL;
struct local_np_connect_state *state = NULL;
return NULL;
}
state->ev = ev;
+ state->probe_only = probe_only;
num_npa_sids =
security_token_count_flag_sids(session_info->security_token,
npa_flags |= SAMBA_NPA_FLAGS_NEED_IDLE;
}
+ if (probe_only) {
+ npa_flags |= SAMBA_NPA_FLAGS_PROBE_ONLY;
+ }
+
ok = winbind_env_set();
if (ok) {
npa_flags |= SAMBA_NPA_FLAGS_WINBIND_OFF;
return err;
}
+ if (state->probe_only) {
+ tevent_req_received(req);
+ return EEXIST;
+ }
+
*pstream = talloc_move(mem_ctx, &state->npa_stream);
+ tevent_req_received(req);
return 0;
}
const struct tsocket_address *local_server_addr,
const struct auth_session_info *session_info,
bool need_idle_server,
+ bool probe_only,
TALLOC_CTX *mem_ctx,
struct tstream_context **pstream)
{
local_server_name,
local_server_addr,
session_info,
- need_idle_server);
+ need_idle_server,
+ probe_only);
if (req == NULL) {
goto fail;
}
const char *local_server_name,
const struct tsocket_address *local_server_addr,
const struct auth_session_info *session_info,
- bool need_idle_server);
+ bool need_idle_server,
+ bool probe_only);
int local_np_connect_recv(
struct tevent_req *req,
const struct tsocket_address *local_server_addr,
const struct auth_session_info *session_info,
bool need_idle_server,
+ bool probe_only,
TALLOC_CTX *mem_ctx,
struct tstream_context **stream);