From: Joel Holdsworth <joel@airwebreathe.org.uk> --- server/fd.c | 2 +- server/file.h | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/server/fd.c b/server/fd.c index 9982d57aeb8..6e9a975f342 100644 --- a/server/fd.c +++ b/server/fd.c @@ -1982,7 +1982,7 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam 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; + if (access & (FILE_READ_DATA|FILE_READ_ATTRIBUTES|FILE_READ_EA)) rw_mode = O_RDWR; else rw_mode = O_WRONLY; } else rw_mode = O_RDONLY; diff --git a/server/file.h b/server/file.h index 7a7c599bd6b..fd691802b79 100644 --- a/server/file.h +++ b/server/file.h @@ -292,10 +292,6 @@ static inline int async_queued( struct async_queue *queue ) return !list_empty( &queue->queue ); } - -/* access rights that require Unix read permission */ -#define FILE_UNIX_READ_ACCESS (FILE_READ_DATA|FILE_READ_ATTRIBUTES|FILE_READ_EA) - /* magic file access rights for mappings */ #define FILE_MAPPING_IMAGE 0x80000000 /* set for SEC_IMAGE mappings */ #define FILE_MAPPING_WRITE 0x40000000 /* set for writable shared mappings */ -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/8030