AccessAllowedACE.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /* Copyright (C) 2014 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
  2. *
  3. * You can redistribute this program and/or modify it under the terms of
  4. * the GNU Lesser Public License as published by the Free Software Foundation,
  5. * either version 3 of the License, or (at your option) any later version.
  6. */
  7. using System;
  8. using System.Collections.Generic;
  9. using System.Text;
  10. using Utilities;
  11. namespace SMBLibrary
  12. {
  13. /// <summary>
  14. /// [MS-DTYP] ACCESS_ALLOWED_ACE
  15. /// </summary>
  16. public class AccessAllowedACE : ACE
  17. {
  18. public AceHeader Header;
  19. public AccessMask Mask;
  20. public SID Sid;
  21. public AccessAllowedACE()
  22. {
  23. Header = new AceHeader();
  24. Header.AceType = AceType.ACCESS_ALLOWED_ACE_TYPE;
  25. }
  26. public AccessAllowedACE(byte[] buffer, int offset)
  27. {
  28. Header = new AceHeader(buffer, offset + 0);
  29. Mask = new AccessMask(buffer, offset + 4);
  30. Sid = new SID(buffer, offset + 8);
  31. }
  32. public override int Length
  33. {
  34. get
  35. {
  36. return 8 + Sid.Length;
  37. }
  38. }
  39. }
  40. }