summaryrefslogtreecommitdiffstats
path: root/source/smbd/reply.c
diff options
context:
space:
mode:
authorShirish Kalele <kalele@samba.org>2001-08-29 19:56:27 +0000
committerShirish Kalele <kalele@samba.org>2001-08-29 19:56:27 +0000
commitc05e1f386641d853659900d6f5d31f551572af2f (patch)
tree726329567e35c18d8f586ad7eed61d629ed50f33 /source/smbd/reply.c
parent2b6dc3c8c21d4f9d23d4383a7ea9d3f12a047037 (diff)
downloadsamba-c05e1f386641d853659900d6f5d31f551572af2f.tar.gz
samba-c05e1f386641d853659900d6f5d31f551572af2f.tar.xz
samba-c05e1f386641d853659900d6f5d31f551572af2f.zip
Windows 95/98 clients send DFS format pathnames without setting the DFS bit in
flg2. So you never really know how to resolve the pathname (as DFS or as tcon-relative). This fix works around this problem.
Diffstat (limited to 'source/smbd/reply.c')
-rw-r--r--source/smbd/reply.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/source/smbd/reply.c b/source/smbd/reply.c
index 59dd6061619..7f674c8da2b 100644
--- a/source/smbd/reply.c
+++ b/source/smbd/reply.c
@@ -1170,8 +1170,6 @@ int reply_getatr(connection_struct *conn, char *inbuf,char *outbuf, int dum_size
RESOLVE_DFSPATH(fname, conn, inbuf, outbuf);
- /* if((SVAL(inbuf,smb_flg2) & FLAGS2_DFS_PATHNAMES) && dfs_redirect(fname,conn)) return(dfs_path_error(inbuf,outbuf));
- */
/* dos smetimes asks for a stat of "" - it returns a "hidden directory"
under WfWg - weird! */
if (! (*fname))
@@ -1352,9 +1350,9 @@ int reply_search(connection_struct *conn, char *inbuf,char *outbuf, int dum_size
path = smb_buf(inbuf) + 1;
status_len = SVAL(smb_buf(inbuf),3 + strlen(path));
-
+ RESOLVE_DFSPATH(path, conn, inbuf, outbuf);
/* dirtype &= ~aDIR; */
-
+
if (status_len == 0)
{
SMB_STRUCT_STAT sbuf;
@@ -1471,11 +1469,11 @@ int reply_search(connection_struct *conn, char *inbuf,char *outbuf, int dum_size
SearchEmpty:
- if (numentries == 0 || !ok)
+ if ( (numentries == 0) || !ok)
{
- CVAL(outbuf,smb_rcls) = ERRDOS;
- SSVAL(outbuf,smb_err,ERRnofiles);
- dptr_close(&dptr_num);
+ CVAL(outbuf,smb_rcls) = ERRDOS;
+ SSVAL(outbuf,smb_err,ERRnofiles);
+ dptr_close(&dptr_num);
}
/* If we were called as SMBffirst with smb_search_id == NULL
@@ -1503,7 +1501,7 @@ int reply_search(connection_struct *conn, char *inbuf,char *outbuf, int dum_size
uint16 flg2 = SVAL(outbuf,smb_flg2);
SSVAL(outbuf,smb_flg2,flg2 | 0x40); /* IS_LONG_NAME */
}
-
+
outsize += DIR_STRUCT_SIZE*numentries;
smb_setlen(outbuf,outsize - 4);