ReactOS  0.4.11-dev-433-g473ca91
security.c File Reference
#include "regedit.h"
#include <guiddef.h>
Include dependency graph for security.c:

Go to the source code of this file.

Classes

struct  _CHANGE_CONTEXT
 

Macros

#define INITGUID
 
#define impl_to_interface(impl, iface)   (struct iface *)(&(impl)->lp##iface##Vtbl)
 

Typedefs

typedef struct _CHANGE_CONTEXT CHANGE_CONTEXT
 
typedef struct _CHANGE_CONTEXTPCHANGE_CONTEXT
 
typedef BOOL(WINAPIPEDITSECURITY )(HWND hwndOwner, struct ISecurityInformation *psi)
 

Functions

 DEFINE_GUID (IID_IRegKeySecurity, 0x965fc360, 0x16ff, 0x11d0, 0x0091, 0xcb, 0x00, 0xaa, 0x00, 0xbb, 0xb7, 0x23)
 
 DEFINE_GUID (IID_IEffectivePermission, 0x3853dc76, 0x9f35, 0x407c, 0x0088, 0xa1, 0xd1, 0x93, 0x44, 0x36, 0x5f, 0xbc)
 
 DEFINE_GUID (IID_ISecurityObjectTypeInfo, 0xfc3066eb, 0x79ef, 0x444b, 0x0091, 0x11, 0xd1, 0x8a, 0x75, 0xeb, 0xf2, 0xfa)
 
static __inline PCRegKeySecurity impl_from_ISecurityInformation (struct ISecurityInformation *iface)
 
static __inline PCRegKeySecurity impl_from_ISecurityObjectTypeInfo (struct ISecurityObjectTypeInfo *iface)
 
static __inline PCRegKeySecurity impl_from_IEffectivePermission (struct IEffectivePermission *iface)
 
static __inline ULONG CRegKeySecurity_fnAddRef (PCRegKeySecurity obj)
 
static __inline ULONG CRegKeySecurity_fnRelease (PCRegKeySecurity obj)
 
static __inline HRESULT CRegKeySecurity_fnQueryInterface (PCRegKeySecurity obj, REFIID iid, PVOID *pvObject)
 
static HRESULT STDMETHODCALLTYPE ISecurityInformation_fnQueryInterface (struct ISecurityInformation *this, REFIID iid, PVOID *pvObject)
 
static ULONG STDMETHODCALLTYPE ISecurityInformation_fnAddRef (struct ISecurityInformation *this)
 
static ULONG STDMETHODCALLTYPE ISecurityInformation_fnRelease (struct ISecurityInformation *this)
 
static HRESULT STDMETHODCALLTYPE ISecurityInformation_fnGetObjectInformation (struct ISecurityInformation *this, PSI_OBJECT_INFO pObjectInfo)
 
static HRESULT STDMETHODCALLTYPE ISecurityInformation_fnGetSecurity (struct ISecurityInformation *this, SECURITY_INFORMATION RequestedInformation, PSECURITY_DESCRIPTOR *ppSecurityDescriptor, BOOL fDefault)
 
static HRESULT STDMETHODCALLTYPE ISecurityInformation_fnSetSecurity (struct ISecurityInformation *this, SECURITY_INFORMATION RequestedInformation, PSECURITY_DESCRIPTOR pSecurityDescriptor)
 
static HRESULT STDMETHODCALLTYPE ISecurityInformation_fnGetAccessRights (struct ISecurityInformation *this, const GUID *pguidObjectType, DWORD dwFlags, PSI_ACCESS *ppAccess, ULONG *pcAccesses, ULONG *piDefaultAccess)
 
static HRESULT STDMETHODCALLTYPE ISecurityInformation_fnMapGeneric (struct ISecurityInformation *this, const GUID *pguidObjectType, UCHAR *pAceFlags, ACCESS_MASK *pMask)
 
static HRESULT STDMETHODCALLTYPE ISecurityInformation_fnGetInheritTypes (struct ISecurityInformation *this, PSI_INHERIT_TYPE *ppInheritTypes, ULONG *pcInheritTypes)
 
static HRESULT STDMETHODCALLTYPE ISecurityInformation_fnPropertySheetPageCallback (struct ISecurityInformation *this, HWND hwnd, UINT uMsg, SI_PAGE_TYPE uPage)
 
static HRESULT STDMETHODCALLTYPE IEffectivePermission_fnQueryInterface (struct IEffectivePermission *this, REFIID iid, PVOID *pvObject)
 
static ULONG STDMETHODCALLTYPE IEffectivePermission_fnAddRef (struct IEffectivePermission *this)
 
static ULONG STDMETHODCALLTYPE IEffectivePermission_fnRelease (struct IEffectivePermission *this)
 
static HRESULT STDMETHODCALLTYPE IEffectivePermission_fnGetEffectivePermission (struct IEffectivePermission *this, const GUID *pguidObjectType, PSID pUserSid, LPCWSTR pszServerName, PSECURITY_DESCRIPTOR pSD, POBJECT_TYPE_LIST *ppObjectTypeList, ULONG *pcObjectTypeListLength, PACCESS_MASK *ppGrantedAccessList, ULONG *pcGrantedAccessListLength)
 
static HRESULT STDMETHODCALLTYPE ISecurityObjectTypeInfo_fnQueryInterface (struct ISecurityObjectTypeInfo *this, REFIID iid, PVOID *pvObject)
 
static ULONG STDMETHODCALLTYPE ISecurityObjectTypeInfo_fnAddRef (struct ISecurityObjectTypeInfo *this)
 
static ULONG STDMETHODCALLTYPE ISecurityObjectTypeInfo_fnRelease (struct ISecurityObjectTypeInfo *this)
 
static HRESULT STDMETHODCALLTYPE ISecurityObjectTypeInfo_fnGetInheritSource (struct ISecurityObjectTypeInfo *this, SECURITY_INFORMATION si, PACL pACL, PINHERITED_FROM *ppInheritArray)
 
static PCRegKeySecurity CRegKeySecurity_fnConstructor (LPWSTR lpRegKey, HKEY hRootKey, SI_OBJECT_INFO *ObjectInfo, BOOL *Btn)
 
BOOL InitializeAclUiDll (VOID)
 
VOID UnloadAclUiDll (VOID)
 
BOOL RegKeyEditPermissions (HWND hWndOwner, HKEY hKey, LPCWSTR lpMachine, LPCWSTR lpKeyName)
 

Variables

