summaryrefslogtreecommitdiffstats
path: root/sys/security/mac_stub
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2006-11-06 13:45:45 +0000
committerrwatson <rwatson@FreeBSD.org>2006-11-06 13:45:45 +0000
commit13dc4f1b111e5d9cb42399807ff15d52a0b75793 (patch)
treec1cf28b34d955ff3457fe3034df2fa1a65d3d425 /sys/security/mac_stub
parent10d0d9cf473dc5f0ce1bf263ead445ffe7819154 (diff)
downloadFreeBSD-src-13dc4f1b111e5d9cb42399807ff15d52a0b75793.zip
FreeBSD-src-13dc4f1b111e5d9cb42399807ff15d52a0b75793.tar.gz
Add stub entry point implementations of mpo_priv_check and mpo_priv_grant to
the mac_stub policy. Obtained from: TrustedBSD Project
Diffstat (limited to 'sys/security/mac_stub')
-rw-r--r--sys/security/mac_stub/mac_stub.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/sys/security/mac_stub/mac_stub.c b/sys/security/mac_stub/mac_stub.c
index 36b10ea..a9c3b85 100644
--- a/sys/security/mac_stub/mac_stub.c
+++ b/sys/security/mac_stub/mac_stub.c
@@ -1362,6 +1362,20 @@ stub_check_vnode_write(struct ucred *active_cred,
return (0);
}
+static int
+stub_priv_check(struct ucred *cred, int priv)
+{
+
+ return (0);
+}
+
+static int
+stub_priv_grant(struct ucred *cred, int priv)
+{
+
+ return (EPERM);
+}
+
static struct mac_policy_ops mac_stub_ops =
{
.mpo_destroy = stub_destroy,
@@ -1575,6 +1589,8 @@ static struct mac_policy_ops mac_stub_ops =
.mpo_check_vnode_setutimes = stub_check_vnode_setutimes,
.mpo_check_vnode_stat = stub_check_vnode_stat,
.mpo_check_vnode_write = stub_check_vnode_write,
+ .mpo_priv_check = stub_priv_check,
+ .mpo_priv_grant = stub_priv_grant,
};
MAC_POLICY_SET(&mac_stub_ops, mac_stub, "TrustedBSD MAC/Stub",
OpenPOWER on IntegriCloud