[patch] rm can have undesired side-effects
Joerg Pernfuss
elessar at bsdforen.de
Mon Oct 30 02:06:43 UTC 2006
On Mon, 30 Oct 2006 02:43:58 +0100
Joerg Pernfuss <elessar at 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
--
| /"\ 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. |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20061030/1cd248a0/signature.pgp
More information about the freebsd-hackers
mailing list