zfs_acl.h 1.2 KB

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