From owner-cvs-gnu Sun Jun 2 12:59:37 1996 Return-Path: owner-cvs-gnu Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id MAA06635 for cvs-gnu-outgoing; Sun, 2 Jun 1996 12:59:37 -0700 (PDT) Received: (from gpalmer@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id MAA06610; Sun, 2 Jun 1996 12:59:29 -0700 (PDT) Date: Sun, 2 Jun 1996 12:59:29 -0700 (PDT) From: Gary Palmer Message-Id: <199606021959.MAA06610@freefall.freebsd.org> To: CVS-committers, cvs-all, cvs-gnu, cvs-ports Subject: cvs commit: src/gnu/usr.bin/perl/sperl Makefile ports/lang/perl5/patches patch-ab patch-aa src/gnu/usr.bin/perl/perl config.h perl.c Sender: owner-cvs-gnu@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk gpalmer 96/06/02 12:59:28 Modified: gnu/usr.bin/perl/perl config.h perl.c gnu/usr.bin/perl/sperl Makefile lang/perl5/patches patch-aa Added: lang/perl5/patches patch-ab Log: Use setreuid instead of seteuid for permissions management Revision Changes Path 1.8 +4 -2 src/gnu/usr.bin/perl/perl/config.h 1.5 +7 -4 src/gnu/usr.bin/perl/perl/perl.c 1.10 +1 -1 src/gnu/usr.bin/perl/sperl/Makefile 1.4 +46 -34 ports/lang/perl5/patches/patch-aa From owner-cvs-gnu Wed Jun 5 01:48:16 1996 Return-Path: owner-cvs-gnu Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id BAA29762 for cvs-gnu-outgoing; Wed, 5 Jun 1996 01:48:16 -0700 (PDT) Received: from who.cdrom.com (who.cdrom.com [204.216.27.3]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id BAA29705; Wed, 5 Jun 1996 01:47:49 -0700 (PDT) Received: from sovcom.kiae.su (sovcom.kiae.su [144.206.136.1]) by who.cdrom.com (8.6.12/8.6.11) with SMTP id BAA11748 ; Wed, 5 Jun 1996 01:47:05 -0700 Received: by sovcom.kiae.su id AA01503 (5.65.kiae-1 ); Wed, 5 Jun 1996 11:45:09 +0300 Received: by sovcom.KIAE.su (UUMAIL/2.0); Wed, 5 Jun 96 11:45:09 +0300 Received: (from ache@localhost) by astral.msk.su (8.7.5/8.7.3) id MAA00970; Wed, 5 Jun 1996 12:42:50 +0400 (MSD) Message-Id: <199606050842.MAA00970@astral.msk.su> Subject: Re: cvs commit: src/gnu/usr.bin/perl/sperl Makefile ports/lang/perl5/patches patch-ab patch-aa src/gnu/usr.bin/perl/perl config.h p To: gpalmer@freefall.freebsd.org (Gary Palmer) Date: Wed, 5 Jun 1996 12:42:49 +0400 (MSD) Cc: CVS-committers@freefall.freebsd.org, cvs-all@freefall.freebsd.org, cvs-gnu@freefall.freebsd.org, cvs-ports@freefall.freebsd.org In-Reply-To: <199606021959.MAA06610@freefall.freebsd.org> from "Gary Palmer" at "Jun 2, 96 12:59:29 pm" From: =?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?= (aka Andrey A. Chernov, Black Mage) X-Class: Fast X-Mailer: ELM [version 2.4ME+ PL19 (25)] Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-cvs-gnu@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > gpalmer 96/06/02 12:59:28 > > Modified: gnu/usr.bin/perl/perl config.h perl.c > gnu/usr.bin/perl/sperl Makefile > lang/perl5/patches patch-aa > Added: lang/perl5/patches patch-ab > Log: > Use setreuid instead of seteuid for permissions management What is reason of this change? Setreuid have some limitations in comparation with original old BSD implemetation for security reasons. Seteuid is much clear in this sense. -- Andrey A. Chernov : And I rest so composedly, /Now, in my bed, ache@astral.msk.su : That any beholder /Might fancy me dead - http://dt.demos.su/~ache : Might start at beholding me, /Thinking me dead. RELCOM Team,FreeBSD Team : E.A.Poe From "For Annie" 1849 From owner-cvs-gnu Fri Jun 7 21:53:08 1996 Return-Path: owner-cvs-gnu Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id VAA06838 for cvs-gnu-outgoing; Fri, 7 Jun 1996 21:53:08 -0700 (PDT) Received: (from wpaul@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id VAA06824; Fri, 7 Jun 1996 21:52:59 -0700 (PDT) Date: Fri, 7 Jun 1996 21:52:59 -0700 (PDT) From: Bill Paul Message-Id: <199606080452.VAA06824@freefall.freebsd.org> To: CVS-committers, cvs-all, cvs-gnu Subject: cvs commit: src/gnu/usr.bin/ld ld.c Sender: owner-cvs-gnu@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk wpaul 96/06/07 21:52:58 Modified: gnu/usr.bin/ld ld.c Log: Aw c'mon. I'm being driven mad by plenty of other things. I don't need this. Consider the following code: case 'O': output_filename = malloc(strlen(arg)+4); strcpy(output_filename, arg); strcat(output_filename, ".tmp"); real_output_filename = arg; return; The idea here is to malloc() a buffer big enough to hold the name of a supplied file name, plus ".tmp". So we malloc() 'size of filename' bytes plus 4, right? Wrong! ".tmp" is _FIVE_ bytes long! There's a traling '\0' which strcat() gleefully tacks on _outside_ the bounds of the buffer. Result: program corrupts own memory. Program SEGVs at seemingly random times. Bill not like random SEGVs. Bill smash. Know how I found this? I've been trying to bootstrap -current on my 2.1.0-RELEASE machine at work and I couldn't seem to get libc.a built because the linker would intermittently blow chunks while executing things like 'ld -O foo.o -X -r foo.o'. Since this is an initial bootstrap version of ld, it was linked against the 2.1.0 libc, who's malloc() behaves differently than that in -current. Presumeably ld -O doesn't blow up in -current, otherwise someone would have spotted this already. I don't know if this is a bug or a feature. Anyway. I'm changing the strlen(arg)+4 to strlen(arg)+5. Bah. Revision Changes Path 1.34 +2 -2 src/gnu/usr.bin/ld/ld.c From owner-cvs-gnu Sat Jun 8 01:03:15 1996 Return-Path: owner-cvs-gnu Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id BAA01764 for cvs-gnu-outgoing; Sat, 8 Jun 1996 01:03:15 -0700 (PDT) Received: from GndRsh.aac.dev.com (GndRsh.aac.dev.com [198.145.92.241]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id BAA01742; Sat, 8 Jun 1996 01:03:09 -0700 (PDT) Received: (from rgrimes@localhost) by GndRsh.aac.dev.com (8.6.12/8.6.12) id BAA13079; Sat, 8 Jun 1996 01:03:07 -0700 From: "Rodney W. Grimes" Message-Id: <199606080803.BAA13079@GndRsh.aac.dev.com> Subject: Re: cvs commit: src/gnu/usr.bin/ld ld.c To: wpaul@freefall.freebsd.org (Bill Paul) Date: Sat, 8 Jun 1996 01:03:07 -0700 (PDT) Cc: CVS-committers@freefall.freebsd.org, cvs-all@freefall.freebsd.org, cvs-gnu@freefall.freebsd.org In-Reply-To: <199606080452.VAA06824@freefall.freebsd.org> from Bill Paul at "Jun 7, 96 09:52:59 pm" X-Mailer: ELM [version 2.4ME+ PL11 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-cvs-gnu@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > wpaul 96/06/07 21:52:58 > > Modified: gnu/usr.bin/ld ld.c > Log: > Aw c'mon. I'm being driven mad by plenty of other things. I don't > need this. > > Consider the following code: > More ``complete'' fix, use the compiler to do the right thing for you...: #define TMP_EXTENSION ".tmp" ... case 'O': output_filename = malloc(strlen(arg)+sizeof(TMP_EXTENSION)); strcpy(output_filename, arg); strcat(output_filename, TMP_EXTENSION); real_output_filename = arg; return; -- Rod Grimes rgrimes@gndrsh.aac.dev.com Accurate Automation Company Reliable computers for FreeBSD From owner-cvs-gnu Sat Jun 8 01:47:03 1996 Return-Path: owner-cvs-gnu Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id BAA12879 for cvs-gnu-outgoing; Sat, 8 Jun 1996 01:47:03 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id BAA12803; Sat, 8 Jun 1996 01:46:44 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.12/8.6.9) id SAA27094; Sat, 8 Jun 1996 18:41:18 +1000 Date: Sat, 8 Jun 1996 18:41:18 +1000 From: Bruce Evans Message-Id: <199606080841.SAA27094@godzilla.zeta.org.au> To: rgrimes@gndrsh.aac.dev.com, wpaul@freefall.freebsd.org Subject: Re: cvs commit: src/gnu/usr.bin/ld ld.c Cc: CVS-committers@freefall.freebsd.org, cvs-all@freefall.freebsd.org, cvs-gnu@freefall.freebsd.org Sender: owner-cvs-gnu@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >More ``complete'' fix, use the compiler to do the right thing for you...: >#define TMP_EXTENSION ".tmp" >... > case 'O': > output_filename = malloc(strlen(arg)+sizeof(TMP_EXTENSION)); > strcpy(output_filename, arg); > strcat(output_filename, TMP_EXTENSION); > real_output_filename = arg; > return; I'm not sure if naming the string literal is worth the trouble in this case. There are a few more bugs: - the value returned by malloc() isn't checked. - (style consistency) xmalloc() isn't used. - (style consistency) ld seems to use strcpy(str1 + offset, str2) in preference to strcat() or sprintf(). It should probably use sprintf() except where efficiency is important. - (style) there are no spaces before and after the '+'. Bruce From owner-cvs-gnu Sat Jun 8 04:03:54 1996 Return-Path: owner-cvs-gnu Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id EAA23420 for cvs-gnu-outgoing; Sat, 8 Jun 1996 04:03:54 -0700 (PDT) Received: (from bde@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id EAA23284; Sat, 8 Jun 1996 04:03:29 -0700 (PDT) Date: Sat, 8 Jun 1996 04:03:29 -0700 (PDT) From: Bruce Evans Message-Id: <199606081103.EAA23284@freefall.freebsd.org> To: CVS-committers, cvs-all, cvs-sys, cvs-gnu Subject: cvs commit: src/sys/i386/i386 machdep.c src/gnu/usr.bin/gdb/gdb freebsd-nat.c Sender: owner-cvs-gnu@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk bde 96/06/08 04:03:25 Modified: sys/i386/i386 machdep.c gnu/usr.bin/gdb/gdb freebsd-nat.c Log: Stop using the alias `pcb_ptd' for `pcb_tcc.tss_cr3'. Use the (existing) alias `pcb_cr3' instead. That is still one alias too many, but is convenient for me since I've replaced the tss in the pcb by a few scalar variables in the pcb. Revision Changes Path 1.192 +3 -3 src/sys/i386/i386/machdep.c 1.10 +2 -2 src/gnu/usr.bin/gdb/gdb/freebsd-nat.c From owner-cvs-gnu Sat Jun 8 13:19:23 1996 Return-Path: owner-cvs-gnu Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id NAA12652 for cvs-gnu-outgoing; Sat, 8 Jun 1996 13:19:23 -0700 (PDT) Received: (from pst@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id NAA12583; Sat, 8 Jun 1996 13:19:01 -0700 (PDT) Date: Sat, 8 Jun 1996 13:19:01 -0700 (PDT) From: Paul Traina Message-Id: <199606082019.NAA12583@freefall.freebsd.org> To: CVS-committers, cvs-all, cvs-gnu Subject: cvs commit: src/gnu/usr.bin/perl/sperl Makefile src/gnu/usr.bin/perl/perl perl.c Sender: owner-cvs-gnu@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk pst 96/06/08 13:19:00 Branch: gnu/usr.bin/perl/sperl RELENG_2_1_0 gnu/usr.bin/perl/perl RELENG_2_1_0 Modified: gnu/usr.bin/perl/sperl Makefile gnu/usr.bin/perl/perl perl.c Log: Bring in changes from head Revision Changes Path 1.9.4.1 +1 -1 src/gnu/usr.bin/perl/sperl/Makefile 1.4.4.1 +7 -4 src/gnu/usr.bin/perl/perl/perl.c From owner-cvs-gnu Sat Jun 8 13:26:25 1996 Return-Path: owner-cvs-gnu Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id NAA13824 for cvs-gnu-outgoing; Sat, 8 Jun 1996 13:26:25 -0700 (PDT) Received: (from pst@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id NAA13778; Sat, 8 Jun 1996 13:25:56 -0700 (PDT) Date: Sat, 8 Jun 1996 13:25:56 -0700 (PDT) From: Paul Traina Message-Id: <199606082025.NAA13778@freefall.freebsd.org> To: CVS-committers, cvs-all, cvs-gnu Subject: cvs commit: src/gnu/usr.bin/perl/perl config.h Sender: owner-cvs-gnu@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk pst 96/06/08 13:25:55 Branch: gnu/usr.bin/perl/perl RELENG_2_1_0 Modified: gnu/usr.bin/perl/perl config.h Log: Oops...missed one file in the HEAD sync Revision Changes Path 1.7.4.1 +4 -2 src/gnu/usr.bin/perl/perl/config.h