summaryrefslogtreecommitdiff
path: root/source3/libsmb/cli_np_tstream.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libsmb/cli_np_tstream.c')
-rw-r--r--source3/libsmb/cli_np_tstream.c14
1 files changed, 13 insertions, 1 deletions
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,