#define AFS_DEVICE_FLAG_HIDE_DOT_NAMES 0x00000001
#define AFS_DEVICE_FLAG_REDIRECTOR_SHUTDOWN 0x00000002
+#define AFS_DEVICE_FLAG_DISABLE_SHORTNAMES 0x00000004
#endif
//
#define AFS_REDIR_INIT_FLAG_HIDE_DOT_FILES 0x00000001
-
#define AFS_REDIR_INIT_NO_PAGING_FILE 0x00000002
+#define AFS_REDIR_INIT_FLAG_DISABLE_SHORTNAMES 0x00000004
typedef struct _AFS_REDIR_INIT_INFO_CB
{
SetFlag( pDevExt->DeviceFlags, AFS_DEVICE_FLAG_HIDE_DOT_NAMES);
}
+ if( BooleanFlagOn( RedirInitInfo->Flags, AFS_REDIR_INIT_FLAG_DISABLE_SHORTNAMES))
+ {
+
+ //
+ // Hide files which begin with .
+ //
+
+ SetFlag( pDevExt->DeviceFlags, AFS_DEVICE_FLAG_DISABLE_SHORTNAMES);
+ }
+
if( RedirInitInfo->MemoryCacheOffset.QuadPart != 0 &&
RedirInitInfo->MemoryCacheLength.QuadPart != 0)
{
ULONG ulRequestFlags = AFS_REQUEST_FLAG_SYNCHRONOUS;
ULONG ulCRC = 0;
UNICODE_STRING uniGUID;
+ AFSDeviceExt *pDevExt = (AFSDeviceExt *) AFSRDRDeviceObject->DeviceExtension;
__Enter
{
// Init the short name if we have one
//
- if( pCurrentDirEntry->ShortNameLength > 0)
+ if( !BooleanFlagOn( pDevExt->DeviceFlags, AFS_DEVICE_FLAG_DISABLE_SHORTNAMES) &&
+ pCurrentDirEntry->ShortNameLength > 0)
{
UNICODE_STRING uniShortName;
(12 * sizeof( WCHAR)));
}
}
+ else
+ {
+
+ //
+ // No short name or short names are disabled
+ //
+
+ pDirNode->Type.Data.ShortNameTreeEntry.HashIndex = 0;
+ }
//
// Insert the node into the name tree
ULONGLONG ullIndex = 0;
UNICODE_STRING uniGUID;
LONG lCount;
+ AFSDeviceExt *pDevExt = (AFSDeviceExt *) AFSRDRDeviceObject->DeviceExtension;
__Enter
{
// Init the short name if we have one
//
- if( pCurrentDirEntry->ShortNameLength > 0)
+ if( !BooleanFlagOn( pDevExt->DeviceFlags, AFS_DEVICE_FLAG_DISABLE_SHORTNAMES) &&
+ pCurrentDirEntry->ShortNameLength > 0)
{
UNICODE_STRING uniShortName;
else
{
- AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING,
- AFS_TRACE_LEVEL_VERBOSE,
- "AFSVerifyDirectoryContent NO short name for DE %p for %wZ FID %08lX-%08lX-%08lX-%08lX\n",
- pDirNode,
- &pDirNode->NameInformation.FileName,
- pCurrentDirEntry->FileId.Cell,
- pCurrentDirEntry->FileId.Volume,
- pCurrentDirEntry->FileId.Vnode,
- pCurrentDirEntry->FileId.Unique);
+ //
+ // No short name or short names have been disabled
+ //
+
+ pDirNode->Type.Data.ShortNameTreeEntry.HashIndex = 0;
}
//
AFSDirectoryCB *pDirNode = NULL;
ULONG ulCRC = 0;
LARGE_INTEGER liOldDataVersion;
+ AFSDeviceExt *pDevExt = (AFSDeviceExt *) AFSRDRDeviceObject->DeviceExtension;
__Enter
{
// Init the short name if we have one
//
- if( pResultCB->DirEnum.ShortNameLength > 0)
+ if( !BooleanFlagOn( pDevExt->DeviceFlags, AFS_DEVICE_FLAG_DISABLE_SHORTNAMES) &&
+ pResultCB->DirEnum.ShortNameLength > 0)
{
UNICODE_STRING uniShortName;
pDirNode,
&pDirNode->NameInformation.FileName);
}
+ else
+ {
+ //
+ // No short name or short names are disabled
+ //
+
+ pDirNode->Type.Data.ShortNameTreeEntry.HashIndex = 0;
+ }
if ( !BooleanFlagOn( ParentObjectInfo->Flags, AFS_OBJECT_FLAGS_VERIFY))
{
AFSFileRenameCB *pRenameCB = NULL;
AFSFileRenameResultCB *pRenameResultCB = NULL;
ULONG ulResultLen = 0;
+ AFSDeviceExt *pDevExt = (AFSDeviceExt *) AFSRDRDeviceObject->DeviceExtension;
__Enter
{
DirectoryCB->NameInformation.ShortNameLength = pRenameResultCB->DirEnum.ShortNameLength;
- if( DirectoryCB->NameInformation.ShortNameLength > 0)
+ if( !BooleanFlagOn( pDevExt->DeviceFlags, AFS_DEVICE_FLAG_DISABLE_SHORTNAMES) &&
+ DirectoryCB->NameInformation.ShortNameLength > 0)
{
UNICODE_STRING uniShortName;
{
NTSTATUS ntStatus = STATUS_SUCCESS;
+ AFSDeviceExt *pDeviceExt = (AFSDeviceExt *)AFSRDRDeviceObject->DeviceExtension;
PIO_STACK_LOCATION pIrpSp = IoGetCurrentIrpStackLocation( Irp);
IO_STATUS_BLOCK stIoSb = {0,0};
AFSFcb *pSrcFcb = NULL, *pTargetDcb = NULL, *pTargetFcb = NULL;
&pTargetDirEntry);
}
- if( pTargetDirEntry == NULL && RtlIsNameLegalDOS8Dot3( &uniTargetName,
+ if ( !BooleanFlagOn( pDeviceExt->DeviceFlags, AFS_DEVICE_FLAG_DISABLE_SHORTNAMES) &&
+ pTargetDirEntry == NULL && RtlIsNameLegalDOS8Dot3( &uniTargetName,
NULL,
NULL))
{
pSrcCcb->DirectoryCB->CaseInsensitiveTreeEntry.HashIndex = AFSGenerateCRC( &pSrcCcb->DirectoryCB->NameInformation.FileName,
TRUE);
- if( pSrcCcb->DirectoryCB->NameInformation.ShortNameLength > 0 &&
+ if( !BooleanFlagOn( pDeviceExt->DeviceFlags, AFS_DEVICE_FLAG_DISABLE_SHORTNAMES) &&
+ pSrcCcb->DirectoryCB->NameInformation.ShortNameLength > 0 &&
!RtlIsNameLegalDOS8Dot3( &pSrcCcb->DirectoryCB->NameInformation.FileName,
NULL,
NULL))
{
NTSTATUS ntStatus = STATUS_SUCCESS;
+ AFSDeviceExt *pDeviceExt = (AFSDeviceExt *)AFSRDRDeviceObject->DeviceExtension;
BOOLEAN bAcquiredLock = FALSE;
AFSDirectoryCB *pCurrentDirEntry = NULL, *pNextDirEntry = NULL;
AFSFcb *pFcb = NULL;
if( BooleanFlagOn( pCurrentDirEntry->Flags, AFS_DIR_ENTRY_VALID))
{
- if( !BooleanFlagOn( pCurrentDirEntry->Flags, AFS_DIR_ENTRY_INSERTED_SHORT_NAME) &&
+ if( !BooleanFlagOn( pDeviceExt->DeviceFlags, AFS_DEVICE_FLAG_DISABLE_SHORTNAMES) &&
+ !BooleanFlagOn( pCurrentDirEntry->Flags, AFS_DIR_ENTRY_INSERTED_SHORT_NAME) &&
pCurrentDirEntry->Type.Data.ShortNameTreeEntry.HashIndex > 0)
{
{
NTSTATUS ntStatus = STATUS_SUCCESS;
+ AFSDeviceExt *pDeviceExt = (AFSDeviceExt *)AFSRDRDeviceObject->DeviceExtension;
AFSDirectoryCB *pDirEntry = NULL;
ULONG ulCRC = 0;
LONG lCount;
// a lookup in the short name tree
//
- if( RtlIsNameLegalDOS8Dot3( ComponentName,
+ if( !BooleanFlagOn( pDeviceExt->DeviceFlags, AFS_DEVICE_FLAG_DISABLE_SHORTNAMES) &&
+ RtlIsNameLegalDOS8Dot3( ComponentName,
NULL,
NULL))
{
// a lookup in the short name tree
//
- if( RtlIsNameLegalDOS8Dot3( &uniSearchName,
+ if( !BooleanFlagOn( pDevExt->DeviceFlags, AFS_DEVICE_FLAG_DISABLE_SHORTNAMES) &&
+ RtlIsNameLegalDOS8Dot3( &uniSearchName,
NULL,
NULL))
{
// a lookup in the short name tree
//
- if( RtlIsNameLegalDOS8Dot3( &uniComponentName,
+ if( !BooleanFlagOn( pDeviceExt->DeviceFlags, AFS_DEVICE_FLAG_DISABLE_SHORTNAMES) &&
+ RtlIsNameLegalDOS8Dot3( &uniComponentName,
NULL,
NULL))
{