mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 17:44:45 +00:00
Implement BuildExplicitAccessWithNameA/W() and BuildImpersonateExplicitAccessWithNameA/W().
svn path=/trunk/; revision=12785
This commit is contained in:
parent
e6258f2fa1
commit
8caac8b834
2 changed files with 96 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
|||
; $Id: advapi32.def,v 1.28 2004/12/15 12:29:36 ekohl Exp $
|
||||
; $Id$
|
||||
;
|
||||
; advapi32.def
|
||||
;
|
||||
|
@ -31,10 +31,10 @@ BackupEventLogA@8
|
|||
BackupEventLogW@8
|
||||
;BuildAccessRequestA
|
||||
;BuildAccessRequestW
|
||||
;BuildExplicitAccessWithNameA@20
|
||||
;BuildExplicitAccessWithNameW@20
|
||||
;BuildImpersonateExplicitAccessWithNameA@24
|
||||
;BuildImpersonateExplicitAccessWithNameW@24
|
||||
BuildExplicitAccessWithNameA@20
|
||||
BuildExplicitAccessWithNameW@20
|
||||
BuildImpersonateExplicitAccessWithNameA@24
|
||||
BuildImpersonateExplicitAccessWithNameW@24
|
||||
BuildImpersonateTrusteeA@8
|
||||
BuildImpersonateTrusteeW@8
|
||||
;BuildSecurityDescriptorA@36
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: trustee.c,v 1.3 2004/12/15 12:29:13 ekohl Exp $
|
||||
/* $Id$
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS system libraries
|
||||
|
@ -36,6 +36,96 @@ BuildImpersonateTrusteeW(PTRUSTEE_W pTrustee,
|
|||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* BuildExplicitAccessWithNameA [ADVAPI32.@]
|
||||
*/
|
||||
VOID WINAPI
|
||||
BuildExplicitAccessWithNameA(PEXPLICIT_ACCESSA pExplicitAccess,
|
||||
LPSTR pTrusteeName,
|
||||
DWORD AccessPermissions,
|
||||
ACCESS_MODE AccessMode,
|
||||
DWORD Inheritance)
|
||||
{
|
||||
pExplicitAccess->grfAccessPermissions = AccessPermissions;
|
||||
pExplicitAccess->grfAccessMode = AccessMode;
|
||||
pExplicitAccess->grfInheritance = Inheritance;
|
||||
|
||||
pExplicitAccess->Trustee.pMultipleTrustee = NULL;
|
||||
pExplicitAccess->Trustee.MultipleTrusteeOperation = NO_MULTIPLE_TRUSTEE;
|
||||
pExplicitAccess->Trustee.TrusteeForm = TRUSTEE_IS_NAME;
|
||||
pExplicitAccess->Trustee.TrusteeType = TRUSTEE_IS_UNKNOWN;
|
||||
pExplicitAccess->Trustee.ptstrName = pTrusteeName;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* BuildExplicitAccessWithNameW [ADVAPI32.@]
|
||||
*/
|
||||
VOID WINAPI
|
||||
BuildExplicitAccessWithNameW(PEXPLICIT_ACCESSW pExplicitAccess,
|
||||
LPWSTR pTrusteeName,
|
||||
DWORD AccessPermissions,
|
||||
ACCESS_MODE AccessMode,
|
||||
DWORD Inheritance)
|
||||
{
|
||||
pExplicitAccess->grfAccessPermissions = AccessPermissions;
|
||||
pExplicitAccess->grfAccessMode = AccessMode;
|
||||
pExplicitAccess->grfInheritance = Inheritance;
|
||||
|
||||
pExplicitAccess->Trustee.pMultipleTrustee = NULL;
|
||||
pExplicitAccess->Trustee.MultipleTrusteeOperation = NO_MULTIPLE_TRUSTEE;
|
||||
pExplicitAccess->Trustee.TrusteeForm = TRUSTEE_IS_NAME;
|
||||
pExplicitAccess->Trustee.TrusteeType = TRUSTEE_IS_UNKNOWN;
|
||||
pExplicitAccess->Trustee.ptstrName = pTrusteeName;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* BuildImpersonateExplicitAccessWithNameA [ADVAPI32.@]
|
||||
*/
|
||||
VOID WINAPI
|
||||
BuildImpersonateExplicitAccessWithNameA(PEXPLICIT_ACCESS_A pExplicitAccess,
|
||||
LPSTR pTrusteeName,
|
||||
PTRUSTEE_A pTrustee,
|
||||
DWORD AccessPermissions,
|
||||
ACCESS_MODE AccessMode,
|
||||
DWORD Inheritance)
|
||||
{
|
||||
pExplicitAccess->grfAccessPermissions = AccessPermissions;
|
||||
pExplicitAccess->grfAccessMode = AccessMode;
|
||||
pExplicitAccess->grfInheritance = Inheritance;
|
||||
|
||||
pExplicitAccess->Trustee.pMultipleTrustee = pTrustee;
|
||||
pExplicitAccess->Trustee.MultipleTrusteeOperation = TRUSTEE_IS_IMPERSONATE;
|
||||
pExplicitAccess->Trustee.TrusteeForm = TRUSTEE_IS_NAME;
|
||||
pExplicitAccess->Trustee.TrusteeType = TRUSTEE_IS_UNKNOWN;
|
||||
pExplicitAccess->Trustee.ptstrName = pTrusteeName;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* BuildImpersonateExplicitAccessWithNameW [ADVAPI32.@]
|
||||
*/
|
||||
VOID WINAPI
|
||||
BuildImpersonateExplicitAccessWithNameW(PEXPLICIT_ACCESS_W pExplicitAccess,
|
||||
LPWSTR pTrusteeName,
|
||||
PTRUSTEE_W pTrustee,
|
||||
DWORD AccessPermissions,
|
||||
ACCESS_MODE AccessMode,
|
||||
DWORD Inheritance)
|
||||
{
|
||||
pExplicitAccess->grfAccessPermissions = AccessPermissions;
|
||||
pExplicitAccess->grfAccessMode = AccessMode;
|
||||
pExplicitAccess->grfInheritance = Inheritance;
|
||||
|
||||
pExplicitAccess->Trustee.pMultipleTrustee = pTrustee;
|
||||
pExplicitAccess->Trustee.MultipleTrusteeOperation = TRUSTEE_IS_IMPERSONATE;
|
||||
pExplicitAccess->Trustee.TrusteeForm = TRUSTEE_IS_NAME;
|
||||
pExplicitAccess->Trustee.TrusteeType = TRUSTEE_IS_UNKNOWN;
|
||||
pExplicitAccess->Trustee.ptstrName = pTrusteeName;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* BuildTrusteeWithSidA [ADVAPI32.@]
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue