summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-05-28 15:29:17 +0200
committerStefan Metzmacher <metze@samba.org>2012-05-28 19:51:55 +0200
commit697c88d6b194259260c802a2a66215d5aa89726d (patch)
treead89d590741228f0c1f858b72a3446dc1ab74012 /source3
parent1e5010fd9978e0d65c25a7f2cbea399813e21d26 (diff)
downloadsamba-697c88d6b194259260c802a2a66215d5aa89726d.tar.gz
samba-697c88d6b194259260c802a2a66215d5aa89726d.tar.bz2
samba-697c88d6b194259260c802a2a66215d5aa89726d.zip
s3:cli_np_tstream: pass a leading backslash for the pipe name for SMB1
metze
Diffstat (limited to 'source3')
-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,