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.

43 lines
1.2 KiB

  1. // SecurityAttributes.cpp: implementation of the CSecurityAttributes class.
  2. //
  3. // (c) Copyright Schlumberger Technology Corp., unpublished work, created
  4. // 2001. This computer program includes Confidential, Proprietary
  5. // Information and is a Trade Secret of Schlumberger Technology Corp. All
  6. // use, disclosure, and/or reproduction is prohibited unless authorized
  7. // in writing. All Rights Reserved.
  8. //////////////////////////////////////////////////////////////////////
  9. #include "SecurityAttributes.h"
  10. //////////////////////////////////////////////////////////////////////
  11. // Construction/Destruction
  12. //////////////////////////////////////////////////////////////////////
  13. CSecurityAttributes::CSecurityAttributes()
  14. {
  15. pACL = NULL;
  16. pEveryoneSID = NULL;
  17. sa.bInheritHandle = false;
  18. sa.lpSecurityDescriptor = NULL;
  19. sa.nLength = 0;
  20. }
  21. CSecurityAttributes::~CSecurityAttributes()
  22. {
  23. if (NULL != pACL)
  24. {
  25. LocalFree(pACL);
  26. pACL = NULL;
  27. }
  28. if (NULL != sa.lpSecurityDescriptor)
  29. {
  30. LocalFree(sa.lpSecurityDescriptor);
  31. sa.lpSecurityDescriptor = NULL;
  32. }
  33. if (NULL != pEveryoneSID)
  34. {
  35. FreeSid(pEveryoneSID);
  36. pEveryoneSID = NULL;
  37. }
  38. }