From 93143c96a6c7d882d83ea2724e4c1985fc1dbc2d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 13 Mar 2001 03:45:09 +0000 Subject: - convert chkpath - devicename in tconx is always ascii (This used to be commit 242a6a96d10beeb54e93226ae50bd361486e1c0d) --- source3/smbd/reply.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'source3/smbd/reply.c') 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); -- cgit