summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-06-03 20:59:25 +1000
committerAndrew Bartlett <abartlet@samba.org>2010-06-07 23:34:28 +1000
commitd25e9ab9a1b8c07a65034d36818819019e170e8d (patch)
treef6897422a5864da0026e3270b5bd2c3be1f1bf7b
parent8f1cec5faf4e26de8b9797777059e99f2a66558b (diff)
downloadsamba-d25e9ab9a1b8c07a65034d36818819019e170e8d.tar.gz
samba-d25e9ab9a1b8c07a65034d36818819019e170e8d.tar.bz2
samba-d25e9ab9a1b8c07a65034d36818819019e170e8d.zip
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
-rw-r--r--libcli/named_pipe_auth/npa_tstream.c8
1 files changed, 7 insertions, 1 deletions
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;
}