Re:Any sufficiently advanced uninstaller is indistinguishabl...
by tedunangst on Wednesday September 13, 2023 @02:55AM
(#37493107)
Using the same API that lets you move file blocks around at will.
[ Parent
| on HN ]
Re:Any sufficiently advanced uninstaller is indistinguishabl...
by dataflow on Wednesday September 13, 2023 @02:58AM
(#37493118)
Huh? That API requires a file handle. Which you get by opening a file. Which you can't do because you can't find it on the filesystem when it's not there.
Edit: Actually, hmm... see edit above.
Re:Any sufficiently advanced uninstaller is indistinguishabl...
by yrro on Wednesday September 13, 2023 @04:32AM
(#37493851)
While a process still has an unlinked file open, /proc/<pid>/fd can be used to obtain a handle to the file so that you can mess around with it.
Re:Any sufficiently advanced uninstaller is indistinguishabl...
by dataflow on Wednesday September 13, 2023 @04:41AM
(#37493925)
You're suggesting opening every single FD of every single process (which might not even point to a file, let alone a file on that volume) and querying it just to do this? I mean, sure, I guess that's usually not physically impossible (unless e.g. /proc is unavailable/unmounted)... but it's clearly a hack.
Re:Any sufficiently advanced uninstaller is indistinguishabl...
by yrro on Wednesday September 13, 2023 @04:51PM
(#37501549)
No I'm just saying it's possible. I can count on the fingers of 0 hands the number of times I've needed to do this to edit a deleted file out from under a process that has the only reference to an unlinked file open so at least in my experience it's merely acadamic knowledge!