From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 02:15:38 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 378CD16A407 for ; Mon, 30 Oct 2006 02:15:38 +0000 (UTC) (envelope-from elessar@bsdforen.de) Received: from mail.bsdforen.de (bsdforen.de [212.204.60.79]) by mx1.FreeBSD.org (Postfix) with ESMTP id B88B143D46 for ; Mon, 30 Oct 2006 02:15:37 +0000 (GMT) (envelope-from elessar@bsdforen.de) Received: from localhost (mail [127.0.0.12]) by mail.bsdforen.de (Postfix) with ESMTP id C18174241C8; Mon, 30 Oct 2006 03:15:36 +0100 (CET) X-Virus-Scanned: amavisd-new at bsdforen.de Received: from mail.bsdforen.de ([127.0.0.12]) by localhost (mail.bsdforen.de [127.0.0.12]) (amavisd-new, port 10024) with ESMTP id 5UU-wuwdfGsy; Mon, 30 Oct 2006 03:15:36 +0100 (CET) Received: from loki.starkstrom.lan (p549CE7DE.dip.t-dialin.net [84.156.231.222]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.bsdforen.de (Postfix) with ESMTP id 90E39423DE4; Mon, 30 Oct 2006 03:15:35 +0100 (CET) Date: Mon, 30 Oct 2006 03:15:33 +0100 From: Joerg Pernfuss To: freebsd-hackers@freebsd.org Message-ID: <20061030031533.44737ff4@loki.starkstrom.lan> In-Reply-To: <200610301230.03595.doconnor@gsoft.com.au> References: <20061029222847.GA68272@marvin.astase.com> <20061030003628.42bc5f8d@loki.starkstrom.lan> <200610301230.03595.doconnor@gsoft.com.au> X-Mailer: Sylpheed-Claws 2.2.3 (GTK+ 2.8.20; i386-portbld-freebsd6.1) Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_NbWjanV+I21JwvITsVlP/8C"; protocol="application/pgp-signature"; micalg=PGP-SHA1 Cc: Subject: Re: [patch] rm can have undesired side-effects X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Oct 2006 02:15:38 -0000 --Sig_NbWjanV+I21JwvITsVlP/8C Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Mon, 30 Oct 2006 12:30:02 +1030 "Daniel O'Connor" wrote: > > Silently ignoring user specified options is seldom a good way to go. > > The user explicitly stated he wants to wipe the file contents. >=20 > I disagree that the user really meant to wipe the file if its link > count is >1. That of course may or may not be true. I still do not like the 'silent' part. > IMO having rm -P not wipe the file if its link count is >1 is a good > idea. if you are deleting a tree containing a file with links then > this will result in the file getting wiped in the end anyway because > the link count will be 1 after the first link is removed. >=20 > It would be easy enough to add a diagnostic message in the -P case > where the link count is >1. Yes, see my other mails. Bahviour similar to OpenBSD (don't overwrite, generate warning, unlink) is probably what should be done. The pitfall may really be too big. Joerg --=20 | /"\ ASCII ribbon | GnuPG Key ID | e86d b753 3deb e749 6c3a | | \ / campaign against | 0xbbcaad24 | 5706 1f7d 6cfd bbca ad24 | | X HTML in email | .the next sentence is true. | | / \ and news | .the previous sentence was a lie. | --Sig_NbWjanV+I21JwvITsVlP/8C Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (FreeBSD) iD8DBQFFRWBFH31s/bvKrSQRAr+GAJ0ZndfK8Ud6Cjxy1tTtld8Z2bt22gCfZruz H3R6AC2oOHDBN+ktJ1kYr6k= =vOut -----END PGP SIGNATURE----- --Sig_NbWjanV+I21JwvITsVlP/8C--