From d25e9ab9a1b8c07a65034d36818819019e170e8d Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 3 Jun 2010 20:59:25 +1000 Subject: named_pipe_auth Always lower case the incoming pipe name Windows connects to an upper case NETLOGON pipe, and we can't find the socket to connect to until we lower case the name. Andrew Bartlett --- libcli/named_pipe_auth/npa_tstream.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'libcli/named_pipe_auth') diff --git a/libcli/named_pipe_auth/npa_tstream.c b/libcli/named_pipe_auth/npa_tstream.c index 0834c7dda6..c96e30f806 100644 --- a/libcli/named_pipe_auth/npa_tstream.c +++ b/libcli/named_pipe_auth/npa_tstream.c @@ -73,6 +73,11 @@ struct tevent_req *tstream_npa_connect_send(TALLOC_CTX *mem_ctx, struct tevent_req *subreq; int ret; enum ndr_err_code ndr_err; + char *lower_case_npipe = strlower_talloc(talloc_tos(), npipe); + + if (!lower_case_npipe) { + return NULL; + } req = tevent_req_create(mem_ctx, &state, struct tstream_npa_connect_state); @@ -84,7 +89,8 @@ struct tevent_req *tstream_npa_connect_send(TALLOC_CTX *mem_ctx, state->unix_path = talloc_asprintf(state, "%s/%s", directory, - npipe); + lower_case_npipe); + talloc_free(lower_case_npipe); if (tevent_req_nomem(state->unix_path, req)) { goto post; } -- cgit