Hacker News new | ask | show | jobs
by nesarkvechnep 494 days ago
Why would it use `chroot`? Combined with a sandboxing facility, like Capsicum, you can open a directory before entering capability mode and later, you use `os.Root` to open files in the file system tree under the opened directory.
1 comments

> Why would it use `chroot`?

I am not sure, is this custom Os.Root implementation good enough to relay on it? I see that it is based on openat, and validation of paths/symlinks. But should we expect CVEs, which will break this protection layer?

Let me get my crystal ball.