From owner-p4-projects@FreeBSD.ORG Tue Sep 30 08:44:04 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E24F816A4C0; Tue, 30 Sep 2003 08:44:03 -0700 (PDT) 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 BB2EE16A4B3; Tue, 30 Sep 2003 08:44:03 -0700 (PDT) Received: from mailhub.fokus.fraunhofer.de (mailhub.fokus.fraunhofer.de [193.174.154.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2705A43FAF; Tue, 30 Sep 2003 08:44:02 -0700 (PDT) (envelope-from brandt@fokus.fraunhofer.de) Received: from beagle (beagle [193.175.132.100])h8UFhw612090; Tue, 30 Sep 2003 17:43:58 +0200 (MEST) Date: Tue, 30 Sep 2003 17:43:58 +0200 (CEST) From: Harti Brandt To: "Andrew R. Reiter" In-Reply-To: <20030930113435.H4476@fledge.watson.org> Message-ID: <20030930174127.W96881@beagle.fokus.fraunhofer.de> References: <200309301532.h8UFW81Z092302@repoman.freebsd.org> <20030930113435.H4476@fledge.watson.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: Andrew Reisse cc: Perforce Change Reviews Subject: Re: PERFORCE change 38889 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2003 15:44:04 -0000 On Tue, 30 Sep 2003, Andrew R. Reiter wrote: ARR>On Tue, 30 Sep 2003, Andrew Reisse wrote: ARR> ARR>:http://perforce.freebsd.org/chv.cgi?CH=38889 ARR>: ARR>:Change 38889 by areisse@areisse_tislabs on 2003/09/30 08:32:04 ARR>: ARR>: properly initialize sidtab structures ARR>: don't divide by zero when empty policy files are loaded ARR>: ARR>:Affected files ... ARR>: ARR>:.. //depot/projects/trustedbsd/sebsd/sys/security/sebsd/ss/fileutils.c#5 edit ARR>:.. //depot/projects/trustedbsd/sebsd/sys/security/sebsd/ss/sidtab.c#7 edit ARR>: ARR>:Differences ... ARR>: ARR>:==== //depot/projects/trustedbsd/sebsd/sys/security/sebsd/ss/fileutils.c#5 (text+ko) ==== ARR>: ARR>:@@ -107,6 +107,9 @@ ARR>: size_t ARR>: fread(void *ptr, size_t size, size_t nmemb, FILE *fp) ARR>: { ARR>:+ if (size == 0) ARR>:+ return 0; ARR>:+ ARR>: struct thread *td = curthread; ARR> ARR>Won't this generate a parse error? This is allowed in C99. See 6.8.2 of the standard. It should probably be disallowed by style(9). harti ARR> ARR>: ARR>: fp->FILE_uio.uio_iov->iov_base = ptr; ARR>: ARR>:==== //depot/projects/trustedbsd/sebsd/sys/security/sebsd/ss/sidtab.c#7 (text+ko) ==== ARR>: ARR>:@@ -42,6 +42,7 @@ ARR>: s->nel = 0; ARR>: s->next_sid = 1; ARR>: s->shutdown = 0; ARR>:+ memset (&s->lock, 0, sizeof (struct mtx)); ARR>: INIT_SIDTAB_LOCK(s); ARR>: return 0; ARR>: } ARR>: ARR> ARR>-- ARR>Andrew R. Reiter ARR>arr@watson.org ARR>arr@FreeBSD.org ARR> -- harti brandt, http://www.fokus.fraunhofer.de/research/cc/cats/employees/hartmut.brandt/private brandt@fokus.fraunhofer.de, harti@freebsd.org