From 4cc20ab1f0f3d1126126327aa298ab88c974c53d Mon Sep 17 00:00:00 2001 From: Seigo Tanimura Date: Fri, 31 May 2002 11:52:35 +0000 Subject: Back out my lats commit of locking down a socket, it conflicts with hsu's work. Requested by: hsu --- sys/security/lomac/kernel_interface.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'sys/security/lomac/kernel_interface.c') 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: -- cgit v1.3