xref: /titanic_51/usr/src/common/zfs/zfs_deleg.h (revision ecd6cf800b63704be73fb264c3f5b6e0dafc068d)
1*ecd6cf80Smarks /*
2*ecd6cf80Smarks  * CDDL HEADER START
3*ecd6cf80Smarks  *
4*ecd6cf80Smarks  * The contents of this file are subject to the terms of the
5*ecd6cf80Smarks  * Common Development and Distribution License (the "License").
6*ecd6cf80Smarks  * You may not use this file except in compliance with the License.
7*ecd6cf80Smarks  *
8*ecd6cf80Smarks  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*ecd6cf80Smarks  * or http://www.opensolaris.org/os/licensing.
10*ecd6cf80Smarks  * See the License for the specific language governing permissions
11*ecd6cf80Smarks  * and limitations under the License.
12*ecd6cf80Smarks  *
13*ecd6cf80Smarks  * When distributing Covered Code, include this CDDL HEADER in each
14*ecd6cf80Smarks  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*ecd6cf80Smarks  * If applicable, add the following below this CDDL HEADER, with the
16*ecd6cf80Smarks  * fields enclosed by brackets "[]" replaced with your own identifying
17*ecd6cf80Smarks  * information: Portions Copyright [yyyy] [name of copyright owner]
18*ecd6cf80Smarks  *
19*ecd6cf80Smarks  * CDDL HEADER END
20*ecd6cf80Smarks  */
21*ecd6cf80Smarks /*
22*ecd6cf80Smarks  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
23*ecd6cf80Smarks  * Use is subject to license terms.
24*ecd6cf80Smarks  */
25*ecd6cf80Smarks 
26*ecd6cf80Smarks #ifndef	_ZFS_DELEG_H
27*ecd6cf80Smarks #define	_ZFS_DELEG_H
28*ecd6cf80Smarks 
29*ecd6cf80Smarks #pragma ident	"%Z%%M%	%I%	%E% SMI"
30*ecd6cf80Smarks 
31*ecd6cf80Smarks #include <sys/fs/zfs.h>
32*ecd6cf80Smarks 
33*ecd6cf80Smarks #ifdef	__cplusplus
34*ecd6cf80Smarks extern "C" {
35*ecd6cf80Smarks #endif
36*ecd6cf80Smarks 
37*ecd6cf80Smarks #define	ZFS_DELEG_SET_NAME_CHR		'@'		/* set name lead char */
38*ecd6cf80Smarks #define	ZFS_DELEG_FIELD_SEP_CHR		'$'		/* field separator */
39*ecd6cf80Smarks 
40*ecd6cf80Smarks /*
41*ecd6cf80Smarks  * Max name length for a delegation attribute
42*ecd6cf80Smarks  */
43*ecd6cf80Smarks #define	ZFS_MAX_DELEG_NAME	128
44*ecd6cf80Smarks 
45*ecd6cf80Smarks #define	ZFS_DELEG_LOCAL		'l'
46*ecd6cf80Smarks #define	ZFS_DELEG_DESCENDENT	'd'
47*ecd6cf80Smarks #define	ZFS_DELEG_NA		'-'
48*ecd6cf80Smarks 
49*ecd6cf80Smarks extern char *zfs_deleg_perm_tab[];
50*ecd6cf80Smarks int zfs_deleg_type(char *attr);
51*ecd6cf80Smarks 
52*ecd6cf80Smarks int zfs_deleg_verify_nvlist(nvlist_t *nvlist);
53*ecd6cf80Smarks void zfs_deleg_whokey(char *attr, char type,
54*ecd6cf80Smarks     char checkflag, void *data);
55*ecd6cf80Smarks 
56*ecd6cf80Smarks #ifdef	__cplusplus
57*ecd6cf80Smarks }
58*ecd6cf80Smarks #endif
59*ecd6cf80Smarks 
60*ecd6cf80Smarks #endif	/* _ZFS_DELEG_H */
61