diff options
author | Andrew Tridgell <tridge@samba.org> | 2001-03-13 03:45:09 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2001-03-13 03:45:09 +0000 |
commit | 242a6a96d10beeb54e93226ae50bd361486e1c0d (patch) | |
tree | 08e640e9016a80d719910e8319a0b5c15a79f0cf /source/smbd/reply.c | |
parent | 84fc5a7795fe6e3b993649ecc05f6685f8295c02 (diff) | |
download | samba-242a6a96d10beeb54e93226ae50bd361486e1c0d.tar.gz samba-242a6a96d10beeb54e93226ae50bd361486e1c0d.tar.xz samba-242a6a96d10beeb54e93226ae50bd361486e1c0d.zip |
- convert chkpath
- devicename in tconx is always ascii
Diffstat (limited to 'source/smbd/reply.c')
-rw-r--r-- | source/smbd/reply.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/smbd/reply.c b/source/smbd/reply.c index 1240d16a986..0cff1d5a566 100644 --- a/source/smbd/reply.c +++ b/source/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); |