Source code of Windows XP (NT5)
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.

57 lines
2.4 KiB

  1. #ifndef __TEXTUALSID_H__
  2. #define __TEXTUALSID_H__
  3. /*---------------------------------------------------------------------------
  4. File: TextualSid.h
  5. Comments: Converts a SID between binary and textual representations.
  6. (c) Copyright 1999, Mission Critical Software, Inc., All Rights Reserved
  7. Proprietary and confidential to Mission Critical Software, Inc.
  8. REVISION LOG ENTRY
  9. Revision By: Christy Boles
  10. Revised on 02/05/99 14:52:27
  11. ---------------------------------------------------------------------------
  12. */
  13. BOOL //ret- TRUE=success
  14. GetTextualSid(
  15. PSID pSid, // in - binary Sid
  16. LPTSTR TextualSid, // out- textual representation of sid
  17. LPDWORD lpdwBufferLen // in - DIM length of buffer for TextualSid
  18. );
  19. // The PSID returned from this function should be freed by the caller, using FreeSid
  20. PSID // ret- binary SID, or NULL
  21. SidFromString(
  22. WCHAR const * strSid // in - string representation of SID
  23. );
  24. /*****************************************************************************************************/
  25. /* DomainizeSid:
  26. Takes a domain sid, and verifies that its last subauthority value is -1. If the RID is not
  27. -1, DomainizeSid adds a -1 to the end.
  28. /*****************************************************************************************************/
  29. PSID // ret -the sid with RID = -1
  30. DomainizeSid(
  31. PSID psid, // in -sid to check and possibly fix
  32. BOOL freeOldSid // in -whether to free the old sid
  33. );
  34. //takes a source and target account sid and breaks it into a src and tgt
  35. //domain sid and src and tgt account rid
  36. BOOL // ret -Success ? TRUE | FALSE
  37. SplitAccountSids(
  38. PSID srcSid, // in - src account sid
  39. WCHAR *srcDomainSid, // out - src domain sid (textual)
  40. DWORD *srcRid, // out - src account rid
  41. PSID tgtSid, // in - tgt account sid
  42. WCHAR *tgtDomainSid, // out - tgt domain sid (textual)
  43. DWORD *tgtRid // out - tgt account rid
  44. );
  45. #endif //__TEXTUALSID_H__