static const struct
ifaceISecurityInformationVbtl 
vtblISecurityInformation
 
static const struct
ifaceIEffectivePermissionVbtl 
vtblIEffectivePermission
 
static const struct
ifaceISecurityObjectTypeInfoVbtl 
vtblISecurityObjectTypeInfo
 
static SI_ACCESS RegAccess []
 
static const DWORD RegDefaultAccess = 1
 
static GENERIC_MAPPING RegAccessMasks
 
static SI_INHERIT_TYPE RegInheritTypes []
 
static PEDITSECURITY pfnEditSecurity
 
static HMODULE hAclUiDll
 

Macro Definition Documentation

#define impl_to_interface (   impl,
  iface 
)    (struct iface *)(&(impl)->lp##iface##Vtbl)

Definition at line 76 of file security.c.

Referenced by CRegKeySecurity_fnQueryInterface(), and RegKeyEditPermissions().

#define INITGUID

Definition at line 23 of file security.c.

Typedef Documentation

typedef BOOL(WINAPI * PEDITSECURITY)(HWND hwndOwner, struct ISecurityInformation *psi)

Definition at line 804 of file security.c.

Function Documentation

static __inline ULONG CRegKeySecurity_fnAddRef ( PCRegKeySecurity  obj)
static

Definition at line 79 of file security.c.

Referenced by CRegKeySecurity_fnQueryInterface(), IEffectivePermission_fnAddRef(), ISecurityInformation_fnAddRef(), and ISecurityObjectTypeInfo_fnAddRef().

80 {
81  return (ULONG)InterlockedIncrement((LONG*)&obj->ref);
82 }
long LONG
Definition: pedump.c:60
#define InterlockedIncrement
Definition: armddk.h:53
unsigned int ULONG
Definition: retypes.h:1
static PCRegKeySecurity CRegKeySecurity_fnConstructor ( LPWSTR  lpRegKey,
HKEY  hRootKey,
SI_OBJECT_INFO ObjectInfo,
BOOL Btn 
)
static

Definition at line 762 of file security.c.

Referenced by RegKeyEditPermissions().

766 {
768 
772  szRegKey[wcslen(lpRegKey) + 1]));
773  if (obj != NULL)
774  {
775  obj->ref = 1;
777 #if REGEDIT_IMPLEMENT_ISECURITYINFORMATION2
778  obj->lpISecurityInformation2Vtbl = &vtblISecurityInformation2;
779 #endif
782  obj->ObjectInfo = *ObjectInfo;
783  obj->Btn = Btn;
784  obj->hRootKey = hRootKey;
785  wcscpy(obj->szRegKey,
786  lpRegKey);
787  }
788  else
790 
791  return obj;
792 }
static const struct ifaceISecurityObjectTypeInfoVbtl vtblISecurityObjectTypeInfo
Definition: security.c:322
WCHAR szRegKey[1]
Definition: security.h:153
static const struct ifaceIEffectivePermissionVbtl vtblIEffectivePermission
Definition: security.c:288
#define ERROR_NOT_ENOUGH_MEMORY
Definition: dderror.h:7
GLsizei GLsizei GLuint * obj
Definition: glext.h:6042
const struct ifaceISecurityObjectTypeInfoVbtl * lpISecurityObjectTypeInfoVtbl
Definition: security.h:146
smooth NULL
Definition: ftsmooth.c:416
const struct ifaceISecurityInformationVbtl * lpISecurityInformationVtbl
Definition: security.h:141
const struct ifaceIEffectivePermissionVbtl * lpIEffectivePermissionVtbl
Definition: security.h:145
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define SetLastError(x)
Definition: compat.h:409
struct _CRegKeySecurity * PCRegKeySecurity
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:254
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
SI_OBJECT_INFO ObjectInfo
Definition: security.h:150
static const struct ifaceISecurityInformationVbtl vtblISecurityInformation
Definition: security.c:202
size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
static __inline HRESULT CRegKeySecurity_fnQueryInterface ( PCRegKeySecurity  obj,
REFIID  iid,
PVOID pvObject 
)
static

Definition at line 101 of file security.c.

Referenced by IEffectivePermission_fnQueryInterface(), ISecurityInformation_fnQueryInterface(), and ISecurityObjectTypeInfo_fnQueryInterface().

104 {
105  PVOID pvObj = NULL;
106 
107  if (IsEqualGUID(iid,
108  &IID_IRegKeySecurity))
109  {
110  pvObj = (PVOID)impl_to_interface(obj,
111  ISecurityInformation);
112  }
113 #if REGEDIT_IMPLEMENT_ISECURITYINFORMATION2
114  else if (IsEqualGUID(iid,
115  &IID_IRegKeySecurity2))
116  {
117  pvObj = (PVOID)impl_to_interface(obj,
118  ISecurityInformation2);
119  }
120 #endif
121  else if (IsEqualGUID(iid,
122  &IID_IEffectivePermission))
123  {
124  pvObj = (PVOID)impl_to_interface(obj,
125  IEffectivePermission);
126  }
127  else if (IsEqualGUID(iid,
128  &IID_ISecurityObjectTypeInfo))
129  {
130  pvObj = (PVOID)impl_to_interface(obj,
131  ISecurityObjectTypeInfo);
132  }
133 
134  if (pvObj == NULL)
135  {
136  return E_NOINTERFACE;
137  }
138 
139  *pvObject = pvObj;
141 
142  return S_OK;
143 }
DWORD *typedef PVOID
Definition: winlogon.h:61
#define E_NOINTERFACE
Definition: winerror.h:2364
#define impl_to_interface(impl, iface)
Definition: security.c:76
smooth NULL
Definition: ftsmooth.c:416
#define S_OK
Definition: intsafe.h:59
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4024
static PVOID
Definition: security.c:118
static __inline ULONG CRegKeySecurity_fnAddRef(PCRegKeySecurity obj)
Definition: security.c:79
static __inline ULONG CRegKeySecurity_fnRelease ( PCRegKeySecurity  obj)
static

Definition at line 85 of file security.c.

Referenced by IEffectivePermission_fnRelease(), ISecurityInformation_fnRelease(), ISecurityObjectTypeInfo_fnRelease(), and RegKeyEditPermissions().

86 {
87  ULONG Ret;
88 
89  Ret = (ULONG)InterlockedDecrement((LONG*)&obj->ref);
90  if (Ret == 0)
91  {
93  0,
94  obj);
95  }
96 
97  return Ret;
98 }
static ULONG
Definition: security.c:118
long LONG
Definition: pedump.c:60
#define GetProcessHeap()
Definition: compat.h:395
#define InterlockedDecrement
Definition: armddk.h:52
unsigned int ULONG
Definition: retypes.h:1
#define HeapFree(x, y, z)
Definition: compat.h:394
DEFINE_GUID ( IID_IRegKeySecurity  ,
0x965fc360  ,
0x16ff  ,
0x11d0  ,
0x0091  ,
0xcb  ,
0x00  ,
0xaa  ,
0x00  ,
0xbb  ,
0xb7  ,
0x23   
)
DEFINE_GUID ( IID_IEffectivePermission  ,
0x3853dc76  ,
0x9f35  ,
0x407c  ,
0x0088  ,
0xa1  ,
0xd1  ,
0x93  ,
0x44  ,
0x36  ,
0x5f  ,
0xbc   
)
DEFINE_GUID ( IID_ISecurityObjectTypeInfo  ,
0xfc3066eb  ,
0x79ef  ,
0x444b  ,
0x0091  ,
0x11  ,
0xd1  ,
0x8a  ,
0x75  ,
0xeb  ,
0xf2  ,
0xfa   
)
static ULONG STDMETHODCALLTYPE IEffectivePermission_fnAddRef ( struct IEffectivePermission *  this)
static

Definition at line 571 of file security.c.

Referenced by IEffectivePermission_fnQueryInterface().

572 {
574 }
static __inline PCRegKeySecurity impl_from_IEffectivePermission(struct IEffectivePermission *iface)
Definition: security.c:70
static __inline ULONG CRegKeySecurity_fnAddRef(PCRegKeySecurity obj)
Definition: security.c:79
static HRESULT STDMETHODCALLTYPE IEffectivePermission_fnGetEffectivePermission ( struct IEffectivePermission *  this,
const GUID pguidObjectType,
PSID  pUserSid,
LPCWSTR  pszServerName,
PSECURITY_DESCRIPTOR  pSD,
POBJECT_TYPE_LIST ppObjectTypeList,
ULONG pcObjectTypeListLength,
PACCESS_MASK ppGrantedAccessList,
ULONG pcGrantedAccessListLength 
)
static

Definition at line 583 of file security.c.

592 {
593  PACL Dacl = NULL;
595  PACCESS_MASK GrantedAccessList;
597  TRUSTEE Trustee = {0};
598  static OBJECT_TYPE_LIST DefObjTypeList = {0};
599 
600  *ppObjectTypeList = &DefObjTypeList;
601  *pcObjectTypeListLength = 1;
602 
603  BuildTrusteeWithSid(&Trustee,
604  pUserSid);
605 
607  &DaclPresent,
608  &Dacl,
609  &DaclDefaulted) && DaclPresent)
610  {
611  GrantedAccessList = (PACCESS_MASK)LocalAlloc(LMEM_FIXED,
612  sizeof(ACCESS_MASK));
613  if (GrantedAccessList == NULL)
614  {
615  goto Fail;
616  }
617 
618  ErrorCode = GetEffectiveRightsFromAcl(Dacl,
619  &Trustee,
620  GrantedAccessList);
621  if (ErrorCode == ERROR_SUCCESS)
622  {
623  *ppGrantedAccessList = GrantedAccessList;
624  *pcGrantedAccessListLength = 1;
625  }
626  else
627  LocalFree((HLOCAL)GrantedAccessList);
628  }
629  else
630 Fail:
631  ErrorCode = GetLastError();
632 
633  return HRESULT_FROM_WIN32(ErrorCode);
634 }
_In_ NDIS_ERROR_CODE ErrorCode
Definition: ndis.h:4418
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
#define ERROR_SUCCESS
Definition: deptool.c:10
_In_ BOOLEAN _In_opt_ PACL _In_opt_ BOOLEAN DaclDefaulted
Definition: rtlfuncs.h:1595
BOOL WINAPI GetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR pSecurityDescriptor, LPBOOL lpbDaclPresent, PACL *pDacl, LPBOOL lpbDaclDefaulted)
Definition: sec.c:45
HANDLE HLOCAL
Definition: windef.h:244
#define BuildTrusteeWithSid
Definition: aclapi.h:230
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
DWORD DWORD
Definition: winlogon.h:84
_In_ BOOLEAN DaclPresent
Definition: rtlfuncs.h:1595
smooth NULL
Definition: ftsmooth.c:416
#define LMEM_FIXED
Definition: winbase.h:349
unsigned int BOOL
Definition: ntddk_ex.h:94
_Out_writes_bytes_to_opt_ AbsoluteSecurityDescriptorSize PSECURITY_DESCRIPTOR _Inout_ PULONG _Out_writes_bytes_to_opt_ DaclSize PACL Dacl
Definition: rtlfuncs.h:1553
Definition: hiveinit.c:368
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1577
#define GetEffectiveRightsFromAcl
Definition: aclapi.h:232
ACCESS_MASK * PACCESS_MASK
Definition: nt_native.h:41
HLOCAL NTAPI LocalAlloc(UINT uFlags, SIZE_T dwBytes)
Definition: heapmem.c:1373
ULONG ACCESS_MASK
Definition: nt_native.h:40
static HRESULT STDMETHODCALLTYPE IEffectivePermission_fnQueryInterface ( struct IEffectivePermission *  this,
REFIID  iid,
PVOID pvObject 
)
static

Definition at line 553 of file security.c.

556 {
557  if (IsEqualGUID(iid,
558  &IID_IUnknown))
559  {
560  *pvObject = (PVOID)this;
562  return S_OK;
563  }
564 
566  iid,
567  pvObject);
568 }
const GUID IID_IUnknown
static ULONG STDMETHODCALLTYPE IEffectivePermission_fnAddRef(struct IEffectivePermission *this)
Definition: security.c:571
static __inline PCRegKeySecurity impl_from_IEffectivePermission(struct IEffectivePermission *iface)
Definition: security.c:70
static __inline HRESULT CRegKeySecurity_fnQueryInterface(PCRegKeySecurity obj, REFIID iid, PVOID *pvObject)
Definition: security.c:101
#define S_OK
Definition: intsafe.h:59
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4024
static PVOID
Definition: security.c:118
static ULONG STDMETHODCALLTYPE IEffectivePermission_fnRelease ( struct IEffectivePermission *  this)
static

Definition at line 577 of file security.c.

578 {
580 }
static __inline PCRegKeySecurity impl_from_IEffectivePermission(struct IEffectivePermission *iface)
Definition: security.c:70
static __inline ULONG CRegKeySecurity_fnRelease(PCRegKeySecurity obj)
Definition: security.c:85
static __inline PCRegKeySecurity impl_from_IEffectivePermission ( struct IEffectivePermission *  iface)
static

Definition at line 70 of file security.c.

Referenced by IEffectivePermission_fnAddRef(), IEffectivePermission_fnQueryInterface(), and IEffectivePermission_fnRelease().

71 {
73  lpIEffectivePermissionVtbl));
74 }
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:254
#define ULONG_PTR
Definition: config.h:101
static __inline PCRegKeySecurity impl_from_ISecurityInformation ( struct ISecurityInformation *  iface)
static
static __inline PCRegKeySecurity impl_from_ISecurityObjectTypeInfo ( struct ISecurityObjectTypeInfo *  iface)
static

Definition at line 63 of file security.c.

Referenced by ISecurityObjectTypeInfo_fnAddRef(), ISecurityObjectTypeInfo_fnGetInheritSource(), ISecurityObjectTypeInfo_fnQueryInterface(), and ISecurityObjectTypeInfo_fnRelease().

64 {
66  lpISecurityObjectTypeInfoVtbl));
67 }
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:254
#define ULONG_PTR
Definition: config.h:101
BOOL InitializeAclUiDll ( VOID  )

Definition at line 811 of file security.c.

Referenced by InitInstance().

812 {
813  if (!(hAclUiDll = LoadLibraryW(L"aclui.dll")))
814  {
815  return FALSE;
816  }
817 
819  "EditSecurity")))
820  {
822  hAclUiDll = NULL;
823  return FALSE;
824  }
825 
826  return TRUE;
827 }
#define TRUE
Definition: types.h:120
static HMODULE hAclUiDll
Definition: security.c:808
#define FALSE
Definition: types.h:117
BOOL(WINAPI * PEDITSECURITY)(HWND hwndOwner, struct ISecurityInformation *psi)
Definition: security.c:804
#define LoadLibraryW(x)
Definition: compat.h:404
smooth NULL
Definition: ftsmooth.c:416
#define FreeLibrary(x)
Definition: compat.h:405
static const WCHAR L[]
Definition: oid.c:1087
#define GetProcAddress(x, y)
Definition: compat.h:410
static PEDITSECURITY pfnEditSecurity
Definition: security.c:807
static ULONG STDMETHODCALLTYPE ISecurityInformation_fnAddRef ( struct ISecurityInformation *  this)
static

Definition at line 387 of file security.c.

Referenced by ISecurityInformation_fnQueryInterface().

388 {
390 }
static __inline PCRegKeySecurity impl_from_ISecurityInformation(struct ISecurityInformation *iface)
Definition: security.c:47
static __inline ULONG CRegKeySecurity_fnAddRef(PCRegKeySecurity obj)
Definition: security.c:79
static HRESULT STDMETHODCALLTYPE ISecurityInformation_fnGetAccessRights ( struct ISecurityInformation *  this,
const GUID pguidObjectType,
DWORD  dwFlags,
PSI_ACCESS ppAccess,
ULONG pcAccesses,
ULONG piDefaultAccess 
)
static

Definition at line 442 of file security.c.

448 {
449  *ppAccess = RegAccess;
450  *pcAccesses = COUNT_OF(RegAccess);
451  *piDefaultAccess = RegDefaultAccess;
452  return S_OK;
453 }
static const DWORD RegDefaultAccess
Definition: security.c:353
static SI_ACCESS RegAccess[]
Definition: security.c:338
#define COUNT_OF(a)
Definition: main.h:33
#define S_OK
Definition: intsafe.h:59
static HRESULT STDMETHODCALLTYPE ISecurityInformation_fnGetInheritTypes ( struct ISecurityInformation *  this,
PSI_INHERIT_TYPE ppInheritTypes,
ULONG pcInheritTypes 
)
static

Definition at line 468 of file security.c.

471 {
473 
474  /* FIXME */
475  if (obj->ObjectInfo.dwFlags & SI_CONTAINER)
476  {
477  *ppInheritTypes = RegInheritTypes;
478  *pcInheritTypes = COUNT_OF(RegInheritTypes);
479  return S_OK;
480  }
481 
482  return E_NOTIMPL;
483 }
#define SI_CONTAINER
Definition: accctrl.h:116
DWORD dwFlags
Definition: accctrl.h:388
#define COUNT_OF(a)
Definition: main.h:33
static __inline PCRegKeySecurity impl_from_ISecurityInformation(struct ISecurityInformation *iface)
Definition: security.c:47
#define S_OK
Definition: intsafe.h:59
#define E_NOTIMPL
Definition: ddrawi.h:99
SI_OBJECT_INFO ObjectInfo
Definition: security.h:150
static SI_INHERIT_TYPE RegInheritTypes[]
Definition: security.c:362
static HRESULT STDMETHODCALLTYPE ISecurityInformation_fnGetObjectInformation ( struct ISecurityInformation *  this,
PSI_OBJECT_INFO  pObjectInfo 
)
static

Definition at line 399 of file security.c.

401 {
403 
404  *pObjectInfo = obj->ObjectInfo;
405  return S_OK;
406 }
static __inline PCRegKeySecurity impl_from_ISecurityInformation(struct ISecurityInformation *iface)
Definition: security.c:47
#define S_OK
Definition: intsafe.h:59
SI_OBJECT_INFO ObjectInfo
Definition: security.h:150
static HRESULT STDMETHODCALLTYPE ISecurityInformation_fnGetSecurity ( struct ISecurityInformation *  this,
SECURITY_INFORMATION  RequestedInformation,
PSECURITY_DESCRIPTOR ppSecurityDescriptor,
BOOL  fDefault 
)
static

Definition at line 409 of file security.c.

