From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 03:42:06 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 7B28916A407 for ; Mon, 30 Oct 2006 03:42:06 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [210.51.165.229]) by mx1.FreeBSD.org (Postfix) with ESMTP id CA2A643D49 for ; Mon, 30 Oct 2006 03:42:04 +0000 (GMT) (envelope-from delphij@delphij.net) Received: from localhost (tarsier.geekcn.org [210.51.165.229]) by tarsier.geekcn.org (Postfix) with ESMTP id 4606CEB397E; Mon, 30 Oct 2006 11:42:03 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([210.51.165.229]) by localhost (mail.geekcn.org [210.51.165.229]) (amavisd-new, port 10024) with ESMTP id ayj2xuzk-SSH; Mon, 30 Oct 2006 11:42:00 +0800 (CST) Received: from [10.217.12.47] (sina152-194.staff.sina.com.cn [61.135.152.194]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTP id 5AA56EB386F; Mon, 30 Oct 2006 11:42:00 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:organization:user-agent:mime-version:to:cc: subject:references:in-reply-to:x-enigmail-version:content-type; b=o0wXxUAWqA3Q9IFFNld6TQ862vKD8lzsW+rhcKMMMNWe4awGMGYorKAAe04Ny7pnB DXyWYBZjcBTcP6vqOoArw== Message-ID: <4545745D.5080008@delphij.net> Date: Mon, 30 Oct 2006 11:41:17 +0800 From: LI Xin Organization: The FreeBSD Project User-Agent: Thunderbird 1.5.0.7 (Macintosh/20060909) MIME-Version: 1.0 To: Joerg Pernfuss References: <20061029222847.GA68272@marvin.astase.com> <20061030003628.42bc5f8d@loki.starkstrom.lan> <00f201c6fbb6$0c6bd150$b3db87d4@multiplay.co.uk> <20061030024358.39a12359@loki.starkstrom.lan> <20061030030636.66af0924@loki.starkstrom.lan> In-Reply-To: <20061030030636.66af0924@loki.starkstrom.lan> X-Enigmail-Version: 0.94.1.0 Content-Type: multipart/signed; micalg=pgp-ripemd160; protocol="application/pgp-signature"; boundary="------------enig0AB80D5AFBC14FC2B4120A08" Cc: freebsd-hackers@freebsd.org 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 03:42:06 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig0AB80D5AFBC14FC2B4120A08 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Joerg Pernfuss wrote: > On Mon, 30 Oct 2006 02:43:58 +0100 > Joerg Pernfuss wrote: >=20 >> That would mean that `rm -P ' with having a link count of= >> at least 2, would behave like `rm ' (and like Romain suggested).= >=20 >=20 > Correction after some `read the frakkin code': >=20 > if (sbp->st_nlink > 1) { > warnx("%s (inode %u): not overwritten due to multiple links", > file, sbp->st_ino); > return (0); > The link is removed, the file is not overwritten and a warning is gener= ated. Yeah I think this is reasonable and thanks y'all for mentioning this. I have just committed a similar patch that is ported from OpenBSD against -HEAD. Cheers, --=20 Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! --------------enig0AB80D5AFBC14FC2B4120A08 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFRXRdOfuToMruuMARA9tqAJ42vUDqcWYSI4/BfnwCAHQmL40o4wCeMAsr DQvbfYCrtQeQozok1ucHFw8= =DUE7 -----END PGP SIGNATURE----- --------------enig0AB80D5AFBC14FC2B4120A08--