OpenZFS 7004 - dmu_tx_hold_zap() does dnode_hold() 7x on same object
[zfs.git] / include / sys / policy.h
blob23d7d4db77f2b03c48a1a783eb5dce1ff7f8baf9
1 /*
2 * CDDL HEADER START
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.
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.
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]
19 * CDDL HEADER END
23 * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
24 * Copyright 2015, Joyent, Inc. All rights reserved.
25 * Copyright (c) 2016, Lawrence Livermore National Security, LLC.
28 #ifndef _SYS_POLICY_H
29 #define _SYS_POLICY_H
31 #ifdef _KERNEL
33 #include <sys/cred.h>
34 #include <sys/types.h>
35 #include <sys/xvattr.h>
36 #include <sys/zpl.h>
38 int secpolicy_nfs(const cred_t *);
39 int secpolicy_sys_config(const cred_t *, boolean_t);
40 int secpolicy_vnode_access2(const cred_t *, struct inode *,
41 uid_t, mode_t, mode_t);
42 int secpolicy_vnode_any_access(const cred_t *, struct inode *, uid_t);
43 int secpolicy_vnode_chown(const cred_t *, uid_t);
44 int secpolicy_vnode_create_gid(const cred_t *);
45 int secpolicy_vnode_remove(const cred_t *);
46 int secpolicy_vnode_setdac(const cred_t *, uid_t);
47 int secpolicy_vnode_setid_retain(const cred_t *, boolean_t);
48 int secpolicy_vnode_setids_setgids(const cred_t *, gid_t);
49 int secpolicy_zinject(const cred_t *);
50 int secpolicy_zfs(const cred_t *);
51 void secpolicy_setid_clear(vattr_t *, cred_t *);
52 int secpolicy_setid_setsticky_clear(struct inode *, vattr_t *,
53 const vattr_t *, cred_t *);
54 int secpolicy_xvattr(xvattr_t *, uid_t, cred_t *, vtype_t);
55 int secpolicy_vnode_setattr(cred_t *, struct inode *, struct vattr *,
56 const struct vattr *, int, int (void *, int, cred_t *), void *);
57 int secpolicy_basic_link(const cred_t *);
59 #endif /* _KERNEL */
60 #endif /* _SYS_POLICY_H */