|
|
Log in / Subscribe / Register

The trouble with symbolic links

The trouble with symbolic links

Posted Jul 8, 2022 2:39 UTC (Fri) by k8to (guest, #15413)
In reply to: The trouble with symbolic links by zaitseff
Parent article: The trouble with symbolic links

I mean the usual solution for something along these lines is not to pass a computed path for later opening but rather open the file and pass that.

But if you want to have a problem have a stable dir it settles on and uses consistently, you've kind of designed a TOCTOU problem into the concept of your program or library. At least with classic system calls.

Of course *at calls allow one to do precisely what I implied. Open the dir, and keep it around for use. With pipe magic you can even eliminate TOCTOU across multiple processes.


to post comments


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds