Add ability to scrub from last scrubbed txg
[zfs.git] / include / os / linux / zfs / sys / policy.h
blob0c265db78591c6e9539ab83ce7c4d79df49b71b1
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 https://opensource.org/licenses/CDDL-1.0.
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 struct znode;
40 int secpolicy_nfs(const cred_t *);
41 int secpolicy_sys_config(const cred_t *, boolean_t);
42 int secpolicy_vnode_access2(const cred_t *, struct inode *,
43 uid_t, mode_t, mode_t);
44 int secpolicy_vnode_any_access(const cred_t *, struct inode *, uid_t);
45 int secpolicy_vnode_chown(const cred_t *, uid_t);
46 int secpolicy_vnode_create_gid(const cred_t *);
47 int secpolicy_vnode_remove(const cred_t *);
48 int secpolicy_vnode_setdac(const cred_t *, uid_t);
49 int secpolicy_vnode_setid_retain(struct znode *, const cred_t *, boolean_t);
50 int secpolicy_vnode_setids_setgids(const cred_t *, gid_t, zidmap_t *,
51 struct user_namespace *);
52 int secpolicy_zinject(const cred_t *);
53 int secpolicy_zfs(const cred_t *);
54 int secpolicy_zfs_proc(const cred_t *, proc_t *);
55 void secpolicy_setid_clear(vattr_t *, cred_t *);
56 int secpolicy_setid_setsticky_clear(struct inode *, vattr_t *,
57 const vattr_t *, cred_t *, zidmap_t *, struct user_namespace *);
58 int secpolicy_xvattr(xvattr_t *, uid_t, cred_t *, mode_t);
59 int secpolicy_vnode_setattr(cred_t *, struct inode *, struct vattr *,
60 const struct vattr *, int, int (void *, int, cred_t *), void *);
61 int secpolicy_basic_link(const cred_t *);
63 #endif /* _KERNEL */
64 #endif /* _SYS_POLICY_H */