From owner-freebsd-audit Mon Dec 16 11: 0:28 2002 Delivered-To: freebsd-audit@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C933E37B401 for ; Mon, 16 Dec 2002 11:00:27 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3456943EC2 for ; Mon, 16 Dec 2002 11:00:27 -0800 (PST) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (peter@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id gBGJ0Rx3020023 for ; Mon, 16 Dec 2002 11:00:27 -0800 (PST) (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id gBGJ0Q0b019999 for audit@freebsd.org; Mon, 16 Dec 2002 11:00:26 -0800 (PST) Date: Mon, 16 Dec 2002 11:00:26 -0800 (PST) Message-Id: <200212161900.gBGJ0Q0b019999@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: peter set sender to owner-bugmaster@freebsd.org using -f From: FreeBSD bugmaster To: audit@FreeBSD.org Subject: Current problem reports assigned to you Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Current FreeBSD problem reports Critical problems Serious problems Non-critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- a [1999/01/28] bin/9770 audit An openpty(3) auxiliary program 1 problem total. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Tue Dec 17 13:25:23 2002 Delivered-To: freebsd-audit@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8F48037B401 for ; Tue, 17 Dec 2002 13:25:22 -0800 (PST) Received: from melusine.cuivre.fr.eu.org (melusine.cuivre.fr.eu.org [62.212.105.185]) by mx1.FreeBSD.org (Postfix) with ESMTP id 078A943ED4 for ; Tue, 17 Dec 2002 13:25:22 -0800 (PST) (envelope-from thomas@freebsd.org) Received: by melusine.cuivre.fr.eu.org (Postfix, from userid 1000) id B59022C3D4; Tue, 17 Dec 2002 22:25:13 +0100 (CET) Date: Tue, 17 Dec 2002 22:25:13 +0100 From: Thomas Quinot To: freebsd-audit@freebsd.org Subject: RELENG_4 loader bug Message-ID: <20021217212513.GA79156@melusine.cuivre.fr.eu.org> Reply-To: thomas@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i X-message-flag: WARNING! Using Outlook can damage your computer. Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Dear -audit folks, Could you please review this patch to the RELENG_4 loader? It fixes kern/46275 (this bug is specific to -stable, I was unable to reproduce it with -current). When the last module in a dependency chain fails to load with EEXIST, an error of 0 must be returned to the caller, or else the whole set of newly-loaded modules will be discarded. Index: module.c =================================================================== RCS file: /home/ncvs/src/sys/boot/common/module.c,v retrieving revision 1.13.2.3 diff -u -r1.13.2.3 module.c --- module.c 12 Jun 2001 15:35:14 -0000 1.13.2.3 +++ module.c 15 Dec 2002 15:09:07 -0000 @@ -369,7 +369,9 @@ if (mod_findmodule(NULL, dmodname) == NULL) { printf("loading required module '%s'\n", dmodname); error = mod_load(dmodname, 0, NULL); - if (error && error != EEXIST) + if (error == EEXIST) + error = 0; + if (error != 0) break; } md = metadata_next(md, MODINFOMD_DEPLIST); -- Thomas.Quinot@Cuivre.FR.EU.ORG To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Tue Dec 17 13:57:59 2002 Delivered-To: freebsd-audit@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A1B8F37B401; Tue, 17 Dec 2002 13:57:57 -0800 (PST) Received: from relay1.intelsat.com (relay1.intelsat.com [164.86.102.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id AF18343EDA; Tue, 17 Dec 2002 13:57:56 -0800 (PST) (envelope-from Michael.Hughes@Intelsat.com) Received: from mailm.adm.intelsat.int ([164.86.32.118]) by relay1.intelsat.com (Post.Office MTA v3.1.2 release (PO203-101c) ID# 0-0U10L2S100) with ESMTP id AAA2814; Tue, 17 Dec 2002 16:54:23 -0500 Received: from admex3.adm.intelsat.int (not verified[164.86.33.21]) by mailm.adm.intelsat.int with MailMarshal (4,2,5,0) id ; Tue, 17 Dec 2002 16:57:49 -0500 Received: by admex3.adm.intelsat.int with Internet Mail Service (5.5.2653.19) id ; Tue, 17 Dec 2002 17:08:15 -0500 Message-ID: From: Michael.Hughes@Intelsat.com To: thomas@freebsd.org, freebsd-audit@freebsd.org Subject: RE: RELENG_4 loader bug Date: Tue, 17 Dec 2002 16:49:37 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Pls take "michael.hughes@intelsat.com" off your distribution. thanks -----Original Message----- From: Thomas Quinot [mailto:thomas@freebsd.org] Sent: Tuesday, 17 December, 2002 4:25 PM To: freebsd-audit@freebsd.org Subject: RELENG_4 loader bug Dear -audit folks, Could you please review this patch to the RELENG_4 loader? It fixes kern/46275 (this bug is specific to -stable, I was unable to reproduce it with -current). When the last module in a dependency chain fails to load with EEXIST, an error of 0 must be returned to the caller, or else the whole set of newly-loaded modules will be discarded. Index: module.c =================================================================== RCS file: /home/ncvs/src/sys/boot/common/module.c,v retrieving revision 1.13.2.3 diff -u -r1.13.2.3 module.c --- module.c 12 Jun 2001 15:35:14 -0000 1.13.2.3 +++ module.c 15 Dec 2002 15:09:07 -0000 @@ -369,7 +369,9 @@ if (mod_findmodule(NULL, dmodname) == NULL) { printf("loading required module '%s'\n", dmodname); error = mod_load(dmodname, 0, NULL); - if (error && error != EEXIST) + if (error == EEXIST) + error = 0; + if (error != 0) break; } md = metadata_next(md, MODINFOMD_DEPLIST); -- Thomas.Quinot@Cuivre.FR.EU.ORG To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message ############################################################ This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Intelsat, Ltd. and its subsidiaries. ############################################################ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Tue Dec 17 23:49:38 2002 Delivered-To: freebsd-audit@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 92B0A37B401; Tue, 17 Dec 2002 23:49:37 -0800 (PST) Received: from mgo.iij.ad.jp (mgo.iij.ad.jp [202.232.15.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5885143ED1; Tue, 17 Dec 2002 23:49:36 -0800 (PST) (envelope-from nagao@iij.ad.jp) Received: from localhost ([192.168.2.111]) by mgo.iij.ad.jp (8.8.8/MGO1.0) with ESMTP id QAA06094; Wed, 18 Dec 2002 16:49:34 +0900 (JST) Date: Wed, 18 Dec 2002 16:49:34 +0900 (JST) Message-Id: <20021218.164934.07610510.nagao@iij.ad.jp> To: thomas@FreeBSD.ORG Cc: freebsd-audit@FreeBSD.ORG Subject: Re: RELENG_4 loader bug From: Tadaaki Nagao In-Reply-To: <20021217212513.GA79156@melusine.cuivre.fr.eu.org> References: <20021217212513.GA79156@melusine.cuivre.fr.eu.org> X-Mailer: Mew version 3.1 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, In "RELENG_4 loader bug", Thomas Quinot wrote: > Could you please review this patch to the RELENG_4 loader? > It fixes kern/46275 (this bug is specific to -stable, I was unable > to reproduce it with -current). > > When the last module in a dependency chain fails to load with EEXIST, > an error of 0 must be returned to the caller, or else the whole > set of newly-loaded modules will be discarded. Could you also take a look at misc/30683, which includes similar patches (but not identical) to fix the problem identical to yours? -- Tadaaki Nagao To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Thu Dec 19 4:49:18 2002 Delivered-To: freebsd-audit@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F108937B401 for ; Thu, 19 Dec 2002 04:49:17 -0800 (PST) Received: from melusine.cuivre.fr.eu.org (melusine.cuivre.fr.eu.org [62.212.105.185]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6508143EC2 for ; Thu, 19 Dec 2002 04:49:17 -0800 (PST) (envelope-from thomas@FreeBSD.ORG) Received: by melusine.cuivre.fr.eu.org (Postfix, from userid 1000) id 7EFEE2C3D1; Thu, 19 Dec 2002 13:49:16 +0100 (CET) Date: Thu, 19 Dec 2002 13:49:16 +0100 From: Thomas Quinot To: Tadaaki Nagao Cc: freebsd-audit@FreeBSD.ORG Subject: Re: RELENG_4 loader bug Message-ID: <20021219124916.GA90084@melusine.cuivre.fr.eu.org> Reply-To: Thomas Quinot References: <20021217212513.GA79156@melusine.cuivre.fr.eu.org> <20021218.164934.07610510.nagao@iij.ad.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20021218.164934.07610510.nagao@iij.ad.jp> User-Agent: Mutt/1.4i X-message-flag: WARNING! Using Outlook can damage your computer. Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Le 2002-12-18, Tadaaki Nagao écrivait : > Could you also take a look at misc/30683, which includes similar patches > (but not identical) to fix the problem identical to yours? Indeed. I have committed the fix I posted here, and closed both PRs. Thanks, Thomas. -- Thomas.Quinot@Cuivre.FR.EU.ORG To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Sat Dec 21 7:35:40 2002 Delivered-To: freebsd-audit@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D98A637B401 for ; Sat, 21 Dec 2002 07:35:35 -0800 (PST) Received: from mail.musha.org (daemon.musha.org [210.189.104.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id D1B0743EE6 for ; Sat, 21 Dec 2002 07:35:34 -0800 (PST) (envelope-from knu@iDaemons.org) Received: from archon.local.idaemons.org (archon.local.idaemons.org [192.168.1.32]) by mail.musha.org (Postfix) with ESMTP id D6240519B2 for ; Sun, 22 Dec 2002 00:35:33 +0900 (JST) Date: Sun, 22 Dec 2002 00:35:34 +0900 Message-ID: <86lm2jjsft.wl@archon.local.idaemons.org> From: "Akinori MUSHA" To: audit@FreeBSD.org Subject: cp -l User-Agent: Wanderlust/2.11.0 (Wonderwall) EMIKO/1.14.1 (Choanoflagellata) LIMIT/1.14.7 (Fujiidera) APEL/10.4 Emacs/21.2 (i386--freebsd) MULE/5.0 (SAKAKI) Organization: Associated I. Daemons X-PGP-Public-Key: finger knu@FreeBSD.org X-PGP-Fingerprint: 081D 099C 1705 861D 4B70 B04A 920B EFC7 9FD9 E1EE MIME-Version: 1.0 (generated by EMIKO 1.14.1 - "Choanoflagellata") Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, What about cp -l a la GNU cp? -- / /__ __ Akinori.org / MUSHA.org / ) ) ) ) / FreeBSD.org / Ruby-lang.org Akinori MUSHA aka / (_ / ( (__( @ iDaemons.org / and.or.jp "I believe in what I see, I believe in what I hear, I believe that what I'm feeling changes how the world appears." Index: cp.1 =================================================================== RCS file: /home/ncvs/src/bin/cp/cp.1,v retrieving revision 1.25 diff -u -r1.25 cp.1 --- cp.1 16 Aug 2002 03:13:59 -0000 1.25 +++ cp.1 16 Nov 2002 22:37:38 -0000 @@ -48,7 +48,7 @@ .Op Fl H | Fl L | Fl P .Oc .Op Fl f | i | n -.Op Fl pv +.Op Fl lpv .Ar source_file target_file .Nm .Oo @@ -56,7 +56,7 @@ .Op Fl H | Fl L | Fl P .Oc .Op Fl f | i | n -.Op Fl pv +.Op Fl lpv .Ar source_file ... target_directory .Sh DESCRIPTION In the first synopsis form, the @@ -141,6 +141,8 @@ or .Fl n options.) +.It Fl l +Link files instead of copying. .It Fl n Do not overwrite an existing file. (The @@ -238,7 +240,8 @@ or fifo's. .Pp The -.Fl v +.Fl v , +.Fl l and .Fl n options are non-standard and their use in scripts is not recommended. Index: cp.c =================================================================== RCS file: /home/ncvs/src/bin/cp/cp.c,v retrieving revision 1.43 diff -u -r1.43 cp.c --- cp.c 18 Oct 2002 14:44:59 -0000 1.43 +++ cp.c 16 Nov 2002 22:20:46 -0000 @@ -86,7 +86,7 @@ PATH_T to = { to.p_path, emptystring, "" }; -int fflag, iflag, nflag, pflag, vflag; +int fflag, iflag, lflag, nflag, pflag, vflag; static int Rflag, rflag; enum op { FILE_TO_FILE, FILE_TO_DIR, DIR_TO_DNE }; @@ -103,7 +103,7 @@ char *target; Hflag = Lflag = Pflag = 0; - while ((ch = getopt(argc, argv, "HLPRfinprv")) != -1) + while ((ch = getopt(argc, argv, "HLPRfilnprv")) != -1) switch (ch) { case 'H': Hflag = 1; @@ -127,6 +127,9 @@ case 'i': iflag = 1; fflag = nflag = 0; + break; + case 'l': + lflag = 1; break; case 'n': nflag = 1; Index: extern.h =================================================================== RCS file: /home/ncvs/src/bin/cp/extern.h,v retrieving revision 1.16 diff -u -r1.16 extern.h --- extern.h 18 Oct 2002 14:44:59 -0000 1.16 +++ extern.h 16 Nov 2002 22:20:39 -0000 @@ -41,7 +41,7 @@ } PATH_T; extern PATH_T to; -extern int fflag, iflag, nflag, pflag, vflag; +extern int fflag, iflag, lflag, nflag, pflag, vflag; __BEGIN_DECLS int copy_fifo(struct stat *, int); Index: utils.c =================================================================== RCS file: /home/ncvs/src/bin/cp/utils.c,v retrieving revision 1.39 diff -u -r1.39 utils.c --- utils.c 18 Oct 2002 14:45:00 -0000 1.39 +++ utils.c 17 Nov 2002 05:32:26 -0000 @@ -70,7 +70,9 @@ char *p; #endif - if ((from_fd = open(entp->fts_path, O_RDONLY, 0)) == -1) { + if (lflag) + from_fd = -1; + else if ((from_fd = open(entp->fts_path, O_RDONLY, 0)) == -1) { warn("%s", entp->fts_path); return (1); } @@ -104,24 +106,35 @@ } } - if (fflag) { + if (fflag || lflag) { /* remove existing destination file name, * create a new file */ (void)unlink(to.p_path); - to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT, - fs->st_mode & ~(S_ISUID | S_ISGID)); + if (lflag) + to_fd = link(entp->fts_path, to.p_path); + else + to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT, + fs->st_mode & ~(S_ISUID | S_ISGID)); } else /* overwrite existing destination file name */ to_fd = open(to.p_path, O_WRONLY | O_TRUNC, 0); - } else - to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT, - fs->st_mode & ~(S_ISUID | S_ISGID)); + } else { + if (lflag) + to_fd = link(entp->fts_path, to.p_path); + else + to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT, + fs->st_mode & ~(S_ISUID | S_ISGID)); + } if (to_fd == -1) { warn("%s", to.p_path); - (void)close(from_fd); + if (from_fd != -1) + (void)close(from_fd); return (1); } + + if (lflag) + return 0; rval = 0; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message From owner-freebsd-audit Sat Dec 21 22:39: 9 2002 Delivered-To: freebsd-audit@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9A50D37B405 for ; Sat, 21 Dec 2002 22:39:07 -0800 (PST) Received: from mail.rpi.edu (mail.rpi.edu [128.113.22.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id EF09E43EE6 for ; Sat, 21 Dec 2002 22:39:06 -0800 (PST) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by mail.rpi.edu (8.12.1/8.12.1) with ESMTP id gBM6d2hg116698; Sun, 22 Dec 2002 01:39:02 -0500 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: <86lm2jjsft.wl@archon.local.idaemons.org> References: <86lm2jjsft.wl@archon.local.idaemons.org> Date: Sun, 22 Dec 2002 01:39:01 -0500 To: "Akinori MUSHA" , audit@FreeBSD.ORG From: Garance A Drosihn Subject: Re: cp -l Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Scanned-By: MIMEDefang 2.3 (www dot roaringpenguin dot com slash mimedefang) Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG At 12:35 AM +0900 12/22/02, Akinori MUSHA wrote: >Hi, > >What about cp -l a la GNU cp? Why would we want this, when we already have the 'ln' command? (I'm not saying we should not do this, I am just wondering what the advantage is) -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message