Menu

#28 Don't overwrite multi-linked files: always in code, -P in documentation (OpenBSD rm compat)

1.2.12
closed-fixed
5
2014-01-10
2014-01-06
No

Attempting to secure delete a file with multiple hard links results in a warning from srm stating that the current access path has been unlinked, but the data itself was not overwritten or truncated.

This is erroneously documented in 1.2.11 as a behaviour activated by the OpenBSD rm-compatible option -P. See the srm man page.

However, in the srm implementation, the behaviour of unlinking but not overwriting multi-linked files is always active. See the first few sections of the sunlink function in sunlink.c.

I would expect the code and man page to be consistent.

Discussion

  • Dirk Jagdmann

    Dirk Jagdmann - 2014-01-10

    you are correct. I think however that with multiple hard links srm should only remove the current link and not overwrite. So the solution here is to change the srm man page.

     
    • Tim Wilson-Brown

      Ah, yes, that's what I had in mind…

       
  • Dirk Jagdmann

    Dirk Jagdmann - 2014-01-10
    • status: open --> closed-fixed
    • assigned_to: Dirk Jagdmann
     

Log in to post a comment.