phylum-dev / birdcage

Cross-platform embeddable sandboxing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement or circumvent `LANDLOCK_ACCESS_FS_REFER` in `rust-landlock`

andreaphylum opened this issue · comments

Currently, renames are prevented by Landlock due to the absence of LANDLOCK_ACCESS_FS_REFER (defined as (1ULL << 13)).

This blocks some omnipresent operations in npm, such as calls to fs.rename that will fail with this counterintuitive (but documented) error:

EXDEV: cross-device link not permitted, link something -> something_else

Can we just add the constant to rust-landlock, or are there other considerations that would make that ineffective?