OpenAFS Master Repository branch, master, updated. openafs-devel-1_5_76-1874-gb78b8f6
Gerrit Code Review
gerrit@openafs.org
Fri, 11 Nov 2011 10:01:10 -0800 (PST)
The following commit has been merged in the master branch:
commit b78b8f64a69481e59e957ebe09315fc5b8b60c17
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Oct 5 03:36:48 2011 -0400
Windows: Enforce Share Access
Use file server locks to enforce file share access modes
via the afs redirector interface. The approach taken
integrates share mode enforcement with the file server
lock tracking code in the service. The share mode
enforcement mimics that of the SMB Server interface.
This patchset includes two functional changes to
the previous locking and share mode processing:
1. The cm_scache_t fsLockCount field is used to
determine if the desired lock can be granted
by the file server. If not, the RXAFS_SetLock()
request is skipped and the request is failed
locally.
2. cm_CheckNTOpen() now accepts the desired and
and share access modes. The share access mode
is used to determine if a test lock should be
obtained at all. If the share mode is FILE_SHARE_WRITE
then no lock is requested. This change permits
Microsoft Office applications to offer the user
the ability to open the file in read-only mode
and notify the user when the document can be
opened in read-write mode.
Developed with Peter Scott <pscott@kerneldrivers.com>
FIXES 130239
Change-Id: If9b4beb74586296d4feae52dd06c03f0b8b595cd
Reviewed-on: http://gerrit.openafs.org/5823
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
src/WINNT/afsd/cm_scache.h | 2 +-
src/WINNT/afsd/cm_vnodeops.c | 81 ++++++----
src/WINNT/afsd/cm_vnodeops.h | 13 +-
src/WINNT/afsd/smb3.c | 8 +-
src/WINNT/afsrdr/common/AFSUserDefines.h | 8 +
src/WINNT/afsrdr/common/AFSUserStructs.h | 21 +++
src/WINNT/afsrdr/kernel/lib/AFSCleanup.cpp | 38 +++++
src/WINNT/afsrdr/kernel/lib/AFSCreate.cpp | 34 ++++
src/WINNT/afsrdr/kernel/lib/Include/AFSStructs.h | 6 +
src/WINNT/afsrdr/user/RDRFunction.c | 187 +++++++++++++++++++++-
src/WINNT/afsrdr/user/RDRInit.cpp | 23 +++
src/WINNT/afsrdr/user/RDRPrototypes.h | 8 +
12 files changed, 386 insertions(+), 43 deletions(-)
--
OpenAFS Master Repository