diff options
author | Jeremy Allison <jra@samba.org> | 2002-11-19 01:46:10 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-11-19 01:46:10 +0000 |
commit | faf1f0df4d8f047fb2dcbd27305c61a1e70a8db3 (patch) | |
tree | 0fd1269dd954e65c5ff90cf50556ed6ffb160dc2 /source3/smbd | |
parent | 1c5ffbd0aca045e5d480cf75a08d87f8199f1699 (diff) | |
download | samba-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.c | 4 |
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; |