Filter the returned DOS attributes by 0xFF for clients
authorJeremy Allison <jra@samba.org>
Wed, 4 Nov 2009 23:25:15 +0000 (15:25 -0800)
committerJeremy Allison <jra@samba.org>
Wed, 4 Nov 2009 23:25:15 +0000 (15:25 -0800)
using older protocols (LANMAN2 or below).
Jeremy.

source3/smbd/dosmode.c

index 7cb84b35a70a9dd02513f387f09fafe448e7ffe4..199a67371faa3ea0796d8060c8dedc63229023d9 100644 (file)
@@ -380,6 +380,12 @@ uint32 dos_mode_msdfs(connection_struct *conn,
                result |= aHIDDEN;
        }
 
+       if (get_Protocol() <= PROTOCOL_LANMAN2) {
+               DEBUG(10,("dos_mode_msdfs : filtering protocol 0x%x to 0xff\n",
+                       (unsigned int)result ));
+               result &= 0xff;
+       }
+
        DEBUG(8,("dos_mode_msdfs returning "));
 
        if (result & aHIDDEN) DEBUG(8, ("h"));
@@ -560,6 +566,12 @@ uint32 dos_mode(connection_struct *conn, const struct smb_filename *smb_fname)
                result |= aHIDDEN;
        }
 
+       if (get_Protocol() <= PROTOCOL_LANMAN2) {
+               DEBUG(10,("dos_mode : filtering protocol 0x%x to 0xff\n",
+                       (unsigned int)result ));
+               result &= 0xff;
+       }
+
        DEBUG(8,("dos_mode returning "));
 
        if (result & aHIDDEN) DEBUG(8, ("h"));