summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-03-13 03:45:09 +0000
committerAndrew Tridgell <tridge@samba.org>2001-03-13 03:45:09 +0000
commit93143c96a6c7d882d83ea2724e4c1985fc1dbc2d (patch)
tree286fb25c9dec0204afefc3c494343db66fdeffe9
parentf869164a16db914f5b101cd82f54bf50b3076402 (diff)
downloadsamba-93143c96a6c7d882d83ea2724e4c1985fc1dbc2d.tar.gz
samba-93143c96a6c7d882d83ea2724e4c1985fc1dbc2d.tar.bz2
samba-93143c96a6c7d882d83ea2724e4c1985fc1dbc2d.zip
- convert chkpath
- devicename in tconx is always ascii (This used to be commit 242a6a96d10beeb54e93226ae50bd361486e1c0d)
-rw-r--r--source3/smbd/reply.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 1240d16a98..0cff1d5a56 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -312,7 +312,7 @@ int reply_tcon_and_X(connection_struct *conn, char *inbuf,char *outbuf,int lengt
*q++ = 0;
fstrcpy(user,q);
}
- p += srvstr_pull(inbuf, devicename, p, sizeof(devicename), 6, STR_CONVERT);
+ p += srvstr_pull(inbuf, devicename, p, sizeof(devicename), 6, STR_CONVERT|STR_ASCII);
DEBUG(4,("Got device type %s\n",devicename));
@@ -342,7 +342,8 @@ int reply_tcon_and_X(connection_struct *conn, char *inbuf,char *outbuf,int lengt
STR_CONVERT|STR_TERMINATE|STR_ASCII);
set_message_end(outbuf,p);
} else {
- char *fsname = lp_fstype(SNUM(conn));
+ /* NT sets the fstype of IPC$ to the null string */
+ char *fsname = IS_IPC(conn) ? "" : lp_fstype(SNUM(conn));
set_message(outbuf,3,0,True);
@@ -1087,8 +1088,8 @@ int reply_chkpth(connection_struct *conn, char *inbuf,char *outbuf, int dum_size
BOOL bad_path = False;
SMB_STRUCT_STAT sbuf;
START_PROFILE(SMBchkpth);
-
- pstrcpy(name,smb_buf(inbuf) + 1);
+
+ srvstr_pull(inbuf, name, smb_buf(inbuf) + 1, sizeof(name), -1, STR_TERMINATE);
RESOLVE_DFSPATH(name, conn, inbuf, outbuf);