139999a69SPedro F. Giffuni /*- 2*4d846d26SWarner Losh * SPDX-License-Identifier: BSD-2-Clause 37abc09cdSPedro F. Giffuni * 439999a69SPedro F. Giffuni * Copyright (c) 2017, Fedor Uporov 539999a69SPedro F. Giffuni * All rights reserved. 639999a69SPedro F. Giffuni * 739999a69SPedro F. Giffuni * Redistribution and use in source and binary forms, with or without 839999a69SPedro F. Giffuni * modification, are permitted provided that the following conditions 939999a69SPedro F. Giffuni * are met: 1039999a69SPedro F. Giffuni * 1. Redistributions of source code must retain the above copyright 1139999a69SPedro F. Giffuni * notice, this list of conditions and the following disclaimer. 1239999a69SPedro F. Giffuni * 2. Redistributions in binary form must reproduce the above copyright 1339999a69SPedro F. Giffuni * notice, this list of conditions and the following disclaimer in the 1439999a69SPedro F. Giffuni * documentation and/or other materials provided with the distribution. 1539999a69SPedro F. Giffuni * 1639999a69SPedro F. Giffuni * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 1739999a69SPedro F. Giffuni * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1839999a69SPedro F. Giffuni * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1939999a69SPedro F. Giffuni * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2039999a69SPedro F. Giffuni * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2139999a69SPedro F. Giffuni * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2239999a69SPedro F. Giffuni * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2339999a69SPedro F. Giffuni * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2439999a69SPedro F. Giffuni * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2539999a69SPedro F. Giffuni * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2639999a69SPedro F. Giffuni * SUCH DAMAGE. 2739999a69SPedro F. Giffuni */ 2839999a69SPedro F. Giffuni 2939999a69SPedro F. Giffuni #ifndef _FS_EXT2FS_EXT2_ACL_H_ 3039999a69SPedro F. Giffuni #define _FS_EXT2FS_EXT2_ACL_H_ 3139999a69SPedro F. Giffuni 3239999a69SPedro F. Giffuni #define EXT4_ACL_VERSION 0x0001 3339999a69SPedro F. Giffuni 3439999a69SPedro F. Giffuni struct ext2_acl_entry { 3539999a69SPedro F. Giffuni int16_t ae_tag; 3639999a69SPedro F. Giffuni int16_t ae_perm; 3739999a69SPedro F. Giffuni int32_t ae_id; 3839999a69SPedro F. Giffuni }; 3939999a69SPedro F. Giffuni 4039999a69SPedro F. Giffuni struct ext2_acl_entry_short { 4139999a69SPedro F. Giffuni int16_t ae_tag; 4239999a69SPedro F. Giffuni int16_t ae_perm; 4339999a69SPedro F. Giffuni }; 4439999a69SPedro F. Giffuni 4539999a69SPedro F. Giffuni struct ext2_acl_header { 4639999a69SPedro F. Giffuni int32_t a_version; 4739999a69SPedro F. Giffuni }; 4839999a69SPedro F. Giffuni 4939999a69SPedro F. Giffuni void ext2_sync_acl_from_inode(struct inode *ip, struct acl *acl); 5039999a69SPedro F. Giffuni 5139999a69SPedro F. Giffuni int ext2_getacl(struct vop_getacl_args *); 5239999a69SPedro F. Giffuni int ext2_setacl(struct vop_setacl_args *); 5339999a69SPedro F. Giffuni int ext2_aclcheck(struct vop_aclcheck_args *); 5439999a69SPedro F. Giffuni 5539999a69SPedro F. Giffuni #endif /* !_FS_EXT2FS_EXT2_ACL_H_ */ 56