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.

71 lines
2.1 KiB

  1. /*****************************************************************************/
  2. /* Copyright (c) 1999-2001 Microsoft Corporation, All Rights Reserved /
  3. /*****************************************************************************/
  4. //=================================================================
  5. //
  6. // SecUtils.cpp -- Security utilities useful to wbem mof classes
  7. //
  8. // Copyright (c) 1999-2001 Microsoft Corporation, All Rights Reserved
  9. //
  10. // Revisions: 6/9/99 a-kevhu Created
  11. //
  12. //=================================================================
  13. #ifndef _SECUTILS_H_
  14. #define _SECUTILS_H_
  15. // Forward class declarations...
  16. class CDACL;
  17. class CSACL;
  18. class CSid;
  19. void FillTrusteeFromSid (CInstance *pInstance, CSid &sid);
  20. void FillInstanceDACL(CInstance *pInstance, CDACL &dacl);
  21. void FillInstanceSACL(CInstance *pInstance, CSACL &sacl);
  22. DWORD FillDACLFromInstance(CInstance *pInstance,
  23. CDACL &dacl,
  24. MethodContext *pMethodContext);
  25. DWORD FillSACLFromInstance(CInstance *pInstance,
  26. CSACL &sacl,
  27. MethodContext *pMethodContext);
  28. bool GetArray(IWbemClassObject *piClassObject,
  29. const CHString &name,
  30. VARIANT &v,
  31. VARTYPE eVariantType);
  32. DWORD FillSIDFromTrustee(CInstance *pTrustee, CSid &sid);
  33. #ifdef NTONLY
  34. void DumpWin32Descriptor(PSECURITY_DESCRIPTOR psd, LPCWSTR wstrFilename = NULL);
  35. void Output(LPCWSTR wstrOut, LPCWSTR wstrFilename = NULL);
  36. bool AmIAnOwner(const CHString &chstrName, SE_OBJECT_TYPE ObjectType);
  37. bool IsUserInGroup(const CSid &csidUser,
  38. const CSid &csidGroup,
  39. SID_NAME_USE snuGroup);
  40. bool RecursiveFindUserInGroup(CNetAPI32 &netapi,
  41. const CHString &chstrDomainName,
  42. const CHString &chstrGroupName,
  43. SID_NAME_USE snuGroup,
  44. const CSid &csidUser);
  45. #endif
  46. #endif