xref: /netbsd-src/external/cddl/osnet/dist/uts/common/sys/acl_impl.h (revision 3227e6cf668bd374971740bd6660f43cee4417ac)
1c1cb2cd8Shaad /*
2c1cb2cd8Shaad  * CDDL HEADER START
3c1cb2cd8Shaad  *
4c1cb2cd8Shaad  * The contents of this file are subject to the terms of the
5c1cb2cd8Shaad  * Common Development and Distribution License (the "License").
6c1cb2cd8Shaad  * You may not use this file except in compliance with the License.
7c1cb2cd8Shaad  *
8c1cb2cd8Shaad  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9c1cb2cd8Shaad  * or http://www.opensolaris.org/os/licensing.
10c1cb2cd8Shaad  * See the License for the specific language governing permissions
11c1cb2cd8Shaad  * and limitations under the License.
12c1cb2cd8Shaad  *
13c1cb2cd8Shaad  * When distributing Covered Code, include this CDDL HEADER in each
14c1cb2cd8Shaad  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15c1cb2cd8Shaad  * If applicable, add the following below this CDDL HEADER, with the
16c1cb2cd8Shaad  * fields enclosed by brackets "[]" replaced with your own identifying
17c1cb2cd8Shaad  * information: Portions Copyright [yyyy] [name of copyright owner]
18c1cb2cd8Shaad  *
19c1cb2cd8Shaad  * CDDL HEADER END
20c1cb2cd8Shaad  */
21c1cb2cd8Shaad /*
22c1cb2cd8Shaad  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
23c1cb2cd8Shaad  * Use is subject to license terms.
24c1cb2cd8Shaad  */
25c1cb2cd8Shaad 
26c1cb2cd8Shaad #ifndef _SYS_ACL_IMPL_H
27c1cb2cd8Shaad #define	_SYS_ACL_IMPL_H
28c1cb2cd8Shaad 
29c1cb2cd8Shaad #pragma ident	"%Z%%M%	%I%	%E% SMI"
30c1cb2cd8Shaad 
31c1cb2cd8Shaad #ifdef	__cplusplus
32c1cb2cd8Shaad extern "C" {
33c1cb2cd8Shaad #endif
34c1cb2cd8Shaad 
35c1cb2cd8Shaad /*
36c1cb2cd8Shaad  * acl flags
37c1cb2cd8Shaad  *
38c1cb2cd8Shaad  * ACL_AUTO_INHERIT, ACL_PROTECTED and ACL_DEFAULTED
39c1cb2cd8Shaad  * flags can also be stored in this field.
40c1cb2cd8Shaad  */
41c1cb2cd8Shaad #define	ACL_IS_TRIVIAL	0x10000
42c1cb2cd8Shaad #define	ACL_IS_DIR	0x20000
43c1cb2cd8Shaad 
44c1cb2cd8Shaad typedef enum acl_type {
45c1cb2cd8Shaad 	ACLENT_T = 0,
46c1cb2cd8Shaad 	ACE_T = 1
47*3227e6cfSchs } zfs_acl_type_t;
48c1cb2cd8Shaad 
49c1cb2cd8Shaad struct acl_info {
50*3227e6cfSchs 	zfs_acl_type_t acl_type;	/* style of acl */
51c1cb2cd8Shaad 	int acl_cnt;			/* number of acl entries */
52c1cb2cd8Shaad 	int acl_entry_size;		/* sizeof acl entry */
53c1cb2cd8Shaad 	int acl_flags;			/* special flags about acl */
54c1cb2cd8Shaad 	void *acl_aclp;			/* the acl */
55c1cb2cd8Shaad };
56c1cb2cd8Shaad 
57c1cb2cd8Shaad #ifdef	__cplusplus
58c1cb2cd8Shaad }
59c1cb2cd8Shaad #endif
60c1cb2cd8Shaad 
61c1cb2cd8Shaad #endif /* _SYS_ACL_IMPL_H */
62