summaryrefslogtreecommitdiffstats
path: root/source3/smbd
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2001-06-29 01:58:48 +0000
committerTim Potter <tpot@samba.org>2001-06-29 01:58:48 +0000
commitf83f2cd4fa3a610a92b17ac8006390cdd1f7ca94 (patch)
treeaf5b743c317c1897564e6614a1abf26e4dde66a8 /source3/smbd
parentb3443597e2eedd2b64630ccd5ec43cf0b3c5f148 (diff)
downloadsamba-f83f2cd4fa3a610a92b17ac8006390cdd1f7ca94.tar.gz
samba-f83f2cd4fa3a610a92b17ac8006390cdd1f7ca94.tar.xz
samba-f83f2cd4fa3a610a92b17ac8006390cdd1f7ca94.zip
Win9x weirdness. When setting the named pipe handle state on a Unicode
server, Win9x only sends \PIPE instead of \PIPE\. Looks suspiciously like an off-by one bug in the Win9x dce/rpc pipe code. (This used to be commit b4a9079833c261705e18fdcaab752cb5292a078f)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/ipc.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source3/smbd/ipc.c b/source3/smbd/ipc.c
index efad2d27c0d..eb6ccb4fcec 100644
--- a/source3/smbd/ipc.c
+++ b/source3/smbd/ipc.c
@@ -492,10 +492,18 @@ int reply_trans(connection_struct *conn, char *inbuf,char *outbuf, int size, int
(name[strlen(local_machine)+1] == '\\'))
name_offset = strlen(local_machine)+1;
- if (strncmp(&name[name_offset],"\\PIPE\\",strlen("\\PIPE\\")) == 0) {
+ if (strnequal(&name[name_offset], "\\PIPE", strlen("\\PIPE"))) {
+ name_offset += strlen("\\PIPE");
+
+ /* Win9x weirdness. When talking to a unicode server Win9x
+ only sends \PIPE instead of \PIPE\ */
+
+ if (name[name_offset] == '\\')
+ name_offset++;
+
DEBUG(5,("calling named_pipe\n"));
outsize = named_pipe(conn,vuid,outbuf,
- name+name_offset+strlen("\\PIPE\\"),setup,data,params,
+ name+name_offset,setup,data,params,
suwcnt,tdscnt,tpscnt,msrcnt,mdrcnt,mprcnt);
} else {
DEBUG(3,("invalid pipe name\n"));