windows-mountpoint-is-directory-20070622
authorJeffrey Altman <jaltman@secure-endpoints.com>
Fri, 22 Jun 2007 06:30:47 +0000 (06:30 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Fri, 22 Jun 2007 06:30:47 +0000 (06:30 +0000)
when the CIFS client requests a directory listing without directories,
do not include mount points.

src/WINNT/afsd/smb.c
src/WINNT/afsd/smb3.c

index ed99919..d60b6eb 100644 (file)
@@ -4237,6 +4237,7 @@ long smb_ReceiveCoreSearchDir(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *ou
                          "has filetype %d", osi_LogSaveString(smb_logp, dep->name),
                           fileType);
                 if (fileType == CM_SCACHETYPE_DIRECTORY ||
+                    fileType == CM_SCACHETYPE_MOUNTPOINT ||
                     fileType == CM_SCACHETYPE_DFSLINK ||
                     fileType == CM_SCACHETYPE_INVALID)
                     osi_Log0(smb_logp, "SMB search dir skipping directory or bad link");
index 5b9fa9f..480c92d 100644 (file)
@@ -4441,6 +4441,7 @@ long smb_T2SearchDirSingle(smb_vc_t *vcp, smb_tran2Packet_t *p, smb_packet_t *op
 
     if (!(attribute & SMB_ATTR_DIRECTORY) &&
         (targetscp->fileType == CM_SCACHETYPE_DIRECTORY ||
+         targetscp->fileType == CM_SCACHETYPE_MOUNTPOINT ||
          targetscp->fileType == CM_SCACHETYPE_DFSLINK ||
          targetscp->fileType == CM_SCACHETYPE_INVALID)) {
 
@@ -5101,6 +5102,7 @@ long smb_ReceiveTran2SearchDir(smb_vc_t *vcp, smb_tran2Packet_t *p, smb_packet_t
                  "has filetype %d", dep->name,
                  fileType);*/
                 if (fileType == CM_SCACHETYPE_DIRECTORY ||
+                    fileType == CM_SCACHETYPE_MOUNTPOINT ||
                     fileType == CM_SCACHETYPE_DFSLINK ||
                     fileType == CM_SCACHETYPE_INVALID)
                     osi_Log0(smb_logp, "T2 search dir skipping directory or bad link");