summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-04-08 00:47:49 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:19:15 -0500
commit2ca369e0a66b30cc0df9740a699b912bb652b930 (patch)
treee48853e9f4de579a6f99ef818da5a0a5e2d6997b /source3
parent8c34aab0084d4bfb38796a0d6d9aea542fe185e2 (diff)
downloadsamba-2ca369e0a66b30cc0df9740a699b912bb652b930.tar.gz
samba-2ca369e0a66b30cc0df9740a699b912bb652b930.tar.bz2
samba-2ca369e0a66b30cc0df9740a699b912bb652b930.zip
r22128: Fix the pipe open response with EXTENDED_RESPONSE_REQUIRED
set. Only the NTTrans create left to fix for csc. Jeremy. (This used to be commit 7856db9fce9906c5a7d19fbe69dfcfd4b644c134)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/nttrans.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index 0618a938e7..fa9e89d097 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -374,6 +374,7 @@ static int do_ntcreate_pipe_open(connection_struct *conn,
int ret;
int pnum = -1;
char *p = NULL;
+ uint32 flags = IVAL(inbuf,smb_ntcreate_Flags);
srvstr_pull_buf(inbuf, fname, smb_buf(inbuf), sizeof(fname), STR_TERMINATE);
@@ -385,7 +386,17 @@ static int do_ntcreate_pipe_open(connection_struct *conn,
* Deal with pipe return.
*/
- set_message(outbuf,34,0,True);
+ if (flags & EXTENDED_RESPONSE_REQUIRED) {
+ /* This is very strange. We
+ * return 50 words, but only set
+ * the wcnt to 42 ? It's definately
+ * what happens on the wire....
+ */
+ set_message(outbuf,50,0,True);
+ SCVAL(outbuf,smb_wct,42);
+ } else {
+ set_message(outbuf,34,0,True);
+ }
p = outbuf + smb_vwv2;
p++;
@@ -400,6 +411,18 @@ static int do_ntcreate_pipe_open(connection_struct *conn,
SSVAL(p,0,FILE_TYPE_MESSAGE_MODE_PIPE);
/* Device state. */
SSVAL(p,2, 0x5FF); /* ? */
+ p += 4;
+
+ if (flags & EXTENDED_RESPONSE_REQUIRED) {
+ p += 26;
+ SIVAL(p,0,FILE_GENERIC_ALL);
+ /*
+ * For pipes W2K3 seems to return
+ * 0x12019B next.
+ * This is ((FILE_GENERIC_READ|FILE_GENERIC_WRITE) & ~FILE_APPEND_DATA)
+ */
+ SIVAL(p,4,(FILE_GENERIC_READ|FILE_GENERIC_WRITE)&~FILE_APPEND_DATA);
+ }
DEBUG(5,("do_ntcreate_pipe_open: open pipe = %s\n", fname));