summaryrefslogtreecommitdiff
path: root/source3/smbd/reply.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/reply.c')
-rw-r--r--source3/smbd/reply.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 01e7df282c..2b361fd43a 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -673,12 +673,16 @@ int reply_search(connection_struct *conn, char *inbuf,char *outbuf, int dum_size
if (strlen(directory) == 0)
pstrcpy(directory,"./");
memset((char *)status,'\0',21);
- SCVAL(status,0,dirtype);
+ SCVAL(status,0,(dirtype & 0x1F));
}
else
{
+ int status_dirtype;
memcpy(status,p,21);
- dirtype = CVAL(status,0) & 0x1F;
+ status_dirtype = CVAL(status,0) & 0x1F;
+ if (status_dirtype != (dirtype & 0x1F))
+ dirtype = status_dirtype;
+
conn->dirptr = dptr_fetch(status+12,&dptr_num);
if (!conn->dirptr)
goto SearchEmpty;