Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Oct 2006 11:41:17 +0800
From:      LI Xin <delphij@delphij.net>
To:        Joerg Pernfuss <elessar@bsdforen.de>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: [patch] rm can have undesired side-effects
Message-ID:  <4545745D.5080008@delphij.net>
In-Reply-To: <20061030030636.66af0924@loki.starkstrom.lan>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <elessar@bsdforen.de> wrote:
>=20
>> That would mean that `rm -P <file>' with <file> having a link count of=

>> at least 2, would behave like `rm <file>' (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 <delphij@delphij.net>	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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4545745D.5080008>