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.

49 lines
834 B

  1. /*++
  2. Copyright (c) 2001 Microsoft Corporation
  3. Module Name:
  4. secutils.h
  5. Abstract:
  6. The security utility functions for the shims.
  7. History:
  8. 02/09/2001 maonis Created
  9. 08/14/2001 robkenny Inserted inside the ShimLib namespace.
  10. --*/
  11. #ifndef _SEC_UTILS_H_
  12. #define _SEC_UTILS_H_
  13. #include "ShimHook.h"
  14. #include <aclapi.h>
  15. namespace ShimLib
  16. {
  17. #define ComputeDeniedAccesses(GrantedAccess, DesiredAccess) \
  18. ((~(GrantedAccess)) & (DesiredAccess))
  19. BOOL SearchGroupForSID(DWORD dwGroup, BOOL* pfIsMember);
  20. BOOL GetCurrentThreadSid(PSID* ppCurrentUserSid);
  21. BOOL ShouldApplyShim();
  22. BOOL AdjustPrivilege(LPCWSTR pwszPrivilege, BOOL fEnable);
  23. //
  24. // File specific
  25. //
  26. BOOL RequestWriteAccess(DWORD dwCreationDisposition, DWORD dwDesiredAccess);
  27. }; // end of namespace ShimLib
  28. #endif // _SEC_UTILS_H_