ioi/isolate

isolate doesn't use passed home dir if ran from su

shadowninja55 opened this issue · 2 comments

steps:
su
isolate --init
isolate --dir=/home/foo/bar --env=HOME=/box --run /bin/ls ~/bar

result:
/bin/ls: cannot access '/root/bar': No such file or directory

it also seems that even if i hardcode in /box/bar to the ls part the directory is still not there. so perhaps it's neither mouting nor setting HOME.

The ~/bar is expanded by the shell from which you run isolate.

/box/bar should not contain the home directory, it should be visiable as /home/foo/bar inside the sandbox.

ah, that was the issue, thanks a lot!