From 3e1261ddb7f036e243c80d17fa2a87dd67de04a9 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Wed, 3 Jan 2007 00:45:47 +0000 Subject: [PATCH] STABLE14-windows-unix-mode-bit-enforcement-20070102 When the Unix mode bits do not include the write bit (0200), then the file is reported to Windows as read-only. This also prevents the acquisition of write-locks. It should also prevent deletion but the code in cm_HaveAccessRights() did not remove the PRSFS_DELETE privilege from the reported rights. (cherry picked from commit 56d5e6970d27a5c99c04b105481bcf1d1bc3db1e) --- src/WINNT/afsd/cm_access.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/WINNT/afsd/cm_access.c b/src/WINNT/afsd/cm_access.c index 6676e4045..2191e4ef9 100644 --- a/src/WINNT/afsd/cm_access.c +++ b/src/WINNT/afsd/cm_access.c @@ -94,7 +94,7 @@ int cm_HaveAccessRights(struct cm_scache *scp, struct cm_user *up, long rights, if (!(scp->unixModeBits & 0400)) *outRightsp &= ~PRSFS_READ; if (!(scp->unixModeBits & 0200)) - *outRightsp &= ~PRSFS_WRITE; + *outRightsp &= ~(PRSFS_WRITE|PRSFS_DELETE); code = 1; /* fall through */ -- 2.39.5