Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

176 lines
4.8 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1996 - 1999
  6. //
  7. // File: aclpriv.h
  8. //
  9. //--------------------------------------------------------------------------
  10. #ifndef _ACLUI_
  11. #define _ACLUI_
  12. #ifndef UNICODE
  13. #error "No ANSI support yet"
  14. #endif
  15. extern "C"
  16. {
  17. #include <nt.h> // SE_TAKE_OWNERSHIP_PRIVILEGE, etc
  18. #include <ntrtl.h>
  19. #include <nturtl.h>
  20. #include <seopaque.h> // RtlObjectAceSid, etc.
  21. }
  22. #define INC_OLE2
  23. #include <windows.h>
  24. #include <commctrl.h>
  25. #include "resource.h" // resource ID's
  26. #include "idh.h" // help ID's
  27. #ifndef RC_INVOKED
  28. #include <windowsx.h>
  29. #include <atlconv.h> // ANSI/Unicode conversion support
  30. #include<shellapi.h>
  31. #include<shlapip.h>
  32. #include <shlobj.h>
  33. #include<shlobjp.h>
  34. #include <shfusion.h>
  35. #include <accctrl.h>
  36. #include <aclui.h>
  37. #include <comctrlp.h> // DPA/DSA
  38. #include <objsel.h> // DS Object Picker
  39. #include "lmaccess.h"
  40. #include <htmlhelp.h>
  41. #include <common.h>
  42. #include "misc.h"
  43. #include "pagebase.h"
  44. #include "chklist.h"
  45. #include "ace.h"
  46. #include "perm.h"
  47. #include "cstrings.h"
  48. #include "sidcache.h"
  49. #include "aclbloat.h"
  50. // These are here for NT4 SP4 builds (comctrlp.h added these for NT5)
  51. #ifndef DA_LAST
  52. #define DA_LAST (0x7FFFFFFF)
  53. #endif
  54. #ifndef DPA_AppendPtr
  55. #define DPA_AppendPtr(hdpa, pitem) DPA_InsertPtr(hdpa, DA_LAST, pitem)
  56. #endif
  57. #ifndef DSA_AppendItem
  58. #define DSA_AppendItem(hdsa, pitem) DSA_InsertItem(hdsa, DA_LAST, pitem)
  59. #endif
  60. extern HINSTANCE hModule;
  61. extern HINSTANCE g_hGetUserLib;
  62. extern UINT UM_SIDLOOKUPCOMPLETE;
  63. extern UINT g_cfDsSelectionList;
  64. extern UINT g_cfSidInfoList;
  65. // Magic debug flags
  66. #define TRACE_PERMPAGE 0x00000001
  67. #define TRACE_PRINCIPAL 0x00000002
  68. #define TRACE_SI 0x00000004
  69. #define TRACE_PERMSET 0x00000008
  70. #define TRACE_ACELIST 0x00000010
  71. #define TRACE_ACEEDIT 0x00000020
  72. #define TRACE_OWNER 0x00000040
  73. #define TRACE_MISC 0x00000080
  74. #define TRACE_CHECKLIST 0x00000100
  75. #define TRACE_SIDCACHE 0x00000200
  76. #define TRACE_EFFPERM 0x00000400
  77. #define TRACE_ACLBLOAT 0x00000800
  78. #define TRACE_ALWAYS 0xffffffff // use with caution
  79. #define MAX_COLUMN_CHARS 100
  80. #define COLUMN_ALLOW 1
  81. #define COLUMN_DENY 2
  82. #define ACE_INHERIT_ALL (CONTAINER_INHERIT_ACE | OBJECT_INHERIT_ACE)
  83. #define SI_ACCESS_CUSTOM 0x10000000 //This flag is used is SI_ACCESS to indicate
  84. //Custom checkbox which comes in first screen for
  85. //custom permission
  86. #define ACL_BLOAT_LIMIT 8
  87. BOOL
  88. ACLUIAPI
  89. EditSecurityEx(HWND hwndOwner,
  90. LPSECURITYINFO psi,
  91. PPERMPAGE pPermPage,
  92. UINT nStartPage,
  93. BOOL &refbNoReadWriteCanWriteOwner);
  94. BOOL
  95. EditACEEntry(HWND hwndOwner,
  96. LPSECURITYINFO psi,
  97. PACE pAce,
  98. SI_PAGE_TYPE siType,
  99. LPCTSTR pszObjectName,
  100. BOOL bReadOnly,
  101. DWORD *pdwResult,
  102. HDPA *phEntries,
  103. HDPA *phPropertyEntries,
  104. UINT nStartPage = 0);
  105. // EditACEEntry result values. Set if something was edited on the
  106. // corresponding page, otherwise clear.
  107. #define EAE_NEW_OBJECT_ACE 0x0001
  108. #define EAE_NEW_PROPERTY_ACE 0x0002
  109. LPARAM
  110. GetSelectedItemData(HWND hList, int *pIndex);
  111. int
  112. ConfirmAclProtect(HWND hwndParent, BOOL bDacl);
  113. HPROPSHEETPAGE
  114. CreateOwnerPage(LPSECURITYINFO psi, SI_OBJECT_INFO *psiObjectInfo, BOOL &refbNoReadWriteCanWriteOwner);
  115. HPROPSHEETPAGE
  116. CreateEffectivePermPage(LPSECURITYINFO psi,SI_OBJECT_INFO *psiObjectInfo);
  117. STDMETHODIMP
  118. _InitCheckList(HWND hwndList,
  119. LPSECURITYINFO psi,
  120. const GUID * pguidObjectType,
  121. DWORD dwFlags,
  122. HINSTANCE hInstance,
  123. DWORD dwType,
  124. PSI_ACCESS * ppDefaultAccess);
  125. void
  126. HandleListClick(PNM_CHECKLIST pnmc,
  127. SI_PAGE_TYPE siType,
  128. BOOL bContainerFlags,
  129. HDSA * phAllowUncheckedAccess= NULL,
  130. HDSA * phDenyUncheckedAccess= NULL,
  131. BOOL bCustomPresent = FALSE);
  132. UINT
  133. GetAcesFromCheckList(HWND hChkList,
  134. PSID pSid,
  135. BOOL fPerm,
  136. BOOL fAceFlagsProvided,
  137. UCHAR uAceFlagsNew,
  138. const GUID *pInheritGUID,
  139. HDPA hEntries);
  140. typedef struct _col_for_listview
  141. {
  142. UINT idText; // Resource Id for column name
  143. UINT iPercent; // Percent of width
  144. } COL_FOR_LV;
  145. #endif // RC_INVOKED
  146. #endif // _ACLUI_