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.

61 lines
1.9 KiB

  1. #ifndef SDHELPER_H
  2. #define SDHELPER_H
  3. #include "sd.hpp"
  4. //----------------------------------------------------------------------------
  5. // Function: ConvertSID
  6. //
  7. // Synopsis: Converts a sid to a form that can be deallocated using free.
  8. //
  9. // Arguments:
  10. //
  11. // originaSid a sid to be converted
  12. //
  13. // Returns: a pointer to a SID; otherwise, returns NULL
  14. // the caller is responsible for freeing the memory
  15. //
  16. // Modifies:
  17. //
  18. // Note: this function does not try to validate the input SID.
  19. //
  20. //----------------------------------------------------------------------------
  21. PSID ConvertSID(PSID originalSid);
  22. //----------------------------------------------------------------------------
  23. // Function: BuildAdminsAndSystemSDForCOM
  24. //
  25. // Synopsis: Builds a TSD object that allows Local Administrators and System
  26. // COM_RIGHTS_EXECUTE access.
  27. //
  28. // Arguments:
  29. //
  30. // Returns: A pointer to a TSD object; otherwise, returns NULL
  31. // the caller is responsible for freeing the memory
  32. //
  33. // Modifies:
  34. //
  35. //----------------------------------------------------------------------------
  36. TSD* BuildAdminsAndSystemSDForCOM();
  37. //----------------------------------------------------------------------------
  38. // Function: BuildAdminsAndSystemSD
  39. //
  40. // Synopsis: Builds a TSD object that allows Local Administrators and System
  41. // access as specified by accessMask.
  42. // owner is set to administrators
  43. // group is set to administrators
  44. //
  45. // Arguments:
  46. //
  47. // accessMask the access mask
  48. //
  49. // Returns: A pointer to a TSD object; otherwise, returns NULL
  50. // the caller is responsible for freeing the memory
  51. //
  52. // Modifies:
  53. //
  54. //----------------------------------------------------------------------------
  55. TSD* BuildAdminsAndSystemSD(DWORD accessMask);
  56. #endif