1b1b8ab3lling/*
2b1b8ab3lling *  GRUB  --  GRand Unified Bootloader
3b1b8ab3lling *  Copyright (C) 1999,2000,2001,2002,2003,2004  Free Software Foundation, Inc.
4b1b8ab3lling *
5b1b8ab3lling *  This program is free software; you can redistribute it and/or modify
6b1b8ab3lling *  it under the terms of the GNU General Public License as published by
7b1b8ab3lling *  the Free Software Foundation; either version 2 of the License, or
8b1b8ab3lling *  (at your option) any later version.
9b1b8ab3lling *
10b1b8ab3lling *  This program is distributed in the hope that it will be useful,
11b1b8ab3lling *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12b1b8ab3lling *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13b1b8ab3lling *  GNU General Public License for more details.
14b1b8ab3lling *
15b1b8ab3lling *  You should have received a copy of the GNU General Public License
16b1b8ab3lling *  along with this program; if not, write to the Free Software
17b1b8ab3lling *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18b1b8ab3lling */
19b1b8ab3lling/*
20b1b8ab3lling * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
21b1b8ab3lling * Use is subject to license terms.
22b1b8ab3lling */
23b1b8ab3lling
24b1b8ab3lling#ifndef	_SYS_FS_ZFS_ACL_H
25b1b8ab3lling#define	_SYS_FS_ZFS_ACL_H
26b1b8ab3lling
27b1b8ab3lling#pragma ident	"%Z%%M%	%I%	%E% SMI"
28b1b8ab3lling
29f48205bcasper#ifndef _UID_T
30f48205bcasper#define	_UID_T
31f48205bcaspertypedef	unsigned int uid_t;			/* UID type */
32f48205bcasper#endif /* _UID_T */
33b1b8ab3lling
34da6c28aamwtypedef struct zfs_oldace {
35da6c28aamw	uint32_t	z_fuid;		/* "who" */
36da6c28aamw	uint32_t	z_access_mask;  /* access mask */
37da6c28aamw	uint16_t	z_flags;	/* flags, i.e inheritance */
38da6c28aamw	uint16_t	z_type;		/* type of entry allow/deny */
39da6c28aamw} zfs_oldace_t;
40b1b8ab3lling
41b1b8ab3lling#define	ACE_SLOT_CNT	6
42b1b8ab3lling
43da6c28aamwtypedef struct zfs_znode_acl_v0 {
44b1b8ab3lling	uint64_t	z_acl_extern_obj;	  /* ext acl pieces */
45b1b8ab3lling	uint32_t	z_acl_count;		  /* Number of ACEs */
46b1b8ab3lling	uint16_t	z_acl_version;		  /* acl version */
47b1b8ab3lling	uint16_t	z_acl_pad;		  /* pad */
48da6c28aamw	zfs_oldace_t	z_ace_data[ACE_SLOT_CNT]; /* 6 standard ACEs */
49da6c28aamw} zfs_znode_acl_v0_t;
50da6c28aamw
51da6c28aamw#define	ZFS_ACE_SPACE	(sizeof (zfs_oldace_t) * ACE_SLOT_CNT)
52da6c28aamw
53da6c28aamwtypedef struct zfs_znode_acl {
54da6c28aamw	uint64_t	z_acl_extern_obj;	  /* ext acl pieces */
55da6c28aamw	uint32_t	z_acl_size;		  /* Number of bytes in ACL */
56da6c28aamw	uint16_t	z_acl_version;		  /* acl version */
57da6c28aamw	uint16_t	z_acl_count;		  /* ace count */
58da6c28aamw	uint8_t		z_ace_data[ZFS_ACE_SPACE]; /* space for embedded ACEs */
59b1b8ab3lling} zfs_znode_acl_t;
60b1b8ab3lling
61da6c28aamw
62b1b8ab3lling#endif	/* _SYS_FS_ZFS_ACL_H */
63