首页
社区
课程
招聘
[求助]关于SeCreateAccessState返回的LocalAccessState状态
发表于: 2008-4-9 17:29 6756

[求助]关于SeCreateAccessState返回的LocalAccessState状态

2008-4-9 17:29
6756
Status = SeCreateAccessState( &LocalAccessState,   
                              &AuxData,   
                              DesiredAccess,   
                              &ObjectHeader->Type->TypeInfo.GenericMapping );  

调用SeCreateAccessState获得LocalAccessState之后再调用ObpCreateHandle
如果 Object在SeCreateAccessState和ObpCreateHandle之间改变了 前提是Object改变之后仍然是一个有效的对象
ObpCreateHandle能成功么?
或者说SeCreateAccessState返回的LocalAccessState状态是否相对与Object而言的?
Status = ObpCreateHandle( ObOpenHandle,   
                          Object,   
                          ObjectType,   
                          AccessState,   
                          0,   
                          HandleAttributes,   
                          NULL,   
                          AccessMode,   
                          (PVOID *)NULL,   
                          &NewHandle );  

[培训]《安卓高级研修班(网课)》月薪三万计划,掌握调试、分析还原ollvm、vmp的方法,定制art虚拟机自动化脱壳的方法

收藏
免费 0
支持
分享
最新回复 (4)
雪    币: 209
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
2
板猪..我这问题算不算有深度啊...如果算的话帮我转到系统底层的区啊~~俺发贴不够..不让我在那里发...
2008-4-10 09:26
0
雪    币: 846
活跃值: (221)
能力值: (RANK:570 )
在线值:
发帖
回帖
粉丝
3
NTSTATUS
SeCreateAccessState(
   __out PACCESS_STATE AccessState,
   __out PAUX_ACCESS_DATA AuxData,
   __in ACCESS_MASK DesiredAccess,
   __in_opt PGENERIC_MAPPING GenericMapping
   )

/*++
Routine Description:

    This routine initializes an ACCESS_STATE structure.  This consists
    of:

    - zeroing the entire structure

    - mapping generic access types in the passed DesiredAccess
    and putting it into the structure

    - "capturing" the Subject Context, which must be held for the
    duration of the access attempt (at least until auditing is performed).

    - Allocating an Operation ID, which is an LUID that will be used
    to associate different parts of the access attempt in the audit
    log.

Arguments:

    AccessState - a pointer to the structure to be initialized.

    AuxData - Supplies a buffer big enough for an AuxData structure
        so we don't have to allocate one.

    DesiredAccess - Access mask containing the desired access

    GenericMapping - Optionally supplies a pointer to a generic mapping
        that may be used to map any generic access requests that may
        have been passed in the DesiredAccess parameter.

        Note that if this parameter is not supplied, it must be filled
        in at some later point.  The IO system does this in IopParseDevice.

Return Value:

    Error if the attempt to allocate an LUID fails.

    Note that this error may be safely ignored if it is known that all
    security checks will be performed with PreviousMode == KernelMode.
    Know what you're doing if you choose to ignore this.

--*/

NTSTATUS
ObpCreateHandle (
    IN OB_OPEN_REASON OpenReason,
    IN PVOID Object,
    IN POBJECT_TYPE ExpectedObjectType OPTIONAL,
    IN PACCESS_STATE AccessState,
    IN ULONG ObjectPointerBias OPTIONAL,
    IN ULONG Attributes,
    IN POBP_LOOKUP_CONTEXT LookupContext,
    IN KPROCESSOR_MODE AccessMode,
    OUT PVOID *ReferencedNewObject OPTIONAL,
    OUT PHANDLE Handle
    )

/*++

Routine Description:

    This function creates a new handle to an existing object

Arguments:

    OpenReason - The reason why we are doing this work

    Object - A pointer to the body of the new object

    ExpectedObjectType - Optionally Supplies the object type that
        the caller is expecting

    AccessState - Supplies the access state for the handle requested
        by the caller

    ObjectPointerBias - Optionally supplies a count of addition
        increments we do to the pointer count for the object

    Attributes -  Desired attributes for the handle

    DirectoryLocked - Indicates if the root directory mutex is already held

    AccessMode - Supplies the mode of the requestor.

    ReferencedNewObject - Optionally receives a pointer to the body
        of the new object

    Handle - Receives the new handle value

Return Value:

    An appropriate status value

--*/

如果我复制的这些东西可以解答你的问题,请将你的问题归类为初级问题,并且自己找WIN2K SOURCE和WRK。解答不了你跟帖说明,我帮你转过去
2008-4-10 09:38
0
雪    币: 209
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
4
WRK~~我看过啊~~全是英文~~我英文水平不太好啊~~能不能解释一下?
2008-4-10 09:53
0
雪    币: 209
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
5
我知道了~~麻烦板主了~~我自己再研究一下
2008-4-10 10:00
0
游客
登录 | 注册 方可回帖
返回
//