xref: /openbmc/u-boot/include/zfs/zfs_acl.h (revision baefb63a)
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 
12 #ifndef	_SYS_FS_ZFS_ACL_H
13 #define	_SYS_FS_ZFS_ACL_H
14 
15 typedef struct zfs_oldace {
16 	uint32_t	z_fuid;		/* "who" */
17 	uint32_t	z_access_mask;	/* access mask */
18 	uint16_t	z_flags;	/* flags, i.e inheritance */
19 	uint16_t	z_type;		/* type of entry allow/deny */
20 } zfs_oldace_t;
21 
22 #define	ACE_SLOT_CNT	6
23 
24 typedef struct zfs_znode_acl_v0 {
25 	uint64_t	z_acl_extern_obj;	  /* ext acl pieces */
26 	uint32_t	z_acl_count;		  /* Number of ACEs */
27 	uint16_t	z_acl_version;		  /* acl version */
28 	uint16_t	z_acl_pad;		  /* pad */
29 	zfs_oldace_t	z_ace_data[ACE_SLOT_CNT]; /* 6 standard ACEs */
30 } zfs_znode_acl_v0_t;
31 
32 #define	ZFS_ACE_SPACE	(sizeof(zfs_oldace_t) * ACE_SLOT_CNT)
33 
34 typedef struct zfs_znode_acl {
35 	uint64_t	z_acl_extern_obj;	  /* ext acl pieces */
36 	uint32_t	z_acl_size;		  /* Number of bytes in ACL */
37 	uint16_t	z_acl_version;		  /* acl version */
38 	uint16_t	z_acl_count;		  /* ace count */
39 	uint8_t	z_ace_data[ZFS_ACE_SPACE]; /* space for embedded ACEs */
40 } zfs_znode_acl_t;
41 
42 
43 #endif	/* _SYS_FS_ZFS_ACL_H */
44