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