diff options
Diffstat (limited to 'sys/security/mac_bsdextended')
-rw-r--r-- | sys/security/mac_bsdextended/ugidfw_internal.h | 4 | ||||
-rw-r--r-- | sys/security/mac_bsdextended/ugidfw_vnode.c | 16 |
2 files changed, 14 insertions, 6 deletions
diff --git a/sys/security/mac_bsdextended/ugidfw_internal.h b/sys/security/mac_bsdextended/ugidfw_internal.h index e85f303..6e979cf 100644 --- a/sys/security/mac_bsdextended/ugidfw_internal.h +++ b/sys/security/mac_bsdextended/ugidfw_internal.h @@ -52,7 +52,7 @@ int ugidfw_system_check_swapon(struct ucred *cred, struct vnode *vp, * Vnode access control checks. */ int ugidfw_vnode_check_access(struct ucred *cred, struct vnode *vp, - struct label *vplabel, int acc_mode); + struct label *vplabel, accmode_t accmode); int ugidfw_vnode_check_chdir(struct ucred *cred, struct vnode *dvp, struct label *dvplabel); int ugidfw_vnode_check_chroot(struct ucred *cred, struct vnode *dvp, @@ -81,7 +81,7 @@ int ugidfw_vnode_check_listextattr(struct ucred *cred, struct vnode *vp, int ugidfw_vnode_check_lookup(struct ucred *cred, struct vnode *dvp, struct label *dvplabel, struct componentname *cnp); int ugidfw_vnode_check_open(struct ucred *cred, struct vnode *vp, - struct label *vplabel, int acc_mode); + struct label *vplabel, accmode_t accmode); int ugidfw_vnode_check_readdir(struct ucred *cred, struct vnode *dvp, struct label *dvplabel); int ugidfw_vnode_check_readdlink(struct ucred *cred, struct vnode *vp, diff --git a/sys/security/mac_bsdextended/ugidfw_vnode.c b/sys/security/mac_bsdextended/ugidfw_vnode.c index 5953078..3d760bc 100644 --- a/sys/security/mac_bsdextended/ugidfw_vnode.c +++ b/sys/security/mac_bsdextended/ugidfw_vnode.c @@ -62,10 +62,14 @@ int ugidfw_vnode_check_access(struct ucred *cred, struct vnode *vp, - struct label *vplabel, int acc_mode) + struct label *vplabel, accmode_t accmode) { - return (ugidfw_check_vp(cred, vp, acc_mode)); + /* + * XXX: We pass accmode_t variable containing V* constants + * as an int containing MBI_* constants. + */ + return (ugidfw_check_vp(cred, vp, (int)accmode)); } int @@ -168,10 +172,14 @@ ugidfw_vnode_check_lookup(struct ucred *cred, struct vnode *dvp, int ugidfw_vnode_check_open(struct ucred *cred, struct vnode *vp, - struct label *vplabel, int acc_mode) + struct label *vplabel, accmode_t accmode) { - return (ugidfw_check_vp(cred, vp, acc_mode)); + /* + * XXX: We pass accmode_t variable containing V* constants + * as an int containing MBI_* constants. + */ + return (ugidfw_check_vp(cred, vp, (int)accmode)); } int |