From owner-freebsd-audit Sun Jan 30 19:10:35 2000 Delivered-To: freebsd-audit@freebsd.org Received: from alcanet.com.au (mail.alcanet.com.au [203.62.196.10]) by hub.freebsd.org (Postfix) with ESMTP id DFD9614E1F for ; Sun, 30 Jan 2000 19:10:30 -0800 (PST) (envelope-from jeremyp@gsmx07.alcatel.com.au) Received: by border.alcanet.com.au id <115225>; Mon, 31 Jan 2000 14:11:02 +1100 Content-return: prohibited From: Peter Jeremy Subject: Re: sort, revised patch In-reply-to: ; from mheffner@mailandnews.com on Sat, Jan 29, 2000 at 11:24:29AM +1100 To: Mike Heffner Cc: freebsd-audit@FreeBSD.ORG Message-Id: <00Jan31.141102est.115225@border.alcanet.com.au> MIME-version: 1.0 X-Mailer: Mutt 1.0i Content-type: text/plain; charset=us-ascii References: Date: Mon, 31 Jan 2000 14:11:02 +1100 Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 2000-Jan-29 11:24:29 +1100, Mike Heffner wrote: > Here's the revised patch, it keeps the original naming scheme for >tempfiles, but puts them in a dir made with mkdtemp(3). Looks much better. >- char *name = xmalloc (len + 1 + sizeof ("sort") - 1 + 5 + 5 + 1); >+ char *name; ... >+ temp_dir = xmalloc( len + 1 + strlen(DIR_TEMPLATE) + 1 ); ... >+ name = xmalloc(strlen(temp_dir) + 1 + strlen("sort") + 5 + 5 + 1); Why the change from sizeof() to strlen()? The major advantage of sizeof() is that it is evaluated at compile time. If you stay with sizeof(), you get: >- char *name = xmalloc (len + 1 + sizeof ("sort") - 1 + 5 + 5 + 1); >+ char *name = xmalloc (len + 1 + sizeof(DIR_TEMPLATE) + 1 + sizeof("sort") >+ - 1 + 5 + 5 + 1); and >+ temp_dir = xmalloc( len + 1 + sizeof(DIR_TEMPLATE) ); Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Sun Jan 30 19:36: 7 2000 Delivered-To: freebsd-audit@freebsd.org Received: from MailAndNews.com (MailAndNews.com [199.29.68.160]) by hub.freebsd.org (Postfix) with ESMTP id 9662414D12 for ; Sun, 30 Jan 2000 19:36:04 -0800 (PST) (envelope-from mheffner@mailandnews.com) Received: from muriel.penguinpowered.com [208.138.198.103] (mheffner@mailandnews.com); Sun, 30 Jan 2000 22:35:54 -0500 X-WM-Posted-At: MailAndNews.com; Sun, 30 Jan 00 22:35:54 -0500 Content-Length: 1371 Message-ID: X-Mailer: XFMail 1.4.4 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <00Jan31.141102est.115225@border.alcanet.com.au> Date: Sun, 30 Jan 2000 22:37:27 -0500 (EST) Reply-To: Mike Heffner From: Mike Heffner To: Peter Jeremy Subject: Re: sort, revised patch Cc: freebsd-audit@FreeBSD.ORG, Mike Heffner Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 31-Jan-2000 Peter Jeremy wrote: | On 2000-Jan-29 11:24:29 +1100, Mike Heffner | wrote: |>- char *name = xmalloc (len + 1 + sizeof ("sort") - 1 + 5 + 5 + 1); |>+ char *name; | ... |>+ temp_dir = xmalloc( len + 1 + strlen(DIR_TEMPLATE) + 1 ); | ... |>+ name = xmalloc(strlen(temp_dir) + 1 + strlen("sort") + 5 + 5 + 1); | | | Why the change from sizeof() to strlen()? The major advantage of sizeof() | is that it is evaluated at compile time. well, because with sizeof it'll give you the len+1, and then you have to subtract one (if you want to be exact). eg: sizeof("blahblah") = 9 whereas strlen("blahblah") = 8 sizeof() would work if you wanted it to include the null... i guess some it was personal habit as well. i can change it back. | | If you stay with sizeof(), you get: | |>- char *name = xmalloc (len + 1 + sizeof ("sort") - 1 + 5 + 5 + 1); |>+ char *name = xmalloc (len + 1 + sizeof(DIR_TEMPLATE) + 1 + ^ -1 | sizeof("sort") - 1 + 5 + 5 + 1); | | and | |>+ temp_dir = xmalloc( len + 1 + sizeof(DIR_TEMPLATE) ); | | Peter --------------------------------- Mike Heffner Fredericksburg, VA ICQ# 882073 Date: 30-Jan-2000 Time: 22:22:55 --------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Mon Jan 31 13:18:55 2000 Delivered-To: freebsd-audit@freebsd.org Received: from turing.csis.gvsu.edu (csis.gvsu.edu [148.61.162.182]) by hub.freebsd.org (Postfix) with SMTP id 0CAA814A09 for ; Mon, 31 Jan 2000 13:18:47 -0800 (PST) (envelope-from matt@csis.gvsu.edu) Received: (qmail 14264 invoked by uid 0); 31 Jan 2000 21:18:40 -0000 Received: from pm492-27.dialip.mich.net (HELO badmofo) (198.110.188.181) by csis.gvsu.edu with SMTP; 31 Jan 2000 21:18:40 -0000 Received: (qmail 75610 invoked by uid 500); 31 Jan 2000 21:18:31 -0000 From: matt@csis.gvsu.edu Date: Mon, 31 Jan 2000 16:18:31 -0500 To: Mike Heffner Cc: FreeBSD-audit Subject: Re: Some programs that could use some work Message-ID: <20000131161831.A75560@badmofo> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: ; from mheffner@mailandnews.com on Sat, Jan 29, 2000 at 05:40:08PM -0500 X-my-OS-is-better-than-your-OS: FreeBSD 3.4-STABLE i386 Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Mike Heffner said: > I've compiled a basic list of some programs, that IMO, could do better tempfile Does the recent code freeze slow done the audit process? It sounded like only essential patches will be added. Just when I have time to start working :) -matt -- matt@csis.gvsu.edu http://www.csis.gvsu.edu/matt 03 F8 23 C5 43 A2 F7 5A 24 49 F7 B0 3A F9 B1 7F To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Mon Jan 31 13:22:45 2000 Delivered-To: freebsd-audit@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id A7BDC14C05 for ; Mon, 31 Jan 2000 13:22:37 -0800 (PST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.9.3/8.9.3) with ESMTP id OAA04736; Mon, 31 Jan 2000 14:22:30 -0700 (MST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id OAA08153; Mon, 31 Jan 2000 14:22:38 -0700 (MST) Message-Id: <200001312122.OAA08153@harmony.village.org> To: matt@csis.gvsu.edu Subject: Re: Some programs that could use some work Cc: Mike Heffner , FreeBSD-audit In-reply-to: Your message of "Mon, 31 Jan 2000 16:18:31 EST." <20000131161831.A75560@badmofo> References: <20000131161831.A75560@badmofo> Date: Mon, 31 Jan 2000 14:22:37 -0700 From: Warner Losh Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <20000131161831.A75560@badmofo> matt@csis.gvsu.edu writes: : Does the recent code freeze slow done the audit process? It sounded : like only essential patches will be added. Just when I have time to : start working :) Well, the FreeBSD security officer's word (eg mine) has a lot of pull in the area of security when it comes to changes during this code freeze. If there are security problems, or potential problems, then the SO will do what he can to make sure they get into 4.0. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message