proot-me / proot-rs

Rust implementation of PRoot, a ptrace-based sandbox
GNU General Public License v3.0
124 stars 21 forks source link

A call to unshare(CLONE_FS) from tracee may break the emulation of cwd. #42

Open imlk0 opened 3 years ago

imlk0 commented 3 years ago

According to the unshare(2) man page:

A call to unshare(CLONE_FS) will:

       CLONE_FS
              Reverse the effect of the clone(2) CLONE_FS flag.  Unshare
              filesystem attributes, so that the calling process no
              longer shares its root directory (chroot(2)), current
              directory (chdir(2)), or umask (umask(2)) attributes with
              any other process.

There is no handling of unshare() by proot-rs yet, so I have documented it here.

oxr463 commented 3 years ago

Per our conversation on Gitter,

This doesn't seem to have much impact at the moment, if have extra time I'll try to fix it.

I've removed it from the milestone for now.