FreeBSD kernel kern code
|
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/module.h>
#include <sys/systm.h>
#include <sys/mount.h>
#include <sys/priv.h>
#include <sys/vnode.h>
#include <sys/errno.h>
#include <sys/stat.h>
#include <sys/sysctl.h>
#include <sys/acl.h>
Go to the source code of this file.
Functions | |
__FBSDID ("$FreeBSD$") | |
static void | acl_nfs4_trivial_from_mode (struct acl *aclp, mode_t mode) |
SYSCTL_INT (_vfs, OID_AUTO, acl_nfs4_old_semantics, CTLFLAG_RW, &acl_nfs4_old_semantics, 0, "Use pre-PSARC/2010/029 NFSv4 ACL semantics") | |
static int | _access_mask_from_accmode (accmode_t accmode) |
static int | _acl_denies (const struct acl *aclp, int access_mask, struct ucred *cred, int file_uid, int file_gid, int *denied_explicitly) |
int | vaccess_acl_nfs4 (enum vtype type, uid_t file_uid, gid_t file_gid, struct acl *aclp, accmode_t accmode, struct ucred *cred) |
static int | _acl_entry_matches (struct acl_entry *entry, acl_tag_t tag, acl_perm_t perm, acl_entry_type_t entry_type) |
static struct acl_entry * | _acl_append (struct acl *aclp, acl_tag_t tag, acl_perm_t perm, acl_entry_type_t entry_type) |
static struct acl_entry * | _acl_duplicate_entry (struct acl *aclp, unsigned entry_index) |
static void | acl_nfs4_sync_acl_from_mode_draft (struct acl *aclp, mode_t mode, int file_owner_id) |
void | acl_nfs4_sync_acl_from_mode (struct acl *aclp, mode_t mode, int file_owner_id) |
void | acl_nfs4_sync_mode_from_acl (mode_t *_mode, const struct acl *aclp) |
static void | acl_nfs4_compute_inherited_acl_draft (const struct acl *parent_aclp, struct acl *child_aclp, mode_t mode, int file_owner_id, int is_directory) |
static void | acl_nfs4_inherit_entries (const struct acl *parent_aclp, struct acl *child_aclp, mode_t mode, int file_owner_id, int is_directory) |
static void | acl_nfs4_compute_inherited_acl_psarc (const struct acl *parent_aclp, struct acl *aclp, mode_t mode, int file_owner_id, int is_directory) |
void | acl_nfs4_compute_inherited_acl (const struct acl *parent_aclp, struct acl *child_aclp, mode_t mode, int file_owner_id, int is_directory) |
static int | _acls_are_equal (const struct acl *a, const struct acl *b) |
int | acl_nfs4_is_trivial (const struct acl *aclp, int file_owner_id) |
int | acl_nfs4_check (const struct acl *aclp, int is_directory) |
static int | acl_nfs4_modload (module_t module, int what, void *arg) |
DECLARE_MODULE (acl_nfs4, acl_nfs4_mod, SI_SUB_VFS, SI_ORDER_FIRST) | |
MODULE_VERSION (acl_nfs4, 1) | |
Variables | |
static int | acl_nfs4_old_semantics = 0 |
struct { | |
accmode_t accmode | |
int mask | |
} | accmode2mask [] |
static moduledata_t | acl_nfs4_mod |
__FBSDID | ( | "$FreeBSD$" | ) |
|
static |
Definition at line 88 of file subr_acl_nfs4.c.
References accmode, and accmode2mask.
Referenced by vaccess_acl_nfs4().
|
static |
Definition at line 323 of file subr_acl_nfs4.c.
Referenced by acl_nfs4_compute_inherited_acl_psarc(), and acl_nfs4_sync_acl_from_mode_draft().
|
static |
Definition at line 111 of file subr_acl_nfs4.c.
References groupmember().
Referenced by vaccess_acl_nfs4().
|
static |
Definition at line 344 of file subr_acl_nfs4.c.
Referenced by acl_nfs4_compute_inherited_acl_draft(), and acl_nfs4_sync_acl_from_mode_draft().
|
static |
Definition at line 301 of file subr_acl_nfs4.c.
Referenced by acl_nfs4_sync_acl_from_mode_draft().
|
static |
Definition at line 1235 of file subr_acl_nfs4.c.
Referenced by acl_nfs4_is_trivial().
int acl_nfs4_check | ( | const struct acl * | aclp, |
int | is_directory | ||
) |
Definition at line 1305 of file subr_acl_nfs4.c.
void acl_nfs4_compute_inherited_acl | ( | const struct acl * | parent_aclp, |
struct acl * | child_aclp, | ||
mode_t | mode, | ||
int | file_owner_id, | ||
int | is_directory | ||
) |
Definition at line 1188 of file subr_acl_nfs4.c.
References acl_nfs4_compute_inherited_acl_draft(), acl_nfs4_compute_inherited_acl_psarc(), acl_nfs4_old_semantics, and mode.
|
static |
Definition at line 846 of file subr_acl_nfs4.c.
References _acl_duplicate_entry(), acl_nfs4_sync_acl_from_mode(), flags, and mode.
Referenced by acl_nfs4_compute_inherited_acl().
|
static |
Definition at line 1129 of file subr_acl_nfs4.c.
References _acl_append(), acl_nfs4_inherit_entries(), and mode.
Referenced by acl_nfs4_compute_inherited_acl(), and acl_nfs4_trivial_from_mode().
|
static |
Definition at line 1009 of file subr_acl_nfs4.c.
Referenced by acl_nfs4_compute_inherited_acl_psarc().
int acl_nfs4_is_trivial | ( | const struct acl * | aclp, |
int | file_owner_id | ||
) |
Definition at line 1263 of file subr_acl_nfs4.c.
References _acls_are_equal(), acl_alloc(), acl_free(), acl_nfs4_sync_acl_from_mode_draft(), acl_nfs4_sync_mode_from_acl(), and acl_nfs4_trivial_from_mode().
|
static |
Definition at line 1374 of file subr_acl_nfs4.c.
void acl_nfs4_sync_acl_from_mode | ( | struct acl * | aclp, |
mode_t | mode, | ||
int | file_owner_id | ||
) |
Definition at line 707 of file subr_acl_nfs4.c.
References acl_nfs4_old_semantics, acl_nfs4_sync_acl_from_mode_draft(), acl_nfs4_trivial_from_mode(), and mode.
Referenced by acl_nfs4_compute_inherited_acl_draft().
|
static |
Definition at line 360 of file subr_acl_nfs4.c.
References _acl_append(), _acl_duplicate_entry(), _acl_entry_matches(), amode, and mode.
Referenced by acl_nfs4_is_trivial(), and acl_nfs4_sync_acl_from_mode().
void acl_nfs4_sync_mode_from_acl | ( | mode_t * | _mode, |
const struct acl * | aclp | ||
) |
Definition at line 719 of file subr_acl_nfs4.c.
References mode.
Referenced by acl_nfs4_is_trivial(), and vaccess_acl_nfs4().
|
static |
Definition at line 1209 of file subr_acl_nfs4.c.
References acl_nfs4_compute_inherited_acl_psarc(), and mode.
Referenced by acl_nfs4_is_trivial(), and acl_nfs4_sync_acl_from_mode().
DECLARE_MODULE | ( | acl_nfs4 | , |
acl_nfs4_mod | , | ||
SI_SUB_VFS | , | ||
SI_ORDER_FIRST | |||
) |
MODULE_VERSION | ( | acl_nfs4 | , |
1 | |||
) |
SYSCTL_INT | ( | _vfs | , |
OID_AUTO | , | ||
acl_nfs4_old_semantics | , | ||
CTLFLAG_RW | , | ||
& | acl_nfs4_old_semantics, | ||
0 | , | ||
"Use pre-PSARC/2010/029 NFSv4 ACL semantics" | |||
) |
int vaccess_acl_nfs4 | ( | enum vtype | type, |
uid_t | file_uid, | ||
gid_t | file_gid, | ||
struct acl * | aclp, | ||
accmode_t | accmode, | ||
struct ucred * | cred | ||
) |
Definition at line 173 of file subr_acl_nfs4.c.
References _access_mask_from_accmode(), _acl_denies(), accmode, acl_nfs4_sync_mode_from_acl(), priv_check_cred(), and type.
accmode_t accmode |
Definition at line 69 of file subr_acl_nfs4.c.
Referenced by _access_mask_from_accmode(), extattr_check_cred(), kern_kmq_open(), shm_access(), vaccess(), vaccess_acl_nfs4(), vaccess_acl_posix1e(), vfs_unixify_accmode(), vn_access(), vn_open_vnode(), and vop_stdaccessx().
struct { ... } accmode2mask[] |
Referenced by _access_mask_from_accmode().
|
static |
Definition at line 1402 of file subr_acl_nfs4.c.
|
static |
Definition at line 63 of file subr_acl_nfs4.c.
Referenced by acl_nfs4_compute_inherited_acl(), and acl_nfs4_sync_acl_from_mode().
int mask |
Definition at line 70 of file subr_acl_nfs4.c.
Referenced by _cpuset_setthread(), _gtaskqueue_start_threads(), _taskqueue_start_threads(), at2cnpflags(), bitpos(), blist_stats(), blst_leaf_alloc(), blst_leaf_fill(), blst_leaf_free(), blst_meta_alloc(), cpuset_create(), cpuset_init(), cpuset_modify(), cpuset_setithread(), cpuset_setproc(), cpuset_setproc_maskthread(), cpuset_setproc_setthread(), cpuset_setproc_setthread_mask(), cpuset_setproc_test_maskthread(), cpuset_setproc_test_setthread(), cpuset_setthread(), cpuset_shadow(), cpuset_testshadow(), cpuset_testupdate(), cpuset_update(), fd_first_free(), generic_bitpos(), intr_getaffinity(), intr_setaffinity(), kern_cpuset_getaffinity(), kern_cpuset_getdomain(), kern_cpuset_setaffinity(), kern_cpuset_setdomain(), kern_sigsuspend(), ktls_work_thread(), ktr_tracepoint(), postsig_done(), runq_findbit_from(), sbm_clrprotoflags(), shm_mmap_large(), sys_sigsuspend(), sysctl_debug_ktr_entries(), sysctl_debug_ktr_mask(), taskqgroup_binder(), taskqueue_start_threads_cpuset(), and vfs_bio_clrbuf().