AFS does not impose a restriction on renames of open files.
Failure to permit the rename can cause problems if an anti-malware
service opens the file immediately after the application performing
the rename does so.
Change-Id: Ib23a6a893c5c575e89b8a817faec4c11300a04b7
Reviewed-on: http://gerrit.openafs.org/6503
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
try_return( ntStatus = STATUS_ACCESS_DENIED);
}
}
- else
- {
-
- if( pSrcFcb->OpenHandleCount > 1)
- {
-
- AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
- AFS_TRACE_LEVEL_ERROR,
- "AFSSetRenameInfo Attempt to rename directory with open references %wZ\n",
- &pSrcCcb->DirectoryCB->NameInformation.FileName);
-
- try_return( ntStatus = STATUS_ACCESS_DENIED);
- }
- }
//
// Resolve the target fileobject