From owner-p4-projects@FreeBSD.ORG Fri Jan 27 15:29:08 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9221A16A423; Fri, 27 Jan 2006 15:29:07 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 53EB316A420 for ; Fri, 27 Jan 2006 15:29:07 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1984044450 for ; Fri, 27 Jan 2006 15:29:07 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k0RFT6TJ026112 for ; Fri, 27 Jan 2006 15:29:06 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k0RFT6Go026109 for perforce@freebsd.org; Fri, 27 Jan 2006 15:29:06 GMT (envelope-from millert@freebsd.org) Date: Fri, 27 Jan 2006 15:29:06 GMT Message-Id: <200601271529.k0RFT6Go026109@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 90488 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jan 2006 15:29:08 -0000 http://perforce.freebsd.org/chv.cgi?CH=90488 Change 90488 by millert@millert_g4tower on 2006/01/27 15:28:16 Style fixes Affected files ... .. //depot/projects/trustedbsd/sedarwin7/src/darwin/xnu/osfmk/ipc/ipc_right.c#5 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin7/src/darwin/xnu/osfmk/ipc/ipc_right.c#5 (text+ko) ==== @@ -1324,6 +1324,8 @@ ipc_entry_bits_t bits; #ifdef MAC task_t self = current_task(); + ipc_port_t port; + int rc; #endif bits= entry->ie_bits; @@ -1336,16 +1338,14 @@ return FALSE; #ifdef MAC - ipc_port_t port; - port = (ipc_port_t) entry->ie_object; - ip_lock (port); - tasklabel_lock (self); - int rc = mac_check_port_make_send (&self->maclabel, &port->ip_label); - tasklabel_unlock (self); - ip_unlock (port); + ip_lock(port); + tasklabel_lock(self); + rc = mac_check_port_make_send(&self->maclabel, &port->ip_label); + tasklabel_unlock(self); + ip_unlock(port); if (rc) - return FALSE; + return FALSE; #endif break; @@ -1355,13 +1355,13 @@ #ifdef MAC port = (ipc_port_t) entry->ie_object; - ip_lock (port); - tasklabel_lock (self); - rc = mac_check_port_move_receive (&self->maclabel, &port->ip_label); - tasklabel_unlock (self); - ip_unlock (port); + ip_lock(port); + tasklabel_lock(self); + rc = mac_check_port_move_receive(&self->maclabel, &port->ip_label); + tasklabel_unlock(self); + ip_unlock(port); if (rc) - return FALSE; + return FALSE; #endif break; @@ -1383,14 +1383,13 @@ ip_lock(port); active = ip_active(port); #ifdef MAC - tasklabel_lock (self); - rc = mac_check_port_copy_send (&self->maclabel, &port->ip_label); - tasklabel_unlock (self); - if (rc) - { - ip_unlock (port); - return FALSE; - } + tasklabel_lock(self); + rc = mac_check_port_copy_send(&self->maclabel, &port->ip_label); + tasklabel_unlock(self); + if (rc) { + ip_unlock(port); + return FALSE; + } #endif ip_unlock(port); @@ -1476,14 +1475,13 @@ assert(port->ip_receiver == space); #ifdef MAC - tasklabel_lock (self); - rc = mac_check_port_make_send (&self->maclabel, &port->ip_label); - tasklabel_unlock (self); - if (rc) - { - ip_unlock (port); - return KERN_NO_ACCESS; - } + tasklabel_lock(self); + rc = mac_check_port_make_send(&self->maclabel, &port->ip_label); + tasklabel_unlock(self); + if (rc) { + ip_unlock(port); + return KERN_NO_ACCESS; + } #endif port->ip_mscount++; @@ -1511,14 +1509,13 @@ assert(port->ip_receiver == space); #ifdef MAC - tasklabel_lock (self); - rc = mac_check_port_make_send (&self->maclabel, &port->ip_label); - tasklabel_unlock (self); - if (rc) - { - ip_unlock (port); - return KERN_NO_ACCESS; - } + tasklabel_lock(self); + rc = mac_check_port_make_send(&self->maclabel, &port->ip_label); + tasklabel_unlock(self); + if (rc) { + ip_unlock(port); + return KERN_NO_ACCESS; + } #endif port->ip_sorights++; @@ -1546,14 +1543,14 @@ assert(port->ip_receiver == space); #ifdef MAC - tasklabel_lock (self); - rc = mac_check_port_move_receive (&self->maclabel, &port->ip_label); - tasklabel_unlock (self); - if (rc) - { - ip_unlock (port); - return KERN_NO_ACCESS; - } + tasklabel_lock(self); + rc = mac_check_port_move_receive(&self->maclabel, + &port->ip_label); + tasklabel_unlock(self); + if (rc) { + ip_unlock(port); + return KERN_NO_ACCESS; + } #endif if (bits & MACH_PORT_TYPE_SEND) { @@ -1612,14 +1609,13 @@ } #ifdef MAC - tasklabel_lock (self); - rc = mac_check_port_copy_send (&self->maclabel, &port->ip_label); - tasklabel_unlock (self); - if (rc) - { - ip_unlock (port); - return KERN_NO_ACCESS; - } + tasklabel_lock(self); + rc = mac_check_port_copy_send(&self->maclabel, &port->ip_label); + tasklabel_unlock(self); + if (rc) { + ip_unlock(port); + return KERN_NO_ACCESS; + } #endif if ((bits & MACH_PORT_TYPE_SEND) == 0) { @@ -1667,14 +1663,13 @@ } #ifdef MAC - tasklabel_lock (self); - rc = mac_check_port_copy_send (&self->maclabel, &port->ip_label); - tasklabel_unlock (self); - if (rc) - { - ip_unlock (port); - return KERN_NO_ACCESS; - } + tasklabel_lock(self); + rc = mac_check_port_copy_send(&self->maclabel, &port->ip_label); + tasklabel_unlock(self); + if (rc) { + ip_unlock(port); + return KERN_NO_ACCESS; + } #endif if ((bits & MACH_PORT_TYPE_SEND) == 0) { @@ -1746,14 +1741,13 @@ } #ifdef MAC - tasklabel_lock (self); - rc = mac_check_port_copy_send (&self->maclabel, &port->ip_label); - tasklabel_unlock (self); - if (rc) - { - ip_unlock (port); - return KERN_NO_ACCESS; - } + tasklabel_lock(self); + rc = mac_check_port_copy_send(&self->maclabel, &port->ip_label); + tasklabel_unlock(self); + if (rc) { + ip_unlock(port); + return KERN_NO_ACCESS; + } #endif if ((bits & MACH_PORT_TYPE_SEND_ONCE) == 0) { @@ -1952,14 +1946,13 @@ /* port is locked and active */ #ifdef MAC - tasklabel_lock (self); - rc = mac_check_port_copy_send (&self->maclabel, &port->ip_label); - tasklabel_unlock (self); - if (rc) - { - ip_unlock (port); - return KERN_NO_ACCESS; - } + tasklabel_lock(self); + rc = mac_check_port_copy_send(&self->maclabel, &port->ip_label); + tasklabel_unlock(self); + if (rc) { + ip_unlock(port); + return KERN_NO_ACCESS; + } #endif assert(port->ip_srights > 0); @@ -2039,7 +2032,7 @@ ipc_entry_bits_t bits; ipc_port_t port; #ifdef MAC - kern_return_t rc; + int rc; #endif bits = entry->ie_bits;