summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-11-19 01:46:10 +0000
committerJeremy Allison <jra@samba.org>2002-11-19 01:46:10 +0000
commitfaf1f0df4d8f047fb2dcbd27305c61a1e70a8db3 (patch)
tree0fd1269dd954e65c5ff90cf50556ed6ffb160dc2 /source3/smbd
parent1c5ffbd0aca045e5d480cf75a08d87f8199f1699 (diff)
downloadsamba-faf1f0df4d8f047fb2dcbd27305c61a1e70a8db3.tar.gz
samba-faf1f0df4d8f047fb2dcbd27305c61a1e70a8db3.tar.bz2
samba-faf1f0df4d8f047fb2dcbd27305c61a1e70a8db3.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 3bf21ca936973efcd74b826bc750131c6ab2c701)
Diffstat (limited to 'source3/smbd')
-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;