Dmitry Timoshkov : server: Allow setting delete disposition on a read-only directory.
Alexandre Julliard
julliard at winehq.org
Fri Nov 9 14:12:15 CST 2018
Module: wine
Branch: master
Commit: 1affd75fcb20d6dac90add4d44c431441e139a17
URL: https://source.winehq.org/git/wine.git/?a=commit;h=1affd75fcb20d6dac90add4d44c431441e139a17
Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date: Fri Nov 9 14:01:00 2018 +0300
server: Allow setting delete disposition on a read-only directory.
Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
server/fd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/server/fd.c b/server/fd.c
index fa174f5..246b758 100644
--- a/server/fd.c
+++ b/server/fd.c
@@ -2307,8 +2307,8 @@ static void set_fd_disposition( struct fd *fd, int unlink )
return;
}
- /* can't unlink files we don't have permission to access */
- if (unlink && !(st.st_mode & (S_IWUSR | S_IWGRP | S_IWOTH)))
+ /* can't unlink files we don't have permission to write */
+ if (unlink && !(st.st_mode & (S_IWUSR | S_IWGRP | S_IWOTH)) && !S_ISDIR(st.st_mode))
{
set_error( STATUS_CANNOT_DELETE );
return;
More information about the wine-cvs
mailing list