summaryrefslogtreecommitdiffstats
path: root/sys/security/mac_portacl
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2007-10-24 19:04:04 +0000
committerrwatson <rwatson@FreeBSD.org>2007-10-24 19:04:04 +0000
commit60570a92bf794d255e5f8ed235b49c553776ad92 (patch)
treefea282db79628eed98808fd38cc46445b2f97ca5 /sys/security/mac_portacl
parent7781c2181af1113baab38322a55a90b5469cba03 (diff)
downloadFreeBSD-src-60570a92bf794d255e5f8ed235b49c553776ad92.zip
FreeBSD-src-60570a92bf794d255e5f8ed235b49c553776ad92.tar.gz
Merge first in a series of TrustedBSD MAC Framework KPI changes
from Mac OS X Leopard--rationalize naming for entry points to the following general forms: mac_<object>_<method/action> mac_<object>_check_<method/action> The previous naming scheme was inconsistent and mostly reversed from the new scheme. Also, make object types more consistent and remove spaces from object types that contain multiple parts ("posix_sem" -> "posixsem") to make mechanical parsing easier. Introduce a new "netinet" object type for certain IPv4/IPv6-related methods. Also simplify, slightly, some entry point names. All MAC policy modules will need to be recompiled, and modules not updates as part of this commit will need to be modified to conform to the new KPI. Sponsored by: SPARTA (original patches against Mac OS X) Obtained from: TrustedBSD Project, Apple Computer
Diffstat (limited to 'sys/security/mac_portacl')
-rw-r--r--sys/security/mac_portacl/mac_portacl.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/security/mac_portacl/mac_portacl.c b/sys/security/mac_portacl/mac_portacl.c
index 633f606..0d4428d 100644
--- a/sys/security/mac_portacl/mac_portacl.c
+++ b/sys/security/mac_portacl/mac_portacl.c
@@ -1,5 +1,6 @@
/*-
* Copyright (c) 2003-2004 Networks Associates Technology, Inc.
+ * Copyright (c) 2006 SPARTA, Inc.
* All rights reserved.
*
* This software was developed for the FreeBSD Project by Network
@@ -7,6 +8,9 @@
* Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"),
* as part of the DARPA CHATS research program.
*
+ * This software was enhanced by SPARTA ISSO under SPAWAR contract
+ * N66001-04-C-6019 ("SEFOS").
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -430,7 +434,7 @@ rules_check(struct ucred *cred, int family, int type, u_int16_t port)
* the source port is left up to the IP stack to determine automatically.
*/
static int
-check_socket_bind(struct ucred *cred, struct socket *so,
+socket_check_bind(struct ucred *cred, struct socket *so,
struct label *solabel, struct sockaddr *sa)
{
struct sockaddr_in *sin;
@@ -482,7 +486,7 @@ static struct mac_policy_ops mac_portacl_ops =
{
.mpo_destroy = destroy,
.mpo_init = init,
- .mpo_check_socket_bind = check_socket_bind,
+ .mpo_socket_check_bind = socket_check_bind,
};
MAC_POLICY_SET(&mac_portacl_ops, trustedbsd_mac_portacl,
OpenPOWER on IntegriCloud