summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2009-11-06 14:10:49 -0800
committerKarolin Seeger <kseeger@samba.org>2010-01-13 14:00:54 +0100
commitb16230c603cb21d24e150ac04f868def227bc934 (patch)
tree0dc48d1a7474f90871b8efbb978fc2fcbbbd6df4
parenta3f264ffd954e596c7bb732341435729735f50ab (diff)
downloadsamba-b16230c603cb21d24e150ac04f868def227bc934.tar.gz
samba-b16230c603cb21d24e150ac04f868def227bc934.tar.xz
samba-b16230c603cb21d24e150ac04f868def227bc934.zip
Fix bug 6875 - trans2 FIND_FIRST2 response --> FIND_FIRST2 Data -> Fille Attributes are returned as 0x220 for LANMAN2.1 dialect Jeremy.
(cherry picked from commit f871ff6367b7bd1b49e8aab649f614fd511bfa6a)
-rw-r--r--source/smbd/dosmode.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/source/smbd/dosmode.c b/source/smbd/dosmode.c
index 8a5a7b0d0e2..07e1103dc9b 100644
--- a/source/smbd/dosmode.c
+++ b/source/smbd/dosmode.c
@@ -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"));