4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21 /*
22 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
24 */
25
26 #ifndef _ACLUTILS_H
27 #define _ACLUTILS_H
28
29 #include <sys/types.h>
30 #include <sys/acl.h>
31 #include <strings.h>
32 #include <locale.h>
33 #include <ctype.h>
34 #include <grp.h>
35 #include <pwd.h>
36
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40
41 #define ACL_REMOVE_ALL 0x0
42 #define ACL_REMOVE_FIRST 0x1
43
123 extern int aclent_entry_type(int type, int owning, int *ret);
124 extern int ace_perm_mask(struct acl_perm_type *, uint32_t *mask);
125 extern int compute_aclent_perms(char *str, o_mode_t *mask);
126 extern int compute_ace_inherit(char *str, uint32_t *imask);
127 extern int acl_addentries(acl_t *, acl_t *, int);
128 extern int acl_removeentries(acl_t *, acl_t *, int, int);
129 extern int acl_modifyentries(acl_t *, acl_t *, int);
130 extern void acl_printacl(acl_t *, int, int);
131 extern char *acl_strerror(int);
132 extern acl_t *acl_dup(acl_t *);
133 extern int acl_type(acl_t *);
134 extern int acl_cnt(acl_t *);
135 extern int acl_flags(acl_t *);
136 extern void *acl_data(acl_t *);
137 extern void acl_error(const char *, ...);
138 extern int acl_parse(const char *, acl_t **);
139 extern int yyparse(void);
140 extern void yyreset(void);
141 extern void yycleanup(void);
142 extern acl_t *acl_to_aclp(enum acl_type, void *, int);
143 extern int sid_to_id(char *, boolean_t, uid_t *);
144
145 #ifdef __cplusplus
146 }
147 #endif
148
149 #endif /* _ACLUTILS_H */
|
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21 /*
22 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
24 *
25 * Copyright 2016 Nexenta Systems, Inc. All rights reserved.
26 */
27
28 #ifndef _ACLUTILS_H
29 #define _ACLUTILS_H
30
31 #include <sys/types.h>
32 #include <sys/acl.h>
33 #include <strings.h>
34 #include <locale.h>
35 #include <ctype.h>
36 #include <grp.h>
37 #include <pwd.h>
38
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42
43 #define ACL_REMOVE_ALL 0x0
44 #define ACL_REMOVE_FIRST 0x1
45
125 extern int aclent_entry_type(int type, int owning, int *ret);
126 extern int ace_perm_mask(struct acl_perm_type *, uint32_t *mask);
127 extern int compute_aclent_perms(char *str, o_mode_t *mask);
128 extern int compute_ace_inherit(char *str, uint32_t *imask);
129 extern int acl_addentries(acl_t *, acl_t *, int);
130 extern int acl_removeentries(acl_t *, acl_t *, int, int);
131 extern int acl_modifyentries(acl_t *, acl_t *, int);
132 extern void acl_printacl(acl_t *, int, int);
133 extern char *acl_strerror(int);
134 extern acl_t *acl_dup(acl_t *);
135 extern int acl_type(acl_t *);
136 extern int acl_cnt(acl_t *);
137 extern int acl_flags(acl_t *);
138 extern void *acl_data(acl_t *);
139 extern void acl_error(const char *, ...);
140 extern int acl_parse(const char *, acl_t **);
141 extern int yyparse(void);
142 extern void yyreset(void);
143 extern void yycleanup(void);
144 extern acl_t *acl_to_aclp(enum acl_type, void *, int);
145 extern int sid_string_by_id(uid_t, boolean_t, char **, boolean_t);
146 extern int sid_to_id(char *, boolean_t, uid_t *);
147
148 #ifdef __cplusplus
149 }
150 #endif
151
152 #endif /* _ACLUTILS_H */
|