libpathrs icon indicating copy to clipboard operation
libpathrs copied to clipboard

[rfc] supporting non-Linux unix platforms

Open cyphar opened this issue 8 months ago • 1 comments

Initially the plan was for libpathrs to only support Linux but given that umoci supports non-Linux operating systems, it might make sense to have an O_PATH resolver that works on non-Linux systems.

We can take a leaf out of the os.Root book and implement safe .. lookups by re-evaluating all path components from the root each time we hit .. (which avoids the risk of rename attacks at the cost of making lookups O(n^2)).

The main issue is that we cannot easily implement re-opening semantics on non-Linux platforms as far as I can see. In principle we could not provide that API on non-Linux platforms but it would be unfortunate since I expect a fair number of users to use those APIs... (Though now that we have one-shot opening maybe we can do without it.)

cyphar avatar Apr 25 '25 11:04 cyphar