summaryrefslogtreecommitdiffstats
path: root/sys/security/mac_test
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2008-10-28 11:33:06 +0000
committerrwatson <rwatson@FreeBSD.org>2008-10-28 11:33:06 +0000
commita2129bd144d95f5685e28f05aec7ce6f4efa6b04 (patch)
treec420c1b771a2ef873bf25185956726906057b6fe /sys/security/mac_test
parentbbf1e3cc5ba01988dfb88601dbd3cc26ea619ad5 (diff)
downloadFreeBSD-src-a2129bd144d95f5685e28f05aec7ce6f4efa6b04.zip
FreeBSD-src-a2129bd144d95f5685e28f05aec7ce6f4efa6b04.tar.gz
Rename three MAC entry points from _proc_ to _cred_ to reflect the fact
that they operate directly on credentials: mac_proc_create_swapper(), mac_proc_create_init(), and mac_proc_associate_nfsd(). Update policies. Obtained from: TrustedBSD Project
Diffstat (limited to 'sys/security/mac_test')
-rw-r--r--sys/security/mac_test/mac_test.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/sys/security/mac_test/mac_test.c b/sys/security/mac_test/mac_test.c
index 2cb5aa3..d727e1a 100644
--- a/sys/security/mac_test/mac_test.c
+++ b/sys/security/mac_test/mac_test.c
@@ -242,6 +242,24 @@ test_cred_copy_label(struct label *src, struct label *dest)
COUNTER_INC(cred_copy_label);
}
+COUNTER_DECL(cred_create_init);
+static void
+test_cred_create_init(struct ucred *cred)
+{
+
+ LABEL_CHECK(cred->cr_label, MAGIC_CRED);
+ COUNTER_INC(cred_create_init);
+}
+
+COUNTER_DECL(cred_create_swapper);
+static void
+test_cred_create_swapper(struct ucred *cred)
+{
+
+ LABEL_CHECK(cred->cr_label, MAGIC_CRED);
+ COUNTER_INC(cred_create_swapper);
+}
+
COUNTER_DECL(cred_destroy_label);
static void
test_cred_destroy_label(struct label *label)
@@ -1480,24 +1498,6 @@ test_proc_check_wait(struct ucred *cred, struct proc *p)
return (0);
}
-COUNTER_DECL(proc_create_init);
-static void
-test_proc_create_init(struct ucred *cred)
-{
-
- LABEL_CHECK(cred->cr_label, MAGIC_CRED);
- COUNTER_INC(proc_create_init);
-}
-
-COUNTER_DECL(proc_create_swapper);
-static void
-test_proc_create_swapper(struct ucred *cred)
-{
-
- LABEL_CHECK(cred->cr_label, MAGIC_CRED);
- COUNTER_INC(proc_create_swapper);
-}
-
COUNTER_DECL(proc_destroy_label);
static void
test_proc_destroy_label(struct label *label)
@@ -2883,6 +2883,8 @@ static struct mac_policy_ops test_ops =
.mpo_cred_check_relabel = test_cred_check_relabel,
.mpo_cred_check_visible = test_cred_check_visible,
.mpo_cred_copy_label = test_cred_copy_label,
+ .mpo_cred_create_init = test_cred_create_init,
+ .mpo_cred_create_swapper = test_cred_create_swapper,
.mpo_cred_destroy_label = test_cred_destroy_label,
.mpo_cred_externalize_label = test_cred_externalize_label,
.mpo_cred_init_label = test_cred_init_label,
@@ -3022,8 +3024,6 @@ static struct mac_policy_ops test_ops =
.mpo_proc_check_setuid = test_proc_check_setuid,
.mpo_proc_check_signal = test_proc_check_signal,
.mpo_proc_check_wait = test_proc_check_wait,
- .mpo_proc_create_init = test_proc_create_init,
- .mpo_proc_create_swapper = test_proc_create_swapper,
.mpo_proc_destroy_label = test_proc_destroy_label,
.mpo_proc_init_label = test_proc_init_label,
OpenPOWER on IntegriCloud