aboutsummaryrefslogtreecommitdiff
path: root/sys/security/lomac/kernel_interface.c
diff options
context:
space:
mode:
authorSeigo Tanimura <tanimura@FreeBSD.org>2002-05-31 11:52:35 +0000
committerSeigo Tanimura <tanimura@FreeBSD.org>2002-05-31 11:52:35 +0000
commit4cc20ab1f0f3d1126126327aa298ab88c974c53d (patch)
tree9d5f24794525313566896ab89aa860515db344a6 /sys/security/lomac/kernel_interface.c
parentc82593cf2c9a5b4ccd2be043f6c9ccc8af22fcc9 (diff)
Notes
Diffstat (limited to 'sys/security/lomac/kernel_interface.c')
-rw-r--r--sys/security/lomac/kernel_interface.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/sys/security/lomac/kernel_interface.c b/sys/security/lomac/kernel_interface.c
index 9093ff3a9656f..adaff99f86ced 100644
--- a/sys/security/lomac/kernel_interface.c
+++ b/sys/security/lomac/kernel_interface.c
@@ -413,15 +413,10 @@ set_object_lattr(lomac_object_t *obj, lattr_t lattr) {
case LO_TYPE_SOCKETPAIR:
socket = obj->lo_object.socket;
/* KASSERT that socket peer levels are synchronized */
- if (lattr.level == LOMAC_HIGHEST_LEVEL) {
- SOCK_LOCK(socket);
+ if (lattr.level == LOMAC_HIGHEST_LEVEL)
socket->so_state &= ~SOCKET_LEVEL_LOWEST;
- SOCK_UNLOCK(socket);
- } else {
- SOCK_LOCK(socket);
+ else
socket->so_state |= SOCKET_LEVEL_LOWEST;
- SOCK_UNLOCK(socket);
- }
#ifdef NOT_YET
pipe = pipe->pipe_peer;
if (pipe != NULL) {
@@ -479,10 +474,8 @@ get_object_lattr(const lomac_object_t *obj, lattr_t *lattr) {
break;
case LO_TYPE_SOCKETPAIR:
socket = obj->lo_object.socket;
- SOCK_LOCK(socket);
lattr->level = (socket->so_state & SOCKET_LEVEL_LOWEST) ?
LOMAC_LOWEST_LEVEL : LOMAC_HIGHEST_LEVEL;
- SOCK_UNLOCK(socket);
lattr->flags = 0;
break;
default: