From owner-freebsd-audit Sun Jan 16 17: 8:35 2000 Delivered-To: freebsd-audit@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 758) id 6A04B14D98; Sun, 16 Jan 2000 17:08:34 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 5E61E1CD5C9 for ; Sun, 16 Jan 2000 17:08:34 -0800 (PST) (envelope-from kris@hub.freebsd.org) Date: Sun, 16 Jan 2000 17:08:34 -0800 (PST) From: Kris Kennaway To: audit@freebsd.org Subject: awk tempfile handling Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Index: io.c =================================================================== RCS file: /home/ncvs/src/contrib/awk/io.c,v retrieving revision 1.4 diff -u -r1.4 io.c --- io.c 1999/09/27 08:56:57 1.4 +++ io.c 2000/01/13 03:50:36 @@ -1170,16 +1170,14 @@ { extern char *strdup P((const char *)); int current; - char *name; + char *name = "/tmp/pipXXXXXXXXXX"; static char cmdbuf[256]; /* get a name to use */ - if ((name = tempnam(".", "pip")) == NULL) + if ((current = mkstemp(name)) == INVALID_HANDLE) return NULL; sprintf(cmdbuf, "%s > %s", cmd, name); system(cmdbuf); - if ((current = open(name, O_RDONLY)) == INVALID_HANDLE) - return NULL; pipes[current].name = name; pipes[current].command = strdup(cmd); rp->iop = iop_alloc(current, name, NULL); ---- "How many roads must a man walk down, before you call him a man?" "Eight!" "That was a rhetorical question!" "Oh..then, seven!" -- Homer Simpson To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Sun Jan 16 17:17:21 2000 Delivered-To: freebsd-audit@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 758) id 00A7015102; Sun, 16 Jan 2000 17:17:19 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id E2FC11CD488 for ; Sun, 16 Jan 2000 17:17:19 -0800 (PST) (envelope-from kris@hub.freebsd.org) Date: Sun, 16 Jan 2000 17:17:19 -0800 (PST) From: Kris Kennaway To: audit@freebsd.org Subject: groff tempfile handling Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Index: indxbib.cc =================================================================== RCS file: /home/ncvs/src/contrib/groff/indxbib/indxbib.cc,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 indxbib.cc --- indxbib.cc 1996/09/07 16:18:10 1.1.1.1 +++ indxbib.cc 2000/01/17 01:15:59 @@ -37,11 +37,11 @@ extern "C" { // Sun's stdlib.h fails to declare this. - char *mktemp(char *); + int mkstemp(char *); } #define DEFAULT_HASH_TABLE_SIZE 997 -#define TEMP_INDEX_TEMPLATE "indxbibXXXXXX" +#define TEMP_INDEX_TEMPLATE "indxbibXXXXXXXXXX" // (2^n - MALLOC_OVERHEAD) should be a good argument for malloc(). @@ -126,7 +126,7 @@ parser_t parser = do_file; const char *directory = 0; const char *foption = 0; - int opt; + int opt, fd; while ((opt = getopt(argc, argv, "c:o:h:i:k:l:t:n:c:d:f:vw")) != EOF) switch (opt) { case 'c': @@ -217,14 +217,14 @@ strcpy(temp_index_file + (p - basename), TEMP_INDEX_TEMPLATE); } else { - temp_index_file = strsave(TEMP_INDEX_TEMPLATE); + if((temp_index_file = strsave(TEMP_INDEX_TEMPLATE)) == NULL) + fatal("can't create temporary file name"); } - if (!mktemp(temp_index_file) || !temp_index_file[0]) - fatal("cannot create file name for temporary file"); catch_fatal_signals(); - int fd = creat(temp_index_file, S_IRUSR|S_IRGRP|S_IROTH); - if (fd < 0) + if ((fd = mkstemp(temp_index_file)) < 0) fatal("can't create temporary index file: %1", strerror(errno)); + if (fchmod(fd, S_IRUSR|S_IRGRP|S_IROTH) < 0) + fatal("can't change permissions on temporary file"); indxfp = fdopen(fd, "w"); if (indxfp == 0) fatal("fdopen failed"); ---- "How many roads must a man walk down, before you call him a man?" "Eight!" "That was a rhetorical question!" "Oh..then, seven!" -- Homer Simpson To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Sun Jan 16 17:23:58 2000 Delivered-To: freebsd-audit@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 758) id 33DB815055; Sun, 16 Jan 2000 17:23:57 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 275D81CD5CA for ; Sun, 16 Jan 2000 17:23:57 -0800 (PST) (envelope-from kris@hub.freebsd.org) Date: Sun, 16 Jan 2000 17:23:57 -0800 (PST) From: Kris Kennaway To: audit@freebsd.org Subject: File permission in libc/gmon/gmon.c Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Index: gmon/gmon.c =================================================================== RCS file: /home/ncvs/src/lib/libc/gmon/gmon.c,v retrieving revision 1.7 diff -u -r1.7 gmon.c --- gmon/gmon.c 2000/01/12 09:23:21 1.7 +++ gmon/gmon.c 2000/01/17 01:22:43 @@ -172,7 +172,7 @@ moncontrol(0); snprintf(outname,sizeof(outname),"%s.gmon",__progname); - fd = _libc_open(outname, O_CREAT|O_TRUNC|O_WRONLY, 0666); + fd = _libc_open(outname, O_CREAT|O_TRUNC|O_WRONLY, 0664); if (fd < 0) { warnx("_mcleanup: %s - %s",outname,strerror(errno)); return; ---- "How many roads must a man walk down, before you call him a man?" "Eight!" "That was a rhetorical question!" "Oh..then, seven!" -- Homer Simpson To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Sun Jan 16 17:27:21 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 667421514B; Sun, 16 Jan 2000 17:27:18 -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 SAA59993; Sun, 16 Jan 2000 18:27:15 -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 SAA56670; Sun, 16 Jan 2000 18:27:20 -0700 (MST) Message-Id: <200001170127.SAA56670@harmony.village.org> To: Kris Kennaway Subject: Re: File permission in libc/gmon/gmon.c Cc: audit@FreeBSD.ORG In-reply-to: Your message of "Sun, 16 Jan 2000 17:23:57 PST." References: Date: Sun, 16 Jan 2000 18:27:20 -0700 From: Warner Losh Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG "You go girl!" Which is american slang for keep up the good work, or great job! Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Sun Jan 16 18:11:35 2000 Delivered-To: freebsd-audit@freebsd.org Received: from alcanet.com.au (border.alcanet.com.au [203.62.196.10]) by hub.freebsd.org (Postfix) with ESMTP id BC81C15120 for ; Sun, 16 Jan 2000 18:11:29 -0800 (PST) (envelope-from jeremyp@gsmx07.alcatel.com.au) Received: by border.alcanet.com.au id <40324>; Mon, 17 Jan 2000 13:03:25 +1100 Content-return: prohibited From: Peter Jeremy Subject: Re: awk tempfile handling In-reply-to: ; from kris@hub.freebsd.org on Mon, Jan 17, 2000 at 12:01:00PM +1100 To: Kris Kennaway Cc: audit@FreeBSD.ORG Message-Id: <00Jan17.130325est.40324@border.alcanet.com.au> MIME-version: 1.0 X-Mailer: Mutt 1.0i Content-type: text/plain; charset=us-ascii References: Date: Mon, 17 Jan 2000 13:03:25 +1100 Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 2000-Jan-17 12:01:00 +1100, Kris Kennaway wrote: >+ char *name = "/tmp/pipXXXXXXXXXX"; No good. mkstemp() updates the passed string in place (see the notes in mktemp(3). The above defines a read-only string. This leads to segmentation violations at runtime. > static char cmdbuf[256]; Into which you're sprintf()ing an unbounded string. Not a good idea. >- if ((name = tempnam(".", "pip")) == NULL) >+ if ((current = mkstemp(name)) == INVALID_HANDLE) > return NULL; tempnam() returns a malloc'd buffer, mkstemp() reuses the passed name. This will cause problems if `name' is later free()d. > sprintf(cmdbuf, "%s > %s", cmd, name); > system(cmdbuf); system(3) is one of those system calls which is virtually impossible to use safely. There's also a race condition here - there's nothing stopping another process doing something nasty between the mkstemp() and the I/O redirection done by the shell within system(). The following is an outline of what needs to be done: { static char name[] = "/tmp/pipXXXXXXXXXX"; int current; /* FD for stdout from command */ pid_t pid; int status; if ((current = mkstemps(name, 10)) == INVALID_HANDLE) return NULL; if ((pid = fork()) < 0) return NULL; else if (pid == 0) { if (current != 1) { if (dup2(current, 1) < 0) _exit(1); close(current); } /*XXX close other random FD's and/or set close-on-exec flags */ /*XXX If security is an issue, don't call sh at all */ execl("/bin/sh", "sh", "-c", cmd, NULL); _exit(1); } else { while (waitpid(pid, &status, 0) < 0 && errno == EINTR) ; } pipes[current].name = strdup(name); pipes[current].command = strdup(cmd); rp->iop = iop_alloc(current, name, NULL); ... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Sun Jan 16 18:11:45 2000 Delivered-To: freebsd-audit@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 758) id 95237151D2; Sun, 16 Jan 2000 18:11:43 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 84E441CD5C9 for ; Sun, 16 Jan 2000 18:11:43 -0800 (PST) (envelope-from kris@hub.freebsd.org) Date: Sun, 16 Jan 2000 18:11:43 -0800 (PST) From: Kris Kennaway To: audit@freebsd.org Subject: libc patch to warn about tempfiles Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Here's a patch to libc which complains when an application tries to use mktemp()/mkstemp()/... with fewer than 10 X's (using 6 is common, but unfortunately insecure since the PID is either known or easily guessable, leaving only 52 different results). This may be useful for tracking down insecure ports, as well as things in the base tree which have yet to be fixed. Kris Index: mktemp.c =================================================================== RCS file: /home/ncvs/src/lib/libc/stdio/mktemp.c,v retrieving revision 1.18 diff -u -r1.18 mktemp.c --- mktemp.c 2000/01/12 09:23:41 1.18 +++ mktemp.c 2000/01/17 02:08:00 @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include @@ -105,6 +106,7 @@ register char *start, *trv, *suffp; struct stat sbuf; int pid, rval; + int count = 0; if (doopen && domkdir) { errno = EINVAL; @@ -124,6 +126,7 @@ while (*trv == 'X' && pid != 0) { *trv-- = (pid % 10) + '0'; pid /= 10; + count++; } while (*trv == 'X') { char c; @@ -133,8 +136,11 @@ c = pid + 'A'; else c = (pid - 26) + 'a'; + count++; *trv-- = c; } + if (count<10) + warnx("WARNING: Temporary file created using %d X's", count); start = trv + 1; /* ---- "How many roads must a man walk down, before you call him a man?" "Eight!" "That was a rhetorical question!" "Oh..then, seven!" -- Homer Simpson To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Sun Jan 16 19:17:33 2000 Delivered-To: freebsd-audit@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 758) id 8C37514D64; Sun, 16 Jan 2000 19:17:32 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 7AC661CD446; Sun, 16 Jan 2000 19:17:32 -0800 (PST) (envelope-from kris@hub.freebsd.org) Date: Sun, 16 Jan 2000 19:17:32 -0800 (PST) From: Kris Kennaway To: Peter Jeremy Cc: audit@FreeBSD.ORG Subject: Re: awk tempfile handling In-Reply-To: <00Jan17.130325est.40324@border.alcanet.com.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 17 Jan 2000, Peter Jeremy wrote: > No good. mkstemp() updates the passed string in place (see the notes > in mktemp(3). The above defines a read-only string. This leads to > segmentation violations at runtime. [Snip other problems] Gah, I guess I wasn't actually looking when I made this patch. I'll revisit it. It's good to see someone is actually reading these - thanks! Kris ---- "How many roads must a man walk down, before you call him a man?" "Eight!" "That was a rhetorical question!" "Oh..then, seven!" -- Homer Simpson To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Sun Jan 16 19:37:47 2000 Delivered-To: freebsd-audit@freebsd.org Received: from alcanet.com.au (border.alcanet.com.au [203.62.196.10]) by hub.freebsd.org (Postfix) with ESMTP id 5B57A14C9D for ; Sun, 16 Jan 2000 19:37:41 -0800 (PST) (envelope-from jeremyp@gsmx07.alcatel.com.au) Received: by border.alcanet.com.au id <40327>; Mon, 17 Jan 2000 14:29:45 +1100 Content-return: prohibited From: Peter Jeremy Subject: Re: libc patch to warn about tempfiles In-reply-to: ; from kris@hub.freebsd.org on Mon, Jan 17, 2000 at 01:04:11PM +1100 To: Kris Kennaway Cc: audit@FreeBSD.ORG Message-Id: <00Jan17.142945est.40327@border.alcanet.com.au> MIME-version: 1.0 X-Mailer: Mutt 1.0i Content-type: text/plain; charset=us-ascii References: Date: Mon, 17 Jan 2000 14:29:42 +1100 Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 2000-Jan-17 13:04:11 +1100, Kris Kennaway wrote: >Here's a patch to libc which complains when an application tries to use >mktemp()/mkstemp()/... with fewer than 10 X's (using 6 is common, but >unfortunately insecure since the PID is either known or easily guessable, >leaving only 52 different results). This may be useful for tracking down >insecure ports, as well as things in the base tree which have yet to be >fixed. I think that changing the algorithm to use a denser encoding (eg encoding the PID in base-62 or more, rather than base 10) would be a better solution. This way you don't need to change the functions using mktemp() et al. 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 16 19:52: 5 2000 Delivered-To: freebsd-audit@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 758) id 197BE14C2D; Sun, 16 Jan 2000 19:52:04 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 0527F1CD431; Sun, 16 Jan 2000 19:52:04 -0800 (PST) (envelope-from kris@hub.freebsd.org) Date: Sun, 16 Jan 2000 19:52:03 -0800 (PST) From: Kris Kennaway To: Peter Jeremy Cc: audit@FreeBSD.ORG Subject: Re: libc patch to warn about tempfiles In-Reply-To: <00Jan17.142945est.40327@border.alcanet.com.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 17 Jan 2000, Peter Jeremy wrote: > I think that changing the algorithm to use a denser encoding (eg > encoding the PID in base-62 or more, rather than base 10) would be > a better solution. This way you don't need to change the functions > using mktemp() et al. Hmm..that's not a bad idea. With base-64 we'd have 36 bits, of which about 17 would be taken up by the encoded PID, leaving about 520000 possible tempfiles (a factor of 10^4 better than now). OTOH, using 10 X's in the current system has a target space of size 52^6, or 1.97e+10 :-) Kris ---- "How many roads must a man walk down, before you call him a man?" "Eight!" "That was a rhetorical question!" "Oh..then, seven!" -- Homer Simpson To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Mon Jan 17 12:58:20 2000 Delivered-To: freebsd-audit@freebsd.org Received: from spirit.jaded.net (spirit.jaded.net [216.94.113.12]) by hub.freebsd.org (Postfix) with ESMTP id 6FC9814FF4; Mon, 17 Jan 2000 12:58:18 -0800 (PST) (envelope-from dan@spirit.jaded.net) Received: (from dan@localhost) by spirit.jaded.net (8.9.3/8.9.3) id QAA01949; Mon, 17 Jan 2000 16:04:27 -0500 (EST) Date: Mon, 17 Jan 2000 16:04:27 -0500 From: Dan Moschuk To: Peter Jeremy Cc: Kris Kennaway , audit@FreeBSD.ORG Subject: Re: libc patch to warn about tempfiles Message-ID: <20000117160427.E1156@spirit.jaded.net> References: <00Jan17.142945est.40327@border.alcanet.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <00Jan17.142945est.40327@border.alcanet.com.au>; from peter.jeremy@alcatel.com.au on Mon, Jan 17, 2000 at 02:29:42PM +1100 Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG | >Here's a patch to libc which complains when an application tries to use | >mktemp()/mkstemp()/... with fewer than 10 X's (using 6 is common, but | >unfortunately insecure since the PID is either known or easily guessable, | >leaving only 52 different results). This may be useful for tracking down | >insecure ports, as well as things in the base tree which have yet to be | >fixed. | | I think that changing the algorithm to use a denser encoding (eg | encoding the PID in base-62 or more, rather than base 10) would be | a better solution. This way you don't need to change the functions | using mktemp() et al. Why not have it use arc4random()? -- Dan Moschuk (TFreak!dan@freebsd.org) "Waste not fresh tears on old griefs." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Mon Jan 17 13:12:17 2000 Delivered-To: freebsd-audit@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 758) id 47CC214EEA; Mon, 17 Jan 2000 13:12:16 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 387731CD644; Mon, 17 Jan 2000 13:12:16 -0800 (PST) (envelope-from kris@hub.freebsd.org) Date: Mon, 17 Jan 2000 13:12:16 -0800 (PST) From: Kris Kennaway To: Dan Moschuk Cc: Peter Jeremy , audit@FreeBSD.ORG Subject: Re: libc patch to warn about tempfiles In-Reply-To: <20000117160427.E1156@spirit.jaded.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 17 Jan 2000, Dan Moschuk wrote: > | encoding the PID in base-62 or more, rather than base 10) would be > | a better solution. This way you don't need to change the functions > | using mktemp() et al. > > Why not have it use arc4random()? It does. I think your question was actually "Why does it use the PID?" The obvious answer is for collision avoidance: it guarantees that no other process will use the same tempfile name for the life of the process. OTOH, if we were to use a purely random field of 36 bits then we'd have a 1 in 6.8e10 chance of collision, which isn't very strong. Increasing the length of the field would lower the probabilities exponentially, but then there's no advantage to just lengthening the field right now. Kris ---- "How many roads must a man walk down, before you call him a man?" "Eight!" "That was a rhetorical question!" "Oh..then, seven!" -- Homer Simpson To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Mon Jan 17 21:16:28 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 F139014EAA for ; Mon, 17 Jan 2000 21:16:25 -0800 (PST) (envelope-from mheffner@mailandnews.com) Received: from muriel.penguinpowered.com [208.138.198.103] (mheffner@mailandnews.com); Tue, 18 Jan 2000 00:16:16 -0500 X-WM-Posted-At: MailAndNews.com; Tue, 18 Jan 00 00:16:16 -0500 Content-Length: 1498 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 Date: Tue, 18 Jan 2000 00:14:33 -0500 (EST) Reply-To: Mike Heffner From: Mike Heffner To: FreeBSD-audit Subject: cc tempfile handling? Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG [ sorry if you get this twice, my ISP's sendmail was giving me errors ] After doing some tempfile monitoring, I've noticed that cc will create several tempfile's during a compile of one file. As seen below: + -rw------- 1 spock wheel 17421 Jan 12 00:18 /tmp/ccO10265.i + -rw------- 1 spock wheel 0 Jan 12 00:18 /tmp/ccf10265.s + -rw------- 1 spock wheel 0 Jan 12 00:18 /tmp/ccJ10265.o - -rw------- 1 spock wheel 0 Jan 12 00:18 /tmp/ccJ10265.o - -rw------- 1 spock wheel 0 Jan 12 00:18 /tmp/ccf10265.s - -rw------- 1 spock wheel 17421 Jan 12 00:18 /tmp/ccO10265.i ^ As you notice, there's only one char that is changing between them (when you have a 5 digit pid), and the i, s, o sequence isn't hard to predict. Can we increase the number of X's in the file template from 6 to 10, as was done in some other patches recently posted by Kris Kennaway ? Here's a patch for what i suggested: Index: choose-temp.c =================================================================== RCS file: /home/ncvs/src/contrib/gcc/choose-temp.c,v retrieving revision 1.3 diff -r1.3 choose-temp.c 76c76 < #define TEMP_FILE "ccXXXXXX" --- > #define TEMP_FILE "ccXXXXXXXXXX" Later, --------------------------------- Mike Heffner Fredericksburg, VA ICQ# 882073 Date: 18-Jan-2000 Time: 00:11:04 --------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Wed Jan 19 10:40:25 2000 Delivered-To: freebsd-audit@freebsd.org Received: from smtp1a.ispchannel.com (cluster.ispchannel.com [24.142.63.7]) by hub.freebsd.org (Postfix) with ESMTP id CC1A01532B for ; Wed, 19 Jan 2000 10:40:20 -0800 (PST) (envelope-from spock@techfour.net) Received: from enterprise.muriel.penguinpowered.com ([208.138.198.103]) by smtp1a.ispchannel.com (InterMail vK.4.02.00.00 201-232-116 license 7d3764cdaca754bf8ae20adf0db2aa60) with ESMTP id <20000117021631.EBTV9448.smtp1a@enterprise.muriel.penguinpowered.com> for ; Sun, 16 Jan 2000 18:16:31 -0800 Content-Length: 1373 Message-ID: X-Mailer: XFMail 1.3.1 [p0] on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 X-SENDERNAME: `Mike Heffner` Date: Sun, 16 Jan 2000 21:14:23 -0500 (EST) From: Mike Heffner To: FreeBSD-audit Subject: cc tempfile handling? Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG After doing some tempfile monitoring, I've noticed that cc will create several tempfile's during compile of one file. As seen below: + -rw------- 1 spock wheel 17421 Jan 12 00:18 /tmp/ccO10265.i + -rw------- 1 spock wheel 0 Jan 12 00:18 /tmp/ccf10265.s + -rw------- 1 spock wheel 0 Jan 12 00:18 /tmp/ccJ10265.o - -rw------- 1 spock wheel 0 Jan 12 00:18 /tmp/ccJ10265.o - -rw------- 1 spock wheel 0 Jan 12 00:18 /tmp/ccf10265.s - -rw------- 1 spock wheel 17421 Jan 12 00:18 /tmp/ccO10265.i ^ As you notice, there's only one char that is changing between them (when you have a 5 digit pid). Can we increase the number of X's in the file template from 6 to 10, as was done in some other patches recently posted by Kris Kennaway ? Here's a patch for what i suggested: Index: choose-temp.c =================================================================== RCS file: /home/ncvs/src/contrib/gcc/choose-temp.c,v retrieving revision 1.3 diff -r1.3 choose-temp.c 76c76 < #define TEMP_FILE "ccXXXXXX" --- > #define TEMP_FILE "ccXXXXXXXXXX" Later, --------------------------------- Mike Heffner Fredericksburg, VA ICQ# 882073 Date: 16-Jan-00 Time: 20:54:05 --------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Wed Jan 19 10:40:27 2000 Delivered-To: freebsd-audit@freebsd.org Received: from smtp1a.ispchannel.com (cluster.ispchannel.com [24.142.63.7]) by hub.freebsd.org (Postfix) with ESMTP id 55B65152F5 for ; Wed, 19 Jan 2000 10:40:22 -0800 (PST) (envelope-from spock@techfour.net) Received: from enterprise.muriel.penguinpowered.com ([208.138.198.103]) by smtp1a.ispchannel.com (InterMail vK.4.02.00.00 201-232-116 license 7d3764cdaca754bf8ae20adf0db2aa60) with ESMTP id <20000117064148.EOJF9448.smtp1a@enterprise.muriel.penguinpowered.com> for ; Sun, 16 Jan 2000 22:41:48 -0800 Content-Length: 1443 Message-ID: X-Mailer: XFMail 1.3.1 [p0] on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 X-SENDERNAME: `Mike Heffner` Date: Mon, 17 Jan 2000 01:39:42 -0500 (EST) From: Mike Heffner To: FreeBSD-audit Subject: cc tempfile handling? Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG [ sorry if you get this twice, my ISP's sendmail was giving errors ] After doing some tempfile monitoring, I've noticed that cc will create several tempfile's during compile of one file. As seen below: + -rw------- 1 spock wheel 17421 Jan 12 00:18 /tmp/ccO10265.i + -rw------- 1 spock wheel 0 Jan 12 00:18 /tmp/ccf10265.s + -rw------- 1 spock wheel 0 Jan 12 00:18 /tmp/ccJ10265.o - -rw------- 1 spock wheel 0 Jan 12 00:18 /tmp/ccJ10265.o - -rw------- 1 spock wheel 0 Jan 12 00:18 /tmp/ccf10265.s - -rw------- 1 spock wheel 17421 Jan 12 00:18 /tmp/ccO10265.i ^ As you notice, there's only one char that is changing between them (when you have a 5 digit pid). Can we increase the number of X's in the file template from 6 to 10, as was done in some other patches recently posted by Kris Kennaway ? Here's a patch for what i suggested: Index: choose-temp.c =================================================================== RCS file: /home/ncvs/src/contrib/gcc/choose-temp.c,v retrieving revision 1.3 diff -r1.3 choose-temp.c 76c76 < #define TEMP_FILE "ccXXXXXX" --- > #define TEMP_FILE "ccXXXXXXXXXX" Later, --------------------------------- Mike Heffner Fredericksburg, VA ICQ# 882073 Date: 17-Jan-00 Time: 01:39:12 --------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Wed Jan 19 10:40:29 2000 Delivered-To: freebsd-audit@freebsd.org Received: from smtp1a.ispchannel.com (cluster.ispchannel.com [24.142.63.7]) by hub.freebsd.org (Postfix) with ESMTP id 4B6931533A for ; Wed, 19 Jan 2000 10:40:23 -0800 (PST) (envelope-from mheffner@ispchannel.com) Received: from muriel.penguinpowered.com ([208.138.198.103]) by smtp1a.ispchannel.com (InterMail vK.4.02.00.00 201-232-116 license 7d3764cdaca754bf8ae20adf0db2aa60) with ESMTP id <20000117213518.GRNJ9448.smtp1a@muriel.penguinpowered.com> for ; Mon, 17 Jan 2000 13:35:18 -0800 Content-Length: 1450 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 Date: Mon, 17 Jan 2000 16:32:52 -0500 (EST) From: Mike Heffner To: FreeBSD-audit Subject: cc tempfile handling? Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG [ sorry if you get this twice, my ISP's sendmail was giving errors ] After doing some tempfile monitoring, I've noticed that cc will create several tempfile's during compile of one file. As seen below: + -rw------- 1 spock wheel 17421 Jan 12 00:18 /tmp/ccO10265.i + -rw------- 1 spock wheel 0 Jan 12 00:18 /tmp/ccf10265.s + -rw------- 1 spock wheel 0 Jan 12 00:18 /tmp/ccJ10265.o - -rw------- 1 spock wheel 0 Jan 12 00:18 /tmp/ccJ10265.o - -rw------- 1 spock wheel 0 Jan 12 00:18 /tmp/ccf10265.s - -rw------- 1 spock wheel 17421 Jan 12 00:18 /tmp/ccO10265.i ^ As you notice, there's only one char that is changing between them (when you have a 5 digit pid). Can we increase the number of X's in the file template from 6 to 10, as was done in some other patches recently posted by Kris Kennaway ? Here's a patch for what i suggested: Index: choose-temp.c =================================================================== RCS file: /home/ncvs/src/contrib/gcc/choose-temp.c,v retrieving revision 1.3 diff -r1.3 choose-temp.c 76c76 < #define TEMP_FILE "ccXXXXXX" --- > #define TEMP_FILE "ccXXXXXXXXXX" Later, --------------------------------- Mike Heffner Fredericksburg, VA ICQ# 882073 Date: 17-Jan-2000 Time: 16:31:46 --------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Wed Jan 19 12: 0:13 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 582A814D42 for ; Wed, 19 Jan 2000 12:00:04 -0800 (PST) (envelope-from mheffner@mailandnews.com) Received: from muriel.penguinpowered.com [208.138.198.103] (mheffner@mailandnews.com); Wed, 19 Jan 2000 14:59:48 -0500 X-WM-Posted-At: MailAndNews.com; Wed, 19 Jan 00 14:59:48 -0500 Content-Length: 286 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 Date: Wed, 19 Jan 2000 15:02:06 -0500 (EST) Reply-To: Mike Heffner From: Mike Heffner To: FreeBSD-audit Subject: sorry for multiple posts Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Sorry for the multiple posts of the last email, somehow it got held up in a queue somewhere for several days. Sorry, --------------------------------- Mike Heffner Fredericksburg, VA ICQ# 882073 Date: 19-Jan-2000 Time: 14:59:15 --------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Wed Jan 19 12:28: 5 2000 Delivered-To: freebsd-audit@freebsd.org Received: from vtopus.cs.vt.edu (vtopus.cs.vt.edu [128.173.40.24]) by hub.freebsd.org (Postfix) with ESMTP id CA51D14CF1 for ; Wed, 19 Jan 2000 12:27:58 -0800 (PST) (envelope-from dhagan@cs.vt.edu) Received: from localhost (dhagan@localhost) by vtopus.cs.vt.edu (8.9.1a/8.9.1) with ESMTP id PAA13140 for ; Wed, 19 Jan 2000 15:27:56 -0500 (EST) Date: Wed, 19 Jan 2000 15:27:55 -0500 (EST) From: Daniel Hagan To: freebsd-audit@freebsd.org Subject: Any recommendations for a new participant Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I'd volunteered to help out earlier, but now that I'm actually signed up.... Any recommendations on where to start? Is there a section of code that's under group review, or do I just pick a program and start trying to find problems? (Is there a priority list of programs/code to audit?) Thanks guys, Daniel -- Daniel Hagan Computer Science CSE dhagan@cs.vt.edu http://www.cs.vt.edu/~dhagan/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Wed Jan 19 23:25:21 2000 Delivered-To: freebsd-audit@freebsd.org Received: from relay.nuxi.com (nuxi.cs.ucdavis.edu [169.237.7.38]) by hub.freebsd.org (Postfix) with ESMTP id D57011538E; Wed, 19 Jan 2000 23:25:19 -0800 (PST) (envelope-from obrien@NUXI.com) Received: from dragon.nuxi.com (root@d60-025.leach.ucdavis.edu [169.237.60.25]) by relay.nuxi.com (8.9.3/8.9.3) with ESMTP id XAA83045; Wed, 19 Jan 2000 23:25:19 -0800 (PST) (envelope-from obrien@dragon.nuxi.com) Received: (from obrien@localhost) by dragon.nuxi.com (8.9.3/8.9.1) id XAA76843; Wed, 19 Jan 2000 23:25:20 -0800 (PST) (envelope-from obrien) Date: Wed, 19 Jan 2000 23:25:20 -0800 From: "David O'Brien" To: Kris Kennaway Cc: audit@freebsd.org Subject: Re: groff tempfile handling Message-ID: <20000119232520.A76822@dragon.nuxi.com> Reply-To: obrien@freebsd.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: ; from kris@hub.freebsd.org on Sun, Jan 16, 2000 at 05:17:19PM -0800 X-Operating-System: FreeBSD 4.0-CURRENT Organization: The NUXI BSD group X-PGP-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Keyid: 34F9F9D5 Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, Jan 16, 2000 at 05:17:19PM -0800, Kris Kennaway wrote: > Index: indxbib.cc > =================================================================== > RCS file: /home/ncvs/src/contrib/groff/indxbib/indxbib.cc,v > retrieving revision 1.1.1.1 > diff -u -r1.1.1.1 indxbib.cc > --- indxbib.cc 1996/09/07 16:18:10 1.1.1.1 > +++ indxbib.cc 2000/01/17 01:15:59 Uhm... This patch takes Groff off the Vendor branch. It is best we submit this patch to the Groff GNU maintainer and see if he will accept it. -- -- David (obrien@NUXI.com) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message