summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-11-19 01:45:55 +0000
committerJeremy Allison <jra@samba.org>2002-11-19 01:45:55 +0000
commitcbecefb1b24d19c82ea754e5f47422e91e9c8853 (patch)
tree8a8544012bbac1ac7767cda46bb2b776cf2bd945
parentb2201f2f397a1869c1e26f957e638fe6517aa04f (diff)
downloadsamba-cbecefb1b24d19c82ea754e5f47422e91e9c8853.tar.gz
samba-cbecefb1b24d19c82ea754e5f47422e91e9c8853.tar.bz2
samba-cbecefb1b24d19c82ea754e5f47422e91e9c8853.zip
Very curious. It turns out attribute matching on truncate only matters
when opening truncate with current SYSTEM|HIDDEN -> NONE. It's fine to truncate on open with current NONE -> SYSTEM | HIDDEN. Jeremy. (This used to be commit 801b87e0f7c92553dc52b44d669a1795e2b9429f)
-rw-r--r--source3/smbd/open.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 94a705e6b6..cee2b37184 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -712,11 +712,11 @@ static BOOL open_match_attributes(connection_struct *conn, char *path, mode_t ex
/* If we're mapping SYSTEM and HIDDEN ensure they match. */
if (lp_map_system(SNUM(conn))) {
- if ((old_dos_mode & FILE_ATTRIBUTE_SYSTEM) != (new_dos_mode & FILE_ATTRIBUTE_SYSTEM))
+ if ((old_dos_mode & FILE_ATTRIBUTE_SYSTEM) && !(new_dos_mode & FILE_ATTRIBUTE_SYSTEM))
return False;
}
if (lp_map_hidden(SNUM(conn))) {
- if ((old_dos_mode & FILE_ATTRIBUTE_HIDDEN) != (new_dos_mode & FILE_ATTRIBUTE_HIDDEN))
+ if ((old_dos_mode & FILE_ATTRIBUTE_HIDDEN) && !(new_dos_mode & FILE_ATTRIBUTE_HIDDEN))
return False;
}
return True;