diff options
author | rwatson <rwatson@FreeBSD.org> | 2003-10-25 15:28:20 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2003-10-25 15:28:20 +0000 |
commit | 2e83725f4a390d62e44488987ceae30617d39f03 (patch) | |
tree | 689128a35013112f2e1a02fafd158a5ad5cc11a9 /sys | |
parent | e7ca1c45525f573e36727f7c4626f584f01c2427 (diff) | |
download | FreeBSD-src-2e83725f4a390d62e44488987ceae30617d39f03.zip FreeBSD-src-2e83725f4a390d62e44488987ceae30617d39f03.tar.gz |
Make MAC_EXTERNALIZE() and MAC_INTERNALIZE() simply take the object
type, rather than "object_label" as the first argument. This reduces
complexity a little for the consumer, and also makes it easier for
use to rename the underlying entry points in struct mac_policy_obj.
Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories
Diffstat (limited to 'sys')
-rw-r--r-- | sys/security/mac/mac_internal.h | 8 | ||||
-rw-r--r-- | sys/security/mac/mac_net.c | 10 | ||||
-rw-r--r-- | sys/security/mac/mac_pipe.c | 4 | ||||
-rw-r--r-- | sys/security/mac/mac_process.c | 4 | ||||
-rw-r--r-- | sys/security/mac/mac_vfs.c | 4 |
5 files changed, 15 insertions, 15 deletions
diff --git a/sys/security/mac/mac_internal.h b/sys/security/mac/mac_internal.h index da10550..7e8e483 100644 --- a/sys/security/mac/mac_internal.h +++ b/sys/security/mac/mac_internal.h @@ -202,8 +202,8 @@ int vn_setlabel(struct vnode *vp, struct label *intlabel, break; \ } \ claimed = 0; \ - MAC_CHECK(externalize_ ## type, label, element_name, \ - &sb, &claimed); \ + MAC_CHECK(externalize_ ## type ## _label, label, \ + element_name, &sb, &claimed); \ if (error) \ break; \ if (claimed == 0 && ignorenotfound) { \ @@ -233,8 +233,8 @@ int vn_setlabel(struct vnode *vp, struct label *intlabel, break; \ } \ claimed = 0; \ - MAC_CHECK(internalize_ ## type, label, element_name, \ - element_data, &claimed); \ + MAC_CHECK(internalize_ ## type ## _label, label, \ + element_name, element_data, &claimed); \ if (error) \ break; \ if (claimed != 1) { \ diff --git a/sys/security/mac/mac_net.c b/sys/security/mac/mac_net.c index 143d182..27dc353 100644 --- a/sys/security/mac/mac_net.c +++ b/sys/security/mac/mac_net.c @@ -337,7 +337,7 @@ mac_externalize_ifnet_label(struct label *label, char *elements, { int error; - MAC_EXTERNALIZE(ifnet_label, label, elements, outbuf, outbuflen); + MAC_EXTERNALIZE(ifnet, label, elements, outbuf, outbuflen); return (error); } @@ -348,7 +348,7 @@ mac_externalize_socket_label(struct label *label, char *elements, { int error; - MAC_EXTERNALIZE(socket_label, label, elements, outbuf, outbuflen); + MAC_EXTERNALIZE(socket, label, elements, outbuf, outbuflen); return (error); } @@ -359,7 +359,7 @@ mac_externalize_socket_peer_label(struct label *label, char *elements, { int error; - MAC_EXTERNALIZE(socket_peer_label, label, elements, outbuf, outbuflen); + MAC_EXTERNALIZE(socket_peer, label, elements, outbuf, outbuflen); return (error); } @@ -369,7 +369,7 @@ mac_internalize_ifnet_label(struct label *label, char *string) { int error; - MAC_INTERNALIZE(ifnet_label, label, string); + MAC_INTERNALIZE(ifnet, label, string); return (error); } @@ -379,7 +379,7 @@ mac_internalize_socket_label(struct label *label, char *string) { int error; - MAC_INTERNALIZE(socket_label, label, string); + MAC_INTERNALIZE(socket, label, string); return (error); } diff --git a/sys/security/mac/mac_pipe.c b/sys/security/mac/mac_pipe.c index cf54384..6c865b4 100644 --- a/sys/security/mac/mac_pipe.c +++ b/sys/security/mac/mac_pipe.c @@ -113,7 +113,7 @@ mac_externalize_pipe_label(struct label *label, char *elements, { int error; - MAC_EXTERNALIZE(pipe_label, label, elements, outbuf, outbuflen); + MAC_EXTERNALIZE(pipe, label, elements, outbuf, outbuflen); return (error); } @@ -123,7 +123,7 @@ mac_internalize_pipe_label(struct label *label, char *string) { int error; - MAC_INTERNALIZE(pipe_label, label, string); + MAC_INTERNALIZE(pipe, label, string); return (error); } diff --git a/sys/security/mac/mac_process.c b/sys/security/mac/mac_process.c index 1613b41..00c45f8 100644 --- a/sys/security/mac/mac_process.c +++ b/sys/security/mac/mac_process.c @@ -152,7 +152,7 @@ mac_externalize_cred_label(struct label *label, char *elements, { int error; - MAC_EXTERNALIZE(cred_label, label, elements, outbuf, outbuflen); + MAC_EXTERNALIZE(cred, label, elements, outbuf, outbuflen); return (error); } @@ -162,7 +162,7 @@ mac_internalize_cred_label(struct label *label, char *string) { int error; - MAC_INTERNALIZE(cred_label, label, string); + MAC_INTERNALIZE(cred, label, string); return (error); } diff --git a/sys/security/mac/mac_vfs.c b/sys/security/mac/mac_vfs.c index f8daea3..2131d99 100644 --- a/sys/security/mac/mac_vfs.c +++ b/sys/security/mac/mac_vfs.c @@ -185,7 +185,7 @@ mac_externalize_vnode_label(struct label *label, char *elements, { int error; - MAC_EXTERNALIZE(vnode_label, label, elements, outbuf, outbuflen); + MAC_EXTERNALIZE(vnode, label, elements, outbuf, outbuflen); return (error); } @@ -195,7 +195,7 @@ mac_internalize_vnode_label(struct label *label, char *string) { int error; - MAC_INTERNALIZE(vnode_label, label, string); + MAC_INTERNALIZE(vnode, label, string); return (error); } |