* fhandler.cc (fhandler_base::open): Only set R/O attribute if ACLs

are not used.
This commit is contained in:
Corinna Vinschen 2009-08-26 19:37:34 +00:00
parent 1f14755fd2
commit 50bd7b0bb6
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2009-08-26 Corinna Vinschen <corinna@vinschen.de>
* fhandler.cc (fhandler_base::open): Only set R/O attribute if ACLs
are not used.
2009-08-24 Corinna Vinschen <corinna@vinschen.de> 2009-08-24 Corinna Vinschen <corinna@vinschen.de>
* mount.cc (fs_info::update): Add comment. * mount.cc (fs_info::update): Add comment.

View File

@ -553,8 +553,9 @@ fhandler_base::open (int flags, mode_t mode)
{ {
file_attributes |= FILE_ATTRIBUTE_NORMAL; file_attributes |= FILE_ATTRIBUTE_NORMAL;
/* If mode has no write bits set, we set the R/O attribute. */ /* If mode has no write bits set, and ACLs are not used, we set
if (!(mode & (S_IWUSR | S_IWGRP | S_IWOTH))) the DOS R/O attribute. */
if (!has_acls () && !(mode & (S_IWUSR | S_IWGRP | S_IWOTH)))
file_attributes |= FILE_ATTRIBUTE_READONLY; file_attributes |= FILE_ATTRIBUTE_READONLY;
/* If the file should actually be created and has ACLs, /* If the file should actually be created and has ACLs,