]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
windows-unix-mode-bit-enforcement-20070102
authorJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 3 Jan 2007 00:44:27 +0000 (00:44 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 3 Jan 2007 00:44:27 +0000 (00:44 +0000)
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.

src/WINNT/afsd/cm_access.c

index d24fbe8b0ad0b8b5578c62bb4a8bf67a9095f157..e1aeeba3659aaeb0d432765ac267d7fd0d8b6642 100644 (file)
@@ -90,7 +90,7 @@ int cm_HaveAccessRights(struct cm_scache *scp, struct cm_user *userp, afs_uint32
     if (!(scp->unixModeBits & 0400))
         *outRightsp &= ~PRSFS_READ;
     if (!(scp->unixModeBits & 0200))
-        *outRightsp &= ~PRSFS_WRITE;
+        *outRightsp &= ~(PRSFS_WRITE|PRSFS_DELETE);
 
     code = 1;
     /* fall through */