• 大小: 1.54MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-08-13
  • 语言: 其他
  • 标签: wdkfastfat  

资源简介

WDK开发资源中 fastfat文件系统代码, 包括windows xp, windows 7, wlh, wnet平台,替换系统中drivers\fastfat.sys,能识别使用fat32分区

资源截图

代码片段和文件信息

/*++

Copyright (c) 1989-2000 Microsoft Corporation

Module Name:

    AcChkSup.c

Abstract:

    This module implements the FAT access checking routine


--*/

#include “FatProcs.h“

//
//  Our debug trace level
//

#define Dbg                              (DEBUG_TRACE_ACCHKSUP)

NTSTATUS
FatCreateRestrictEveryoneToken(
    IN PACCESS_TOKEN Token
    OUT PACCESS_TOKEN *RestrictedToken
    );

#ifdef ALLOC_PRAGMA
#pragma alloc_text(PAGE FatCheckFileAccess)
#pragma alloc_text(PAGE FatCheckManageVolumeAccess)
#pragma alloc_text(PAGE FatCreateRestrictEveryoneToken)
#pragma alloc_text(PAGE FatExplicitDeviceAccessGranted)
#endif


BOOLEAN
FatCheckFileAccess (
    PIRP_CONTEXT IrpContext
    IN UCHAR DirentAttributes
    IN PACCESS_MASK DesiredAccess
    )

/*++

Routine Description:

    This routine checks if a desired access is allowed to a file represented
    by the specified DirentAttriubutes.

Arguments:

    DirentAttributes - Supplies the Dirent attributes to check access for

    DesiredAccess - Supplies the desired access mask that we are checking for

Return Value:

    BOOLEAN - TRUE if access is allowed and FALSE otherwise

--*/

{
    BOOLEAN Result;

    DebugTrace(+1 Dbg “FatCheckFileAccess\n“ 0);
    DebugTrace( 0 Dbg “DirentAttributes = %8lx\n“ DirentAttributes);
    DebugTrace( 0 Dbg “DesiredAccess    = %8lx\n“ *DesiredAccess);

    PAGED_CODE();

    //
    //  This procedures is programmed like a string of filters each
    //  filter checks to see if some access is allowed  if it is not allowed
    //  the filter return FALSE to the user without further checks otherwise
    //  it moves on to the next filter.  The filter check is to check for
    //  desired access flags that are not allowed for a particular dirent
    //

    Result = TRUE;

    try {

        //
        //  Check for Volume ID or Device Dirents these are not allowed user
        //  access at all
        //

        if (FlagOn(DirentAttributes FAT_DIRENT_ATTR_VOLUME_ID) ||
            FlagOn(DirentAttributes FAT_DIRENT_ATTR_DEVICE)) {

            DebugTrace(0 Dbg “Cannot access volume id or device\n“ 0);

            try_return( Result = FALSE );
        }

        //
        //  Check the desired access for the object - we only blackball that
        //  we do not understand.  The model of filesystems using ACLs is that
        //  they do not type the ACL to the object the ACL is on.  Permissions
        //  are not checked for consistency vs. the object type - dir/file.
        //

        if (FlagOn(*DesiredAccess ~(DELETE |
                                     READ_CONTROL |
                                     WRITE_OWNER |
                                     WRITE_DAC |
                                     SYNCHRONIZE |
                                     ACCESS_SYSTEM_SECURITY |
                                     FIL

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2012-05-01 17:27  fastfat\
     文件          55  2012-05-01 17:27  fastfat\dirs
     目录           0  2012-05-01 17:27  fastfat\Win7\
     文件       11909  2010-02-08 19:29  fastfat\Win7\acchksup.c
     文件      156596  2010-02-08 19:29  fastfat\Win7\allocsup.c
     文件       50689  2010-02-08 19:29  fastfat\Win7\cachesup.c
     文件       35122  2010-02-08 19:29  fastfat\Win7\cleanup.c
     文件       34516  2010-02-08 19:29  fastfat\Win7\close.c
     文件      192076  2010-02-08 19:29  fastfat\Win7\create.c
     文件        9700  2010-02-08 19:29  fastfat\Win7\devctrl.c
     文件       96165  2010-02-08 19:29  fastfat\Win7\deviosup.c
     文件       48849  2010-02-08 19:29  fastfat\Win7\dirctrl.c
     文件          16  2012-05-01 17:27  fastfat\Win7\dirs
     文件      107307  2010-02-08 19:29  fastfat\Win7\dirsup.c
     文件        9862  2010-02-08 19:29  fastfat\Win7\dumpsup.c
     文件       57327  2010-02-08 19:29  fastfat\Win7\ea.c
     文件      108410  2010-02-08 19:29  fastfat\Win7\easup.c
     文件         319  2010-02-08 19:29  fastfat\Win7\fastfat.rc
     文件       27208  2010-02-08 17:24  fastfat\Win7\fat.h
     文件       36424  2010-02-08 19:29  fastfat\Win7\fatdata.c
     文件       10045  2010-02-08 19:29  fastfat\Win7\fatdata.h
     文件       21418  2010-02-08 19:29  fastfat\Win7\fatinit.c
     文件       68982  2010-02-08 19:29  fastfat\Win7\fatprocs.h
     文件       47373  2010-02-08 19:29  fastfat\Win7\fatstruc.h
     文件      141900  2010-02-08 19:29  fastfat\Win7\fileinfo.c
     文件       14262  2010-02-08 19:29  fastfat\Win7\filobsup.c
     文件       31850  2010-02-08 19:29  fastfat\Win7\flush.c
     文件      214914  2010-02-08 19:29  fastfat\Win7\fsctrl.c
     文件       11728  2010-02-08 19:29  fastfat\Win7\fspdisp.c
     文件        1409  2010-02-08 17:24  fastfat\Win7\lfn.h
     文件       17788  2010-02-08 19:29  fastfat\Win7\lockctrl.c
............此处省略149个文件信息

评论

共有 条评论

相关资源