Changeset View
Changeset View
Standalone View
Standalone View
head/sys/security/mac/mac_framework.h
Show First 20 Lines • Show All 416 Lines • ▼ Show 20 Lines | |||||
int mac_vnode_check_link(struct ucred *cred, struct vnode *dvp, | int mac_vnode_check_link(struct ucred *cred, struct vnode *dvp, | ||||
struct vnode *vp, struct componentname *cnp); | struct vnode *vp, struct componentname *cnp); | ||||
int mac_vnode_check_listextattr(struct ucred *cred, struct vnode *vp, | int mac_vnode_check_listextattr(struct ucred *cred, struct vnode *vp, | ||||
int attrnamespace); | int attrnamespace); | ||||
int mac_vnode_check_lookup_impl(struct ucred *cred, struct vnode *dvp, | int mac_vnode_check_lookup_impl(struct ucred *cred, struct vnode *dvp, | ||||
struct componentname *cnp); | struct componentname *cnp); | ||||
extern bool mac_vnode_check_lookup_fp_flag; | extern bool mac_vnode_check_lookup_fp_flag; | ||||
#define mac_vnode_check_lookup_enabled() __predict_false(mac_vnode_check_lookup_fp_flag) | |||||
static inline int | static inline int | ||||
mac_vnode_check_lookup(struct ucred *cred, struct vnode *dvp, | mac_vnode_check_lookup(struct ucred *cred, struct vnode *dvp, | ||||
struct componentname *cnp) | struct componentname *cnp) | ||||
{ | { | ||||
mac_vnode_assert_locked(dvp, "mac_vnode_check_lookup"); | mac_vnode_assert_locked(dvp, "mac_vnode_check_lookup"); | ||||
if (__predict_false(mac_vnode_check_lookup_fp_flag)) | if (mac_vnode_check_lookup_enabled()) | ||||
return (mac_vnode_check_lookup_impl(cred, dvp, cnp)); | return (mac_vnode_check_lookup_impl(cred, dvp, cnp)); | ||||
return (0); | return (0); | ||||
} | } | ||||
int mac_vnode_check_mmap_impl(struct ucred *cred, struct vnode *vp, int prot, | int mac_vnode_check_mmap_impl(struct ucred *cred, struct vnode *vp, int prot, | ||||
int flags); | int flags); | ||||
extern bool mac_vnode_check_mmap_fp_flag; | extern bool mac_vnode_check_mmap_fp_flag; | ||||
static inline int | static inline int | ||||
▲ Show 20 Lines • Show All 127 Lines • Show Last 20 Lines |