zfs_acl.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * GRUB -- GRand Unified Bootloader
  3. * Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc.
  4. *
  5. * SPDX-License-Identifier: GPL-2.0+
  6. */
  7. /*
  8. * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
  9. * Use is subject to license terms.
  10. */
  11. #ifndef _SYS_FS_ZFS_ACL_H
  12. #define _SYS_FS_ZFS_ACL_H
  13. typedef struct zfs_oldace {
  14. uint32_t z_fuid; /* "who" */
  15. uint32_t z_access_mask; /* access mask */
  16. uint16_t z_flags; /* flags, i.e inheritance */
  17. uint16_t z_type; /* type of entry allow/deny */
  18. } zfs_oldace_t;
  19. #define ACE_SLOT_CNT 6
  20. typedef struct zfs_znode_acl_v0 {
  21. uint64_t z_acl_extern_obj; /* ext acl pieces */
  22. uint32_t z_acl_count; /* Number of ACEs */
  23. uint16_t z_acl_version; /* acl version */
  24. uint16_t z_acl_pad; /* pad */
  25. zfs_oldace_t z_ace_data[ACE_SLOT_CNT]; /* 6 standard ACEs */
  26. } zfs_znode_acl_v0_t;
  27. #define ZFS_ACE_SPACE (sizeof(zfs_oldace_t) * ACE_SLOT_CNT)
  28. typedef struct zfs_znode_acl {
  29. uint64_t z_acl_extern_obj; /* ext acl pieces */
  30. uint32_t z_acl_size; /* Number of bytes in ACL */
  31. uint16_t z_acl_version; /* acl version */
  32. uint16_t z_acl_count; /* ace count */
  33. uint8_t z_ace_data[ZFS_ACE_SPACE]; /* space for embedded ACEs */
  34. } zfs_znode_acl_t;
  35. #endif /* _SYS_FS_ZFS_ACL_H */