diff options
author | rwatson <rwatson@FreeBSD.org> | 2002-10-29 19:57:28 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2002-10-29 19:57:28 +0000 |
commit | 4db30046bd2cbd7599b5d60bd5f879972ac1f2b1 (patch) | |
tree | af6ebaf55c9af4c8f1a10681e8212aa1d6602e7d /sys | |
parent | 6c3898d0fcf0bb660ed6f58721b1eae2fc2115a8 (diff) | |
download | FreeBSD-src-4db30046bd2cbd7599b5d60bd5f879972ac1f2b1.zip FreeBSD-src-4db30046bd2cbd7599b5d60bd5f879972ac1f2b1.tar.gz |
Hook up no-op stubs for reboot, swapon, sysctl entry points.
Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories
Diffstat (limited to 'sys')
-rw-r--r-- | sys/security/mac_none/mac_none.c | 29 | ||||
-rw-r--r-- | sys/security/mac_stub/mac_stub.c | 29 |
2 files changed, 58 insertions, 0 deletions
diff --git a/sys/security/mac_none/mac_none.c b/sys/security/mac_none/mac_none.c index 913fba2..4bcf21f 100644 --- a/sys/security/mac_none/mac_none.c +++ b/sys/security/mac_none/mac_none.c @@ -617,6 +617,29 @@ mac_none_check_socket_visible(struct ucred *cred, struct socket *socket, } static int +mac_none_check_system_reboot(struct ucred *cred, int how) +{ + + return (0); +} + +static int +mac_none_check_system_swapon(struct ucred *cred, struct vnode *vp, + struct label *label) +{ + + return (0); +} + +static int +mac_none_check_system_sysctl(struct ucred *cred, int *name, u_int namelen, + void *old, size_t *oldlenp, int inkernel, void *new, size_t newlen) +{ + + return (0); +} + +static int mac_none_check_vnode_access(struct ucred *cred, struct vnode *vp, struct label *label, mode_t flags) { @@ -1064,6 +1087,12 @@ static struct mac_policy_op_entry mac_none_ops[] = (macop_t)mac_none_check_socket_relabel }, { MAC_CHECK_SOCKET_VISIBLE, (macop_t)mac_none_check_socket_visible }, + { MAC_CHECK_SYSTEM_REBOOT, + (macop_t)mac_none_check_system_reboot }, + { MAC_CHECK_SYSTEM_SWAPON, + (macop_t)mac_none_check_system_swapon }, + { MAC_CHECK_SYSTEM_SYSCTL, + (macop_t)mac_none_check_system_sysctl }, { MAC_CHECK_VNODE_ACCESS, (macop_t)mac_none_check_vnode_access }, { MAC_CHECK_VNODE_CHDIR, diff --git a/sys/security/mac_stub/mac_stub.c b/sys/security/mac_stub/mac_stub.c index 913fba2..4bcf21f 100644 --- a/sys/security/mac_stub/mac_stub.c +++ b/sys/security/mac_stub/mac_stub.c @@ -617,6 +617,29 @@ mac_none_check_socket_visible(struct ucred *cred, struct socket *socket, } static int +mac_none_check_system_reboot(struct ucred *cred, int how) +{ + + return (0); +} + +static int +mac_none_check_system_swapon(struct ucred *cred, struct vnode *vp, + struct label *label) +{ + + return (0); +} + +static int +mac_none_check_system_sysctl(struct ucred *cred, int *name, u_int namelen, + void *old, size_t *oldlenp, int inkernel, void *new, size_t newlen) +{ + + return (0); +} + +static int mac_none_check_vnode_access(struct ucred *cred, struct vnode *vp, struct label *label, mode_t flags) { @@ -1064,6 +1087,12 @@ static struct mac_policy_op_entry mac_none_ops[] = (macop_t)mac_none_check_socket_relabel }, { MAC_CHECK_SOCKET_VISIBLE, (macop_t)mac_none_check_socket_visible }, + { MAC_CHECK_SYSTEM_REBOOT, + (macop_t)mac_none_check_system_reboot }, + { MAC_CHECK_SYSTEM_SWAPON, + (macop_t)mac_none_check_system_swapon }, + { MAC_CHECK_SYSTEM_SYSCTL, + (macop_t)mac_none_check_system_sysctl }, { MAC_CHECK_VNODE_ACCESS, (macop_t)mac_none_check_vnode_access }, { MAC_CHECK_VNODE_CHDIR, |