From a2129bd144d95f5685e28f05aec7ce6f4efa6b04 Mon Sep 17 00:00:00 2001 From: rwatson Date: Tue, 28 Oct 2008 11:33:06 +0000 Subject: 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 --- sys/security/mac_test/mac_test.c | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'sys/security/mac_test') 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, -- cgit v1.1