413 {
415  LONG ErrorCode;
416 
417  ErrorCode = GetNamedSecurityInfoW(obj->szRegKey,
419  RequestedInformation,
420  NULL,
421  NULL,
422  NULL,
423  NULL,
424  ppSecurityDescriptor);
425 
426  return HRESULT_FROM_WIN32(ErrorCode);
427 }
DWORD WINAPI GetNamedSecurityInfoW(LPWSTR pObjectName, SE_OBJECT_TYPE ObjectType, SECURITY_INFORMATION SecurityInfo, PSID *ppsidOwner, PSID *ppsidGroup, PACL *ppDacl, PACL *ppSacl, PSECURITY_DESCRIPTOR *ppSecurityDescriptor)
Definition: misc.c:1147
_In_ NDIS_ERROR_CODE ErrorCode
Definition: ndis.h:4418
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
WCHAR szRegKey[1]
Definition: security.h:153
long LONG
Definition: pedump.c:60
smooth NULL
Definition: ftsmooth.c:416
static __inline PCRegKeySecurity impl_from_ISecurityInformation(struct ISecurityInformation *iface)
Definition: security.c:47
static HRESULT STDMETHODCALLTYPE ISecurityInformation_fnMapGeneric ( struct ISecurityInformation *  this,
const GUID pguidObjectType,
UCHAR pAceFlags,
ACCESS_MASK pMask 
)
static

Definition at line 456 of file security.c.

460 {
461  MapGenericMask(pMask,
462  &RegAccessMasks);
463  *pMask &= ~SYNCHRONIZE;
464  return S_OK;
465 }
VOID WINAPI MapGenericMask(PDWORD, PGENERIC_MAPPING)
static GENERIC_MAPPING RegAccessMasks
Definition: security.c:355
#define SYNCHRONIZE
Definition: nt_native.h:61
#define S_OK
Definition: intsafe.h:59
static HRESULT STDMETHODCALLTYPE ISecurityInformation_fnPropertySheetPageCallback ( struct ISecurityInformation *  this,
HWND  hwnd,
UINT  uMsg,
SI_PAGE_TYPE  uPage 
)
static

Definition at line 486 of file security.c.

490 {
491  return S_OK;
492 }
#define S_OK
Definition: intsafe.h:59
static HRESULT STDMETHODCALLTYPE ISecurityInformation_fnQueryInterface ( struct ISecurityInformation *  this,
REFIID  iid,
PVOID pvObject 
)
static

Definition at line 369 of file security.c.

372 {
373  if (IsEqualGUID(iid,
374  &IID_IUnknown))
375  {
376  *pvObject = (PVOID)this;
378  return S_OK;
379  }
380 
382  iid,
383  pvObject);
384 }
const GUID IID_IUnknown
static __inline PCRegKeySecurity impl_from_ISecurityInformation(struct ISecurityInformation *iface)
Definition: security.c:47
static __inline HRESULT CRegKeySecurity_fnQueryInterface(PCRegKeySecurity obj, REFIID iid, PVOID *pvObject)
Definition: security.c:101
#define S_OK
Definition: intsafe.h:59
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4024
static ULONG STDMETHODCALLTYPE ISecurityInformation_fnAddRef(struct ISecurityInformation *this)
Definition: security.c:387
static PVOID
Definition: security.c:118
static ULONG STDMETHODCALLTYPE ISecurityInformation_fnRelease ( struct ISecurityInformation *  this)
static

Definition at line 393 of file security.c.

394 {
396 }
static __inline PCRegKeySecurity impl_from_ISecurityInformation(struct ISecurityInformation *iface)
Definition: security.c:47
static __inline ULONG CRegKeySecurity_fnRelease(PCRegKeySecurity obj)
Definition: security.c:85
static HRESULT STDMETHODCALLTYPE ISecurityInformation_fnSetSecurity ( struct ISecurityInformation *  this,
SECURITY_INFORMATION  RequestedInformation,
PSECURITY_DESCRIPTOR  pSecurityDescriptor 
)
static

Definition at line 430 of file security.c.

433 {
435 
436  /* FIXME */
437  *obj->Btn = TRUE;
438  return S_OK;
439 }
#define TRUE
Definition: types.h:120
static __inline PCRegKeySecurity impl_from_ISecurityInformation(struct ISecurityInformation *iface)
Definition: security.c:47
#define S_OK
Definition: intsafe.h:59
static ULONG STDMETHODCALLTYPE ISecurityObjectTypeInfo_fnAddRef ( struct ISecurityObjectTypeInfo *  this)
static

Definition at line 659 of file security.c.

Referenced by ISecurityObjectTypeInfo_fnQueryInterface().

660 {
662 }
static __inline PCRegKeySecurity impl_from_ISecurityObjectTypeInfo(struct ISecurityObjectTypeInfo *iface)
Definition: security.c:63
static __inline ULONG CRegKeySecurity_fnAddRef(PCRegKeySecurity obj)
Definition: security.c:79
static HRESULT STDMETHODCALLTYPE ISecurityObjectTypeInfo_fnGetInheritSource ( struct ISecurityObjectTypeInfo *  this,
SECURITY_INFORMATION  si,
PACL  pACL,
PINHERITED_FROM *  ppInheritArray 
)
static

Definition at line 671 of file security.c.

