Windows: AFSParseName edge cases

If the input path is \afs\ behave as if the path is \afs.

If the input path is \afs\*\ detect the wildcard and return
STATUS_OBJECT_NAME_INVALID.

Change-Id: I0ef4f30fb3b6245a52160b5e7f9233bc5f599485
Reviewed-on: http://gerrit.openafs.org/6553
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
This commit is contained in:
Jeffrey Altman 2012-01-13 23:57:10 -05:00 committed by Jeffrey Altman
parent 96b9900d30
commit f549911027

View File

@ -3097,6 +3097,18 @@ AFSParseName( IN PIRP Irp,
}
}
if( FsRtlDoesNameContainWildCards( &uniFullName))
{
AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
AFS_TRACE_LEVEL_ERROR,
"AFSParseName (%08lX) Component %wZ contains wild cards\n",
Irp,
&uniFullName);
try_return( ntStatus = STATUS_OBJECT_NAME_INVALID);
}
AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
AFS_TRACE_LEVEL_VERBOSE_2,
"AFSParseName (%08lX) Processing full name %wZ\n",
@ -3246,11 +3258,24 @@ AFSParseName( IN PIRP Irp,
&uniComponentName,
&uniRemainingPath);
if( FsRtlDoesNameContainWildCards( &uniFullName))
{
AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
AFS_TRACE_LEVEL_ERROR,
"AFSParseName (%08lX) Component %wZ contains wild cards\n",
Irp,
&uniComponentName);
try_return( ntStatus = STATUS_OBJECT_NAME_INVALID);
}
//
// If this is the ALL access then perform some additional processing
//
if( RtlCompareUnicodeString( &uniComponentName,
if( uniComponentName.Length == 0 ||
RtlCompareUnicodeString( &uniComponentName,
&AFSGlobalRootName,
TRUE) == 0)
{