From 697c88d6b194259260c802a2a66215d5aa89726d Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 28 May 2012 15:29:17 +0200 Subject: s3:cli_np_tstream: pass a leading backslash for the pipe name for SMB1 metze --- source3/libsmb/cli_np_tstream.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/libsmb/cli_np_tstream.c b/source3/libsmb/cli_np_tstream.c index f7e609d200..9d5d013f54 100644 --- a/source3/libsmb/cli_np_tstream.c +++ b/source3/libsmb/cli_np_tstream.c @@ -151,8 +151,20 @@ struct tevent_req *tstream_cli_np_open_send(TALLOC_CTX *mem_ctx, } if (state->is_smb1) { + const char *smb1_npipe; + + /* + * Windows and newer Samba versions allow + * the pipe name without leading backslash, + * but we should better behave like windows clients + */ + smb1_npipe = talloc_asprintf(state, "\\%s", state->npipe); + if (tevent_req_nomem(smb1_npipe, req)) { + return tevent_req_post(req, ev); + } + subreq = cli_ntcreate_send(state, ev, cli, - npipe, + smb1_npipe, 0, DESIRED_ACCESS_PIPE, 0, -- cgit