675 {
677  PINHERITED_FROM pif, pif2;
678  SIZE_T pifSize;
679  DWORD ErrorCode, i;
680  LPWSTR lpBuf;
681 
682  pifSize = pACL->AceCount * sizeof(INHERITED_FROM);
683  pif = (PINHERITED_FROM)HeapAlloc(GetProcessHeap(),
684  0,
685  pifSize);
686  if (pif == NULL)
687  {
688  return E_OUTOFMEMORY;
689  }
690 
691  ErrorCode = GetInheritanceSourceW(obj->szRegKey,
693  si,
694  (obj->ObjectInfo.dwFlags & SI_CONTAINER) != 0,
695  NULL,
696  0,
697  pACL,
698  NULL,
700  pif);
701 
702  if (ErrorCode == ERROR_SUCCESS)
703  {
704  /* Calculate the size of the buffer to return */
705  for (i = 0;
706  i < pACL->AceCount;
707  i++)
708  {
709  if (pif[i].AncestorName != NULL)
710  {
711  pifSize += (wcslen(pif[i].AncestorName) + 1) * sizeof(WCHAR);
712  }
713  }
714 
715  /* Allocate enough space for the array and the strings */
716  pif2 = (PINHERITED_FROM)LocalAlloc(LMEM_FIXED,
717  pifSize);
718  if (pif2 == NULL)
719  {
720  ErrorCode = GetLastError();
721  goto Cleanup;
722  }
723 
724  /* copy the array and strings to the buffer */
725  lpBuf = (LPWSTR)((ULONG_PTR)pif2 + (pACL->AceCount * sizeof(INHERITED_FROM)));
726  for (i = 0;
727  i < pACL->AceCount;
728  i++)
729  {
730  pif2[i].GenerationGap = pif[i].GenerationGap;
731  if (pif[i].AncestorName != NULL)
732  {
733  pif2[i].AncestorName = lpBuf;
734  wcscpy(lpBuf,
735  pif[i].AncestorName);
736  lpBuf += wcslen(pif[i].AncestorName) + 1;
737  }
738  else
739  pif2[i].AncestorName = NULL;
740  }
741 
742  /* return the newly allocated array */
743  *ppInheritArray = pif2;
744  }
745 
746 Cleanup:
748  pACL->AceCount,
749  NULL);
751  0,
752  pif);
753 
754  return HRESULT_FROM_WIN32(ErrorCode);
755 }
_In_ NDIS_ERROR_CODE ErrorCode
Definition: ndis.h:4418
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
#define SI_CONTAINER
Definition: accctrl.h:116
static __inline PCRegKeySecurity impl_from_ISecurityObjectTypeInfo(struct ISecurityObjectTypeInfo *iface)
Definition: security.c:63
#define ERROR_SUCCESS
Definition: deptool.c:10
DWORD WINAPI GetInheritanceSourceW(LPWSTR pObjectName, SE_OBJECT_TYPE ObjectType, SECURITY_INFORMATION SecurityInfo, BOOL Container, GUID **pObjectClassGuids OPTIONAL, DWORD GuidCount, PACL pAcl, PFN_OBJECT_MGR_FUNCTS pfnArray OPTIONAL, PGENERIC_MAPPING pGenericMapping, PINHERITED_FROMW pInheritArray)
Definition: ac.c:115
WCHAR szRegKey[1]
Definition: security.h:153
__wchar_t WCHAR
Definition: xmlstorage.h:180
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
USHORT AceCount
Definition: ms-dtyp.idl:297
DWORD DWORD
Definition: winlogon.h:84
uint32_t ULONG_PTR
Definition: typedefs.h:63
GLenum GLclampf GLint i
Definition: glfuncs.h:14
DWORD WINAPI FreeInheritedFromArray(PINHERITED_FROMW pInheritArray, USHORT AceCnt, PFN_OBJECT_MGR_FUNCTS pfnArray OPTIONAL)
Definition: ac.c:175
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
DWORD dwFlags
Definition: accctrl.h:388
smooth NULL
Definition: ftsmooth.c:416
#define LMEM_FIXED
Definition: winbase.h:349
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
static GENERIC_MAPPING RegAccessMasks
Definition: security.c:355
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
static const WCHAR Cleanup[]
Definition: register.c:80
ULONG_PTR SIZE_T
Definition: typedefs.h:78
SI_OBJECT_INFO ObjectInfo
Definition: security.h:150
HLOCAL NTAPI LocalAlloc(UINT uFlags, SIZE_T dwBytes)
Definition: heapmem.c:1373
WCHAR * LPWSTR
Definition: xmlstorage.h:184
size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define HeapFree(x, y, z)
Definition: compat.h:394
static HRESULT STDMETHODCALLTYPE ISecurityObjectTypeInfo_fnQueryInterface ( struct ISecurityObjectTypeInfo *  this,
REFIID  iid,
PVOID pvObject 
)
static

Definition at line 641 of file security.c.

644 {
645  if (IsEqualGUID(iid,
646  &IID_IUnknown))
647  {
648  *pvObject = (PVOID)this;
650  return S_OK;
651  }
652 
654  iid,
655  pvObject);
656 }
static __inline PCRegKeySecurity impl_from_ISecurityObjectTypeInfo(struct ISecurityObjectTypeInfo *iface)
Definition: security.c:63
const GUID IID_IUnknown
static ULONG STDMETHODCALLTYPE ISecurityObjectTypeInfo_fnAddRef(struct ISecurityObjectTypeInfo *this)
Definition: security.c:659
static __inline HRESULT CRegKeySecurity_fnQueryInterface(PCRegKeySecurity obj, REFIID iid, PVOID *pvObject)
Definition: security.c:101
#define S_OK
Definition: intsafe.h:59
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4024
static PVOID
Definition: security.c:118
static ULONG STDMETHODCALLTYPE ISecurityObjectTypeInfo_fnRelease ( struct ISecurityObjectTypeInfo *  this)
static

Definition at line 665 of file security.c.

666 {
668 }
static __inline PCRegKeySecurity impl_from_ISecurityObjectTypeInfo(struct ISecurityObjectTypeInfo *iface)
Definition: security.c:63
static __inline ULONG CRegKeySecurity_fnRelease(PCRegKeySecurity obj)
Definition: security.c:85
BOOL RegKeyEditPermissions ( HWND  hWndOwner,
HKEY  hKey,
LPCWSTR  lpMachine,
LPCWSTR  lpKeyName 
)

Definition at line 839 of file security.c.

Referenced by _CmdWndProc().

843 {
844  BOOL Result = FALSE;
845  LPCWSTR lphKey = NULL;
846  LPWSTR lpKeyPath = NULL;
847  PCRegKeySecurity RegKeySecurity;
848  SI_OBJECT_INFO ObjectInfo;
849  size_t lnMachine = 0, lnKeyName = 0;
850 
851  if (pfnEditSecurity == NULL)
852  {
853  return FALSE;
854  }
855 
856  if (lpMachine != NULL)
857  lnMachine = wcslen(lpMachine);
858  if (lpKeyName != NULL)
859  lnKeyName = wcslen(lpKeyName);
860 
861  /* build registry path */
862  if (lpMachine != NULL &&
863  (lpMachine[0] == L'\0' ||
864  (lpMachine[0] == L'.' && lpMachine[1] == L'.')))
865  {
866  lnMachine = 0;
867  }
868 
869  if (hKey == HKEY_CLASSES_ROOT)
870  lphKey = L"CLASSES_ROOT";
871  else if (hKey == HKEY_CURRENT_USER)
872  lphKey = L"CURRENT_USER";
873  else if (hKey == HKEY_LOCAL_MACHINE)
874  lphKey = L"MACHINE";
875  else if (hKey == HKEY_USERS)
876  lphKey = L"USERS";
877  else if (hKey == HKEY_CURRENT_CONFIG)
878  lphKey = L"CONFIG";
879  else
880  goto Cleanup;
881 
882  lpKeyPath = HeapAlloc(GetProcessHeap(),
883  0,
884  (2 + lnMachine + 1 + wcslen(lphKey) + 1 + lnKeyName) * sizeof(WCHAR));
885  if (lpKeyPath == NULL)
886  {
888  goto Cleanup;
889  }
890  lpKeyPath[0] = L'\0';
891 
892  if (lnMachine != 0)
893  {
894  wcscat(lpKeyPath,
895  L"\\\\");
896  wcscat(lpKeyPath,
897  lpMachine);
898  wcscat(lpKeyPath,
899  L"\\");
900  }
901 
902  wcscat(lpKeyPath,
903  lphKey);
904  if (lpKeyName != NULL && lpKeyName[0] != L'\0')
905  {
906  if (lpKeyName[0] != L'\\')
907  {
908  wcscat(lpKeyPath,
909  L"\\");
910  }
911 
912  wcscat(lpKeyPath,
913  lpKeyName);
914  }
915 
918  ObjectInfo.hInstance = hInst;
919  ObjectInfo.pszServerName = (LPWSTR)lpMachine;
920  ObjectInfo.pszObjectName = (LPWSTR)lpKeyName; /* FIXME */
921  ObjectInfo.pszPageTitle = (LPWSTR)lpKeyName; /* FIXME */
922 
923  if (!(RegKeySecurity = CRegKeySecurity_fnConstructor(lpKeyPath,
924  hKey,
925  &ObjectInfo,
926  &Result)))
927  {
928  goto Cleanup;
929  }
930 
931  /* display the security editor dialog */
932  pfnEditSecurity(hWndOwner,
933  impl_to_interface(RegKeySecurity,
934  ISecurityInformation));
935 
936  /* dereference the interface, it should be destroyed here */
937  CRegKeySecurity_fnRelease(RegKeySecurity);
938 
939 Cleanup:
940  if (lpKeyPath != NULL)
941  {
943  0,
944  lpKeyPath);
945  }
946 
947  return Result;
948 }
#define HKEY_USERS
Definition: winreg.h:13
LPWSTR pszServerName
Definition: accctrl.h:390
#define SI_CONTAINER
Definition: accctrl.h:116
#define impl_to_interface(impl, iface)
Definition: security.c:76
#define SI_RESET_SACL_TREE
Definition: accctrl.h:128
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define HKEY_CURRENT_USER
Definition: winreg.h:11
#define SI_EDIT_ALL
Definition: accctrl.h:136
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
#define ERROR_NOT_ENOUGH_MEMORY
Definition: dderror.h:7
#define SI_EDIT_PERMS
Definition: accctrl.h:113
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:426
LPWSTR pszPageTitle
Definition: accctrl.h:392
#define HKEY_CURRENT_CONFIG
Definition: winreg.h:15
#define SI_ADVANCED
Definition: accctrl.h:118
#define FALSE
Definition: types.h:117
DWORD dwFlags
Definition: accctrl.h:388
smooth NULL
Definition: ftsmooth.c:416
LPWSTR pszObjectName
Definition: accctrl.h:391
#define SI_RESET_DACL_TREE
Definition: accctrl.h:127
unsigned int BOOL
Definition: ntddk_ex.h:94
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
static __inline ULONG CRegKeySecurity_fnRelease(PCRegKeySecurity obj)
Definition: security.c:85
#define SetLastError(x)
Definition: compat.h:409
HINSTANCE hInstance
Definition: accctrl.h:389
static const WCHAR L[]
Definition: oid.c:1087
static const WCHAR Cleanup[]
Definition: register.c:80
HINSTANCE hInst
Definition: dxdiag.c:13
#define SI_EDIT_EFFECTIVE
Definition: accctrl.h:130
_CRTIMP wchar_t *__cdecl wcscat(_Inout_updates_z_(_String_length_(_Dest)+_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
#define SI_OWNER_RECURSE
Definition: accctrl.h:122
static PCRegKeySecurity CRegKeySecurity_fnConstructor(LPWSTR lpRegKey, HKEY hRootKey, SI_OBJECT_INFO *ObjectInfo, BOOL *Btn)
Definition: security.c:762
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10
static PEDITSECURITY pfnEditSecurity
Definition: security.c:807
WCHAR * LPWSTR
Definition: xmlstorage.h:184
size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define HeapFree(x, y, z)
Definition: compat.h:394
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12
VOID UnloadAclUiDll ( VOID  )

Definition at line 830 of file security.c.

Referenced by ExitInstance().

831 {
832  if (hAclUiDll != NULL)
833  {
835  }
836 }
static HMODULE hAclUiDll
Definition: security.c:808
smooth NULL
Definition: ftsmooth.c:416
#define FreeLibrary(x)
Definition: compat.h:405

Variable Documentation

HMODULE hAclUiDll
static

Definition at line 808 of file security.c.

PEDITSECURITY pfnEditSecurity
static

Definition at line 807 of file security.c.

Referenced by RegKeyEditPermissions().

SI_ACCESS RegAccess[]
static
Initial value:
= {
}
#define KEY_SET_VALUE
Definition: nt_native.h:1017
#define IDS_ACCESS_QUERYVALUE
Definition: resource.h:175
#define KEY_READ
Definition: nt_native.h:1023
#define IDS_ACCESS_NOTIFY
Definition: resource.h:179
#define IDS_ACCESS_WRITEDAC
Definition: resource.h:182
#define IDS_ACCESS_CREATESUBKEY
Definition: resource.h:177
#define WRITE_OWNER
Definition: nt_native.h:60
#define IDS_ACCESS_SETVALUE
Definition: resource.h:176
#define IDS_ACCESS_READCONTROL
Definition: resource.h:184
#define IDS_ACCESS_READ
Definition: resource.h:174
#define IDS_ACCESS_CREATELINK
Definition: resource.h:180
#define SI_ACCESS_SPECIFIC
Definition: accctrl.h:138
#define IDS_ACCESS_DELETE
Definition: resource.h:181
#define IDS_ACCESS_FULLCONTROL
Definition: resource.h:173
#define WRITE_DAC
Definition: nt_native.h:59
#define READ_CONTROL
Definition: nt_native.h:58
#define GUID_NULL
Definition: ks.h:106
#define IDS_ACCESS_ENUMERATESUBKEYS
Definition: resource.h:178
#define KEY_ALL_ACCESS
Definition: nt_native.h:1041
#define KEY_CREATE_LINK
Definition: nt_native.h:1021
#define KEY_QUERY_VALUE
Definition: nt_native.h:1016
#define KEY_NOTIFY
Definition: nt_native.h:1020
#define SI_ACCESS_GENERAL
Definition: accctrl.h:139
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define IDS_ACCESS_WRITEOWNER
Definition: resource.h:183
#define KEY_CREATE_SUB_KEY
Definition: nt_native.h:1018
#define DELETE
Definition: nt_native.h:57
#define KEY_ENUMERATE_SUB_KEYS
Definition: nt_native.h:1019

Definition at line 338 of file security.c.

Referenced by ISecurityInformation_fnGetAccessRights().

GENERIC_MAPPING RegAccessMasks
static
Initial value:
= {
}
#define KEY_READ
Definition: nt_native.h:1023
#define KEY_WRITE
Definition: nt_native.h:1031
#define KEY_ALL_ACCESS
Definition: nt_native.h:1041
#define KEY_EXECUTE
Definition: nt_native.h:1037

Definition at line 355 of file security.c.

const DWORD RegDefaultAccess = 1
static

Definition at line 353 of file security.c.

Referenced by ISecurityInformation_fnGetAccessRights().

SI_INHERIT_TYPE RegInheritTypes[]
static
Initial value:
= {
}
#define IDS_INHERIT_THISKEYANDSUBKEYS
Definition: resource.h:187
#define CONTAINER_INHERIT_ACE
Definition: setypes.h:715
#define GUID_NULL
Definition: ks.h:106
#define INHERIT_ONLY_ACE
Definition: setypes.h:717
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define IDS_INHERIT_THISKEYONLY
Definition: resource.h:186
#define IDS_INHERIT_SUBKEYSONLY
Definition: resource.h:188

Definition at line 362 of file security.c.

Referenced by ISecurityInformation_fnGetInheritTypes().

const struct ifaceIEffectivePermissionVbtl vtblIEffectivePermission
static
Initial value:
=
{
}
static HRESULT STDMETHODCALLTYPE IEffectivePermission_fnQueryInterface(struct IEffectivePermission *this, REFIID iid, PVOID *pvObject)
Definition: security.c:553
static ULONG STDMETHODCALLTYPE IEffectivePermission_fnAddRef(struct IEffectivePermission *this)
Definition: security.c:571
static HRESULT STDMETHODCALLTYPE IEffectivePermission_fnGetEffectivePermission(struct IEffectivePermission *this, const GUID *pguidObjectType, PSID pUserSid, LPCWSTR pszServerName, PSECURITY_DESCRIPTOR pSD, POBJECT_TYPE_LIST *ppObjectTypeList, ULONG *pcObjectTypeListLength, PACCESS_MASK *ppGrantedAccessList, ULONG *pcGrantedAccessListLength)
Definition: security.c:583
static ULONG STDMETHODCALLTYPE IEffectivePermission_fnRelease(struct IEffectivePermission *this)
Definition: security.c:577

Definition at line 288 of file security.c.

Referenced by CRegKeySecurity_fnConstructor().

const struct ifaceISecurityInformationVbtl vtblISecurityInformation
static
Initial value:
=
{
}
static HRESULT STDMETHODCALLTYPE ISecurityInformation_fnMapGeneric(struct ISecurityInformation *this, const GUID *pguidObjectType, UCHAR *pAceFlags, ACCESS_MASK *pMask)
Definition: security.c:456
static HRESULT STDMETHODCALLTYPE ISecurityInformation_fnGetAccessRights(struct ISecurityInformation *this, const GUID *pguidObjectType, DWORD dwFlags, PSI_ACCESS *ppAccess, ULONG *pcAccesses, ULONG *piDefaultAccess)
Definition: security.c:442
static HRESULT STDMETHODCALLTYPE ISecurityInformation_fnSetSecurity(struct ISecurityInformation *this, SECURITY_INFORMATION RequestedInformation, PSECURITY_DESCRIPTOR pSecurityDescriptor)
Definition: security.c:430
static HRESULT STDMETHODCALLTYPE ISecurityInformation_fnPropertySheetPageCallback(struct ISecurityInformation *this, HWND hwnd, UINT uMsg, SI_PAGE_TYPE uPage)
Definition: security.c:486
static HRESULT STDMETHODCALLTYPE ISecurityInformation_fnQueryInterface(struct ISecurityInformation *this, REFIID iid, PVOID *pvObject)
Definition: security.c:369
static HRESULT STDMETHODCALLTYPE ISecurityInformation_fnGetObjectInformation(struct ISecurityInformation *this, PSI_OBJECT_INFO pObjectInfo)
Definition: security.c:399
static ULONG STDMETHODCALLTYPE ISecurityInformation_fnAddRef(struct ISecurityInformation *this)
Definition: security.c:387
static HRESULT STDMETHODCALLTYPE ISecurityInformation_fnGetSecurity(struct ISecurityInformation *this, SECURITY_INFORMATION RequestedInformation, PSECURITY_DESCRIPTOR *ppSecurityDescriptor, BOOL fDefault)
Definition: security.c:409
static ULONG STDMETHODCALLTYPE ISecurityInformation_fnRelease(struct ISecurityInformation *this)
Definition: security.c:393
static HRESULT STDMETHODCALLTYPE ISecurityInformation_fnGetInheritTypes(struct ISecurityInformation *this, PSI_INHERIT_TYPE *ppInheritTypes, ULONG *pcInheritTypes)
Definition: security.c:468

Definition at line 202 of file security.c.

Referenced by CRegKeySecurity_fnConstructor().

const struct ifaceISecurityObjectTypeInfoVbtl vtblISecurityObjectTypeInfo
static
Initial value:
=
{
}
static HRESULT STDMETHODCALLTYPE ISecurityObjectTypeInfo_fnQueryInterface(struct ISecurityObjectTypeInfo *this, REFIID iid, PVOID *pvObject)
Definition: security.c:641
static HRESULT STDMETHODCALLTYPE ISecurityObjectTypeInfo_fnGetInheritSource(struct ISecurityObjectTypeInfo *this, SECURITY_INFORMATION si, PACL pACL, PINHERITED_FROM *ppInheritArray)
Definition: security.c:671
static ULONG STDMETHODCALLTYPE ISecurityObjectTypeInfo_fnAddRef(struct ISecurityObjectTypeInfo *this)
Definition: security.c:659
static ULONG STDMETHODCALLTYPE ISecurityObjectTypeInfo_fnRelease(struct ISecurityObjectTypeInfo *this)
Definition: security.c:665

Definition at line 322 of file security.c.

Referenced by CRegKeySecurity_fnConstructor().