]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Fix bug 6875 - trans2 FIND_FIRST2 response --> FIND_FIRST2 Data -> Fille Attributes...
authorJeremy Allison <jra@samba.org>
Fri, 6 Nov 2009 22:10:49 +0000 (14:10 -0800)
committerKarolin Seeger <kseeger@samba.org>
Tue, 10 Nov 2009 10:09:18 +0000 (11:09 +0100)
source/smbd/dosmode.c

index 8a5a7b0d0e2cafca943cb0d3992f6b40ef8c5e49..07e1103dc9badc5113d05b5500a3203abc096850 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)
@@ -335,6 +337,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"));
@@ -400,6 +408,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"));