From: Joel Holdsworth joel@airwebreathe.org.uk
--- server/fd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/server/fd.c b/server/fd.c index bb0e90d99d0..1816486081d 100644 --- a/server/fd.c +++ b/server/fd.c @@ -1935,7 +1935,8 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam flags &= ~(O_CREAT | O_EXCL | O_TRUNC); }
- if ((access & FILE_UNIX_WRITE_ACCESS) && !(options & FILE_DIRECTORY_FILE)) + if ((access & (FILE_WRITE_DATA|FILE_APPEND_DATA|FILE_WRITE_ATTRIBUTES|FILE_WRITE_EA)) && + !(options & FILE_DIRECTORY_FILE)) { if (access & FILE_UNIX_READ_ACCESS) rw_mode = O_RDWR; else rw_mode = O_WRONLY;