ReactOS 0.4.15-dev-5667-ged97270
trustee.c
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS system libraries
4 * FILE: lib/advapi32/sec/trustee.c
5 * PURPOSE: Trustee functions
6 */
7
8#include <advapi32.h>
9
10/******************************************************************************
11 * BuildImpersonateTrusteeA [ADVAPI32.@]
12 */
15 PTRUSTEE_A pImpersonateTrustee)
16{
17 pTrustee->pMultipleTrustee = pImpersonateTrustee;
19}
20
21
22/******************************************************************************
23 * BuildImpersonateTrusteeW [ADVAPI32.@]
24 */
27 PTRUSTEE_W pImpersonateTrustee)
28{
29 pTrustee->pMultipleTrustee = pImpersonateTrustee;
31}
32
33/******************************************************************************
34 * BuildImpersonateExplicitAccessWithNameA [ADVAPI32.@]
35 */
38 LPSTR pTrusteeName,
39 PTRUSTEE_A pTrustee,
40 DWORD AccessPermissions,
42 DWORD Inheritance)
43{
44 pExplicitAccess->grfAccessPermissions = AccessPermissions;
45 pExplicitAccess->grfAccessMode = AccessMode;
46 pExplicitAccess->grfInheritance = Inheritance;
47
48 pExplicitAccess->Trustee.pMultipleTrustee = pTrustee;
50 pExplicitAccess->Trustee.TrusteeForm = TRUSTEE_IS_NAME;
51 pExplicitAccess->Trustee.TrusteeType = TRUSTEE_IS_UNKNOWN;
52 pExplicitAccess->Trustee.ptstrName = pTrusteeName;
53}
54
55
56/******************************************************************************
57 * BuildImpersonateExplicitAccessWithNameW [ADVAPI32.@]
58 */
61 LPWSTR pTrusteeName,
62 PTRUSTEE_W pTrustee,
63 DWORD AccessPermissions,
65 DWORD Inheritance)
66{
67 pExplicitAccess->grfAccessPermissions = AccessPermissions;
68 pExplicitAccess->grfAccessMode = AccessMode;
69 pExplicitAccess->grfInheritance = Inheritance;
70
71 pExplicitAccess->Trustee.pMultipleTrustee = pTrustee;
73 pExplicitAccess->Trustee.TrusteeForm = TRUSTEE_IS_NAME;
74 pExplicitAccess->Trustee.TrusteeType = TRUSTEE_IS_UNKNOWN;
75 pExplicitAccess->Trustee.ptstrName = pTrusteeName;
76}
77
78/******************************************************************************
79 * GetMultipleTrusteeA [ADVAPI32.@]
80 */
83{
84 return pTrustee->pMultipleTrustee;
85}
86
87
88/******************************************************************************
89 * GetMultipleTrusteeW [ADVAPI32.@]
90 */
93{
94 return pTrustee->pMultipleTrustee;
95}
96
97
98/******************************************************************************
99 * GetMultipleTrusteeOperationA [ADVAPI32.@]
100 */
103{
104 return pTrustee->MultipleTrusteeOperation;
105}
106
107
108/******************************************************************************
109 * GetMultipleTrusteeOperationW [ADVAPI32.@]
110 */
113{
114 return pTrustee->MultipleTrusteeOperation;
115}
116
117/* EOF */
enum _ACCESS_MODE ACCESS_MODE
@ TRUSTEE_IS_NAME
Definition: accctrl.h:190
@ TRUSTEE_IS_UNKNOWN
Definition: accctrl.h:176
enum _MULTIPLE_TRUSTEE_OPERATION MULTIPLE_TRUSTEE_OPERATION
@ TRUSTEE_IS_IMPERSONATE
Definition: accctrl.h:199
unsigned long DWORD
Definition: ntddk_ex.h:95
DWORD grfAccessPermissions
Definition: accctrl.h:332
TRUSTEE_A Trustee
Definition: accctrl.h:335
DWORD grfInheritance
Definition: accctrl.h:334
ACCESS_MODE grfAccessMode
Definition: accctrl.h:333
DWORD grfAccessPermissions
Definition: accctrl.h:340
DWORD grfInheritance
Definition: accctrl.h:342
TRUSTEE_W Trustee
Definition: accctrl.h:343
ACCESS_MODE grfAccessMode
Definition: accctrl.h:341
MULTIPLE_TRUSTEE_OPERATION MultipleTrusteeOperation
Definition: accctrl.h:205
TRUSTEE_TYPE TrusteeType
Definition: accctrl.h:207
TRUSTEE_FORM TrusteeForm
Definition: accctrl.h:206
struct _TRUSTEE_A * pMultipleTrustee
Definition: accctrl.h:204
LPSTR ptstrName
Definition: accctrl.h:208
LPWSTR ptstrName
Definition: accctrl.h:217
struct _TRUSTEE_W * pMultipleTrustee
Definition: accctrl.h:213
TRUSTEE_TYPE TrusteeType
Definition: accctrl.h:216
TRUSTEE_FORM TrusteeForm
Definition: accctrl.h:215
MULTIPLE_TRUSTEE_OPERATION MultipleTrusteeOperation
Definition: accctrl.h:214
PTRUSTEEA WINAPI GetMultipleTrusteeA(PTRUSTEE_A pTrustee)
Definition: trustee.c:82
VOID WINAPI BuildImpersonateTrusteeW(PTRUSTEE_W pTrustee, PTRUSTEE_W pImpersonateTrustee)
Definition: trustee.c:26
VOID WINAPI BuildImpersonateTrusteeA(PTRUSTEE_A pTrustee, PTRUSTEE_A pImpersonateTrustee)
Definition: trustee.c:14
MULTIPLE_TRUSTEE_OPERATION WINAPI GetMultipleTrusteeOperationW(PTRUSTEE_W pTrustee)
Definition: trustee.c:112
PTRUSTEEW WINAPI GetMultipleTrusteeW(PTRUSTEE_W pTrustee)
Definition: trustee.c:92
VOID WINAPI BuildImpersonateExplicitAccessWithNameW(PEXPLICIT_ACCESS_W pExplicitAccess, LPWSTR pTrusteeName, PTRUSTEE_W pTrustee, DWORD AccessPermissions, ACCESS_MODE AccessMode, DWORD Inheritance)
Definition: trustee.c:60
MULTIPLE_TRUSTEE_OPERATION WINAPI GetMultipleTrusteeOperationA(PTRUSTEE_A pTrustee)
Definition: trustee.c:102
VOID WINAPI BuildImpersonateExplicitAccessWithNameA(PEXPLICIT_ACCESS_A pExplicitAccess, LPSTR pTrusteeName, PTRUSTEE_A pTrustee, DWORD AccessPermissions, ACCESS_MODE AccessMode, DWORD Inheritance)
Definition: trustee.c:37
#define WINAPI
Definition: msvc.h:6
_In_ PEPROCESS _In_ KPROCESSOR_MODE AccessMode
Definition: mmfuncs.h:396
char * LPSTR
Definition: xmlstorage.h:182
WCHAR * LPWSTR
Definition: xmlstorage.h:184