1*8329232eSGordon Ross /*
2*8329232eSGordon Ross  * CDDL HEADER START
3*8329232eSGordon Ross  *
4*8329232eSGordon Ross  * The contents of this file are subject to the terms of the
5*8329232eSGordon Ross  * Common Development and Distribution License (the "License").
6*8329232eSGordon Ross  * You may not use this file except in compliance with the License.
7*8329232eSGordon Ross  *
8*8329232eSGordon Ross  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*8329232eSGordon Ross  * or http://www.opensolaris.org/os/licensing.
10*8329232eSGordon Ross  * See the License for the specific language governing permissions
11*8329232eSGordon Ross  * and limitations under the License.
12*8329232eSGordon Ross  *
13*8329232eSGordon Ross  * When distributing Covered Code, include this CDDL HEADER in each
14*8329232eSGordon Ross  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*8329232eSGordon Ross  * If applicable, add the following below this CDDL HEADER, with the
16*8329232eSGordon Ross  * fields enclosed by brackets "[]" replaced with your own identifying
17*8329232eSGordon Ross  * information: Portions Copyright [yyyy] [name of copyright owner]
18*8329232eSGordon Ross  *
19*8329232eSGordon Ross  * CDDL HEADER END
20*8329232eSGordon Ross  */
21*8329232eSGordon Ross /*
22*8329232eSGordon Ross  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
23*8329232eSGordon Ross  * Copyright 2015, Joyent, Inc. All rights reserved.
24*8329232eSGordon Ross  * Copyright 2017 Nexenta Systems, Inc.  All rights reserved.
25*8329232eSGordon Ross  */
26*8329232eSGordon Ross 
27*8329232eSGordon Ross #ifndef	_SYS_POLICY_H
28*8329232eSGordon Ross #define	_SYS_POLICY_H
29*8329232eSGordon Ross 
30*8329232eSGordon Ross #include <sys/types.h>
31*8329232eSGordon Ross #include <sys/cred.h>
32*8329232eSGordon Ross #include <sys/vnode.h>
33*8329232eSGordon Ross #include <sys/fs/snode.h>
34*8329232eSGordon Ross 
35*8329232eSGordon Ross #ifdef	__cplusplus
36*8329232eSGordon Ross extern "C" {
37*8329232eSGordon Ross #endif
38*8329232eSGordon Ross 
39*8329232eSGordon Ross int secpolicy_fs_allowed_mount(const char *);
40*8329232eSGordon Ross int secpolicy_vnode_owner(const cred_t *, uid_t);
41*8329232eSGordon Ross int secpolicy_vnode_access2(const cred_t *, vnode_t *, uid_t, mode_t, mode_t);
42*8329232eSGordon Ross int secpolicy_vnode_setattr(cred_t *, struct vnode *, struct vattr *,
43*8329232eSGordon Ross     const struct vattr *, int, int (void *, int, cred_t *), void *);
44*8329232eSGordon Ross int secpolicy_vnode_setdac(const cred_t *, uid_t);
45*8329232eSGordon Ross 
46*8329232eSGordon Ross #ifdef	__cplusplus
47*8329232eSGordon Ross }
48*8329232eSGordon Ross #endif
49*8329232eSGordon Ross 
50*8329232eSGordon Ross #endif	/* _SYS_POLICY_H */
51