summaryrefslogtreecommitdiffstats
path: root/sys/security/mac_partition
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_partition
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_partition')
-rw-r--r--sys/security/mac_partition/mac_partition.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/sys/security/mac_partition/mac_partition.c b/sys/security/mac_partition/mac_partition.c
index 425a188..7eca1f9 100644
--- a/sys/security/mac_partition/mac_partition.c
+++ b/sys/security/mac_partition/mac_partition.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1999-2002, 2007 Robert N. M. Watson
+ * Copyright (c) 1999-2002, 2007-2008 Robert N. M. Watson
* Copyright (c) 2001-2002 Networks Associates Technology, Inc.
* Copyright (c) 2006 SPARTA, Inc.
* Copyright (c) 2008 Apple Inc.
@@ -155,6 +155,20 @@ partition_cred_copy_label(struct label *src, struct label *dest)
}
static void
+partition_cred_create_init(struct ucred *cred)
+{
+
+ SLOT_SET(cred->cr_label, 0);
+}
+
+static void
+partition_cred_create_swapper(struct ucred *cred)
+{
+
+ SLOT_SET(cred->cr_label, 0);
+}
+
+static void
partition_cred_destroy_label(struct label *label)
{
@@ -251,20 +265,6 @@ partition_proc_check_signal(struct ucred *cred, struct proc *p,
return (error ? ESRCH : 0);
}
-static void
-partition_proc_create_init(struct ucred *cred)
-{
-
- SLOT_SET(cred->cr_label, 0);
-}
-
-static void
-partition_proc_create_swapper(struct ucred *cred)
-{
-
- SLOT_SET(cred->cr_label, 0);
-}
-
static int
partition_socket_check_visible(struct ucred *cred, struct socket *so,
struct label *solabel)
@@ -300,6 +300,8 @@ static struct mac_policy_ops partition_ops =
.mpo_cred_check_relabel = partition_cred_check_relabel,
.mpo_cred_check_visible = partition_cred_check_visible,
.mpo_cred_copy_label = partition_cred_copy_label,
+ .mpo_cred_create_init = partition_cred_create_init,
+ .mpo_cred_create_swapper = partition_cred_create_swapper,
.mpo_cred_destroy_label = partition_cred_destroy_label,
.mpo_cred_externalize_label = partition_cred_externalize_label,
.mpo_cred_init_label = partition_cred_init_label,
@@ -309,8 +311,6 @@ static struct mac_policy_ops partition_ops =
.mpo_proc_check_debug = partition_proc_check_debug,
.mpo_proc_check_sched = partition_proc_check_sched,
.mpo_proc_check_signal = partition_proc_check_signal,
- .mpo_proc_create_init = partition_proc_create_init,
- .mpo_proc_create_swapper = partition_proc_create_swapper,
.mpo_socket_check_visible = partition_socket_check_visible,
.mpo_vnode_check_exec = partition_vnode_check_exec,
};
OpenPOWER on IntegriCloud