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.

66 lines
968 B

  1. /*++
  2. Copyright (c) 1989 Microsoft Corporation
  3. Module Name:
  4. Sep.c
  5. Abstract:
  6. This Module implements the private security routine that are defined
  7. in sep.h
  8. Author:
  9. Gary Kimura (GaryKi) 9-Nov-1989
  10. Environment:
  11. Kernel Mode
  12. Revision History:
  13. --*/
  14. #include "pch.h"
  15. #pragma hdrstop
  16. #ifdef ALLOC_PRAGMA
  17. #pragma alloc_text(PAGE,SepCheckAcl)
  18. #endif
  19. BOOLEAN
  20. SepCheckAcl (
  21. IN PACL Acl,
  22. IN ULONG Length
  23. )
  24. /*++
  25. Routine Description:
  26. This is a private routine that checks that an acl is well formed.
  27. Arguments:
  28. Acl - Supplies the acl to check
  29. Length - Supplies the real size of the acl. The internal acl size
  30. must agree.
  31. Return Value:
  32. BOOLEAN - TRUE if the acl is well formed and FALSE otherwise
  33. --*/
  34. {
  35. if ((Length < sizeof(ACL)) || (Length != Acl->AclSize)) {
  36. return FALSE;
  37. }
  38. return RtlValidAcl( Acl );
  39. }