Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Oct 2006 03:06:36 +0100
From:      Joerg Pernfuss <elessar@bsdforen.de>
To:        <freebsd-hackers@freebsd.org>
Subject:   Re: [patch] rm can have undesired side-effects
Message-ID:  <20061030030636.66af0924@loki.starkstrom.lan>
In-Reply-To: <20061030024358.39a12359@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>

next in thread | previous in thread | raw e-mail | index | archive | help
--Sig_apcFppHl5NtD1txbFPDNdOe
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

On Mon, 30 Oct 2006 02:43:58 +0100
Joerg Pernfuss <elessar@bsdforen.de> wrote:

> 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).


Correction after some `read the frakkin code':

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 generated.

	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_apcFppHl5NtD1txbFPDNdOe
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (FreeBSD)

iD8DBQFFRV4tH31s/bvKrSQRAs0oAJ44a4wPbXkdB2Ueie0dxuyCIAKGBwCfbrGo
7ZkP51EAAeWm8c5mrN1aXEc=
=+La/
-----END PGP SIGNATURE-----

--Sig_apcFppHl5NtD1txbFPDNdOe--



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