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.

63 lines
1.4 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows NT **/
  3. /** Copyright(c) Microsoft Corp., 2001 **/
  4. /**********************************************************************/
  5. /*
  6. secfcns.hxx
  7. Declarations for security helper functions.
  8. */
  9. #ifndef _SECFCNS_H_
  10. #define _SECFCNS_H_
  11. #include <Accctrl.h>
  12. #ifndef dllexp
  13. # define dllexp __declspec( dllexport)
  14. #endif // dllexp
  15. class STRU;
  16. DWORD
  17. AllocateAndCreateWellKnownSid(
  18. WELL_KNOWN_SID_TYPE SidType,
  19. PSID* ppSid
  20. );
  21. VOID
  22. FreeWellKnownSid(
  23. PSID* ppSid
  24. );
  25. DWORD
  26. AllocateAndCreateWellKnownAcl(
  27. WELL_KNOWN_SID_TYPE SidType,
  28. BOOL fAccessAllowedAcl,
  29. PACL* ppAcl,
  30. DWORD* pcbAcl,
  31. ACCESS_MASK AccessMask
  32. );
  33. VOID
  34. FreeWellKnownAcl(
  35. PACL* ppAcl
  36. );
  37. VOID
  38. SetExplicitAccessSettings( EXPLICIT_ACCESS* pea,
  39. DWORD dwAccessPermissions,
  40. ACCESS_MODE AccessMode,
  41. PSID pSID
  42. );
  43. DWORD GetSecurityAttributesForHandle(HANDLE hToken, PSECURITY_ATTRIBUTES* ppSa);
  44. VOID FreeSecurityAttributes(PSECURITY_ATTRIBUTES pSa);
  45. DWORD GenerateNameWithGUID(LPCWSTR pwszPrefix, STRU* pStr);
  46. #endif