Fix bug 6875 - trans2 FIND_FIRST2 response --> FIND_FIRST2 Data -> Fille Attributes...
authorJeremy Allison <jra@samba.org>
Fri, 6 Nov 2009 22:08:09 +0000 (14:08 -0800)
committerKarolin Seeger <kseeger@samba.org>
Wed, 23 Dec 2009 11:07:31 +0000 (12:07 +0100)
(cherry picked from commit dc9b226d8ced06b8b24eb38b411eac11eace41be)

source3/smbd/dosmode.c

index 5ae715130335d4a5117740c6450c11cce722c14c..45ea74d7e4136e0eac77584cf3c3d275c9b5a76d 100644 (file)
@@ -20,6 +20,8 @@
 
 #include "includes.h"
 
+extern enum protocol_types Protocol;
+
 static int set_sparse_flag(const SMB_STRUCT_STAT * const sbuf)
 {
 #if defined (HAVE_STAT_ST_BLOCKS) && defined(STAT_ST_BLOCKSIZE)
@@ -341,6 +343,12 @@ uint32 dos_mode_msdfs(connection_struct *conn, const char *path,SMB_STRUCT_STAT
                result |= aHIDDEN;
        }
 
+       if (Protocol <= PROTOCOL_LANMAN2) {
+               DEBUG(10,("dos_mode_msdfs : filtering result 0x%x\n",
+                       (unsigned int)result ));
+               result &= 0xff;
+       }
+
        DEBUG(8,("dos_mode_msdfs returning "));
 
        if (result & aHIDDEN) DEBUG(8, ("h"));
@@ -518,6 +526,12 @@ uint32 dos_mode(connection_struct *conn, const char *path,SMB_STRUCT_STAT *sbuf)
                result |= aHIDDEN;
        }
 
+       if (Protocol <= PROTOCOL_LANMAN2) {
+               DEBUG(10,("dos_mode : filtering result 0x%x\n",
+                       (unsigned int)result ));
+               result &= 0xff;
+       }
+
        DEBUG(8,("dos_mode returning "));
 
        if (result & aHIDDEN) DEBUG(8, ("h"));