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.

105 lines
2.4 KiB

  1. /*++
  2. Copyright (c) 1997-2000 Microsoft Corporation
  3. Module Name:
  4. SaifWild.cpp
  5. Abstract:
  6. This module implements various "Wildcard SID" operations that are
  7. used internally by the WinSAIFER APIs to compute SID list
  8. intersections and inversions.
  9. Author:
  10. Jeffrey Lawson (JLawson) - Apr 2000
  11. Environment:
  12. User mode only.
  13. Revision History:
  14. Created - Apr 2000
  15. --*/
  16. #ifndef _SAIFER_WILDCARD_SIDS_H_
  17. #define _SAIFER_WILDCARD_SIDS_H_
  18. //
  19. // Internal structure used to represent our private "Wildcard SIDs".
  20. //
  21. typedef struct _AUTHZ_WILDCARDSID
  22. {
  23. PSID Sid;
  24. DWORD WildcardPos; // -1, or else the wildcard position of
  25. // the within the subauthorities.
  26. } AUTHZ_WILDCARDSID, *PAUTHZ_WILDCARDSID;
  27. #ifdef __cplusplus
  28. extern "C" {
  29. #endif
  30. NTSTATUS NTAPI
  31. CodeAuthzpConvertWildcardStringSidToSidW(
  32. IN LPCWSTR szStringSid,
  33. OUT PAUTHZ_WILDCARDSID pWildcardSid
  34. );
  35. NTSTATUS NTAPI
  36. CodeAuthzpConvertWildcardSidToStringSidW(
  37. IN PAUTHZ_WILDCARDSID pWildcardSid,
  38. OUT PUNICODE_STRING pUnicodeOutput
  39. );
  40. BOOLEAN NTAPI
  41. CodeAuthzpCompareWildcardSidWithSid(
  42. IN PAUTHZ_WILDCARDSID pWildcardSid,
  43. IN PSID pMatchSid
  44. );
  45. BOOLEAN NTAPI
  46. CodeAuthzpSidInWildcardList (
  47. IN PAUTHZ_WILDCARDSID WildcardList,
  48. IN ULONG WildcardCount,
  49. IN PSID SePrincipalSelfSid OPTIONAL,
  50. IN PSID PrincipalSelfSid OPTIONAL,
  51. IN PSID Sid
  52. );
  53. BOOLEAN NTAPI
  54. CodeAuthzpInvertAndAddSids(
  55. IN HANDLE InAccessToken,
  56. IN PSID InTokenOwner OPTIONAL,
  57. IN DWORD InvertSidCount,
  58. IN PAUTHZ_WILDCARDSID SidsToInvert,
  59. IN DWORD SidsAddedCount OPTIONAL,
  60. IN PSID_AND_ATTRIBUTES SidsToAdd OPTIONAL,
  61. OUT DWORD *NewDisabledSidCount,
  62. OUT PSID_AND_ATTRIBUTES *NewSidsToDisable
  63. );
  64. BOOLEAN NTAPI
  65. CodeAuthzpExpandWildcardList(
  66. IN HANDLE InAccessToken,
  67. IN PSID InTokenOwner OPTIONAL,
  68. IN DWORD WildcardCount,
  69. IN PAUTHZ_WILDCARDSID WildcardList,
  70. OUT DWORD *OutSidCount,
  71. OUT PSID_AND_ATTRIBUTES *OutSidList
  72. );
  73. #ifdef __cplusplus
  74. } // extern "C"
  75. #endif
  76. #endif