From c7061310b7865c635c382490703ff951c2f9af3f Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Mon, 29 Oct 2012 09:19:13 -0400 Subject: [PATCH] Revert "Windows: Media Protected if create on RO volume" This reverts commit f3f282265a3d9e3c968fd06793e6d1a91337f443. Returning STATUS_MEDIA_WRITE_PROTECTED in preference to STATUS_OBJECT_NAME_COLLISION when the file results in silent failures by some applications (ie, Firefox.exe) when the first directory in the path below the share name is the root of a .readonly volume. FIXES 131416 Change-Id: I342d9ff09ef68615371cf9d372f38fac854ed6c0 Reviewed-on: http://gerrit.openafs.org/8325 Tested-by: BuildBot Reviewed-by: Jeffrey Altman --- src/WINNT/afsrdr/kernel/lib/AFSCreate.cpp | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/src/WINNT/afsrdr/kernel/lib/AFSCreate.cpp b/src/WINNT/afsrdr/kernel/lib/AFSCreate.cpp index ddb0cd954..ef932c00a 100644 --- a/src/WINNT/afsrdr/kernel/lib/AFSCreate.cpp +++ b/src/WINNT/afsrdr/kernel/lib/AFSCreate.cpp @@ -688,28 +688,6 @@ AFSCommonCreate( IN PDEVICE_OBJECT DeviceObject, pDirectoryCB == NULL)) { - if ( pVolumeCB && - BooleanFlagOn( pVolumeCB->VolumeInformation.Characteristics, FILE_READ_ONLY_DEVICE)) - { - - AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING, - AFS_TRACE_LEVEL_VERBOSE, - "AFSCommonCreate ReadOnly Device on create Status %08lX\n", - ntStatus); - - InterlockedDecrement( &pParentDirectoryCB->OpenReferenceCount); - - AFSDbgLogMsg( AFS_SUBSYSTEM_DIRENTRY_REF_COUNTING, - AFS_TRACE_LEVEL_VERBOSE, - "AFSCommonCreate Decrement13 count on %wZ DE %p Ccb %p Cnt %d\n", - &pParentDirectoryCB->NameInformation.FileName, - pParentDirectoryCB, - NULL, - pParentDirectoryCB->OpenReferenceCount); - - try_return( ntStatus = STATUS_MEDIA_WRITE_PROTECTED); - } - if( uniComponentName.Length == 0 || pDirectoryCB != NULL) { -- 2.39.5