You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ fakeroot fakechroot chroot /tmp/test-chroot/ cat /link1
cat: /link1: No such file or directory
$ fakeroot fakechroot chroot /tmp/test-chroot/ cat /link2
foo
$ fakeroot fakechroot chroot /tmp/test-chroot/ cat /link3
bar
/link1 should've been resolved correctly, because /tmp/bar exists in
/tmp/test-chroot. /link2 should not have resolved because /tmp/foo only
exists outside the chroot. /link3 should not have been resolved either
because /tmp/test-chroot/tmp/bar is only visible like that from outside
the chroot. To check:
$ sudo chroot /tmp/test-chroot/ cat /link1
bar
$ sudo chroot /tmp/test-chroot/ cat /link2
cat: /link2: No such file or directory
$ sudo chroot /tmp/test-chroot/ cat /link3
cat: /link3: No such file or directory
Third test: cat files
$ fakeroot fakechroot chroot /tmp/test-chroot/ cat /tmp/bar
bar
$ fakeroot fakechroot chroot /tmp/test-chroot/ cat /tmp/foo
cat: /tmp/foo: No such file or directory
$ fakeroot fakechroot chroot /tmp/test-chroot/ cat /tmp/test-chroot/tmp/bar
cat: /tmp/test-chroot/tmp/bar: No such file or directory
all works as expected
$ sudo chroot /tmp/test-chroot/ cat /tmp/bar
bar
$ sudo chroot /tmp/test-chroot/ cat /tmp/foo
cat: /tmp/foo: No such file or directory
$ sudo chroot /tmp/test-chroot/ cat /tmp/test-chroot/tmp/bar
cat: /tmp/test-chroot/tmp/bar: No such file or directory
As a result I suspect there is something wrong with readlink and open?
Hope all this helps a bit to fix the issue.
cheers, josch
The text was updated successfully, but these errors were encountered:
Following test setup:
First test: readlink
The third link should read /tmp/test-chroot/tmp/bar as it was created
like that. To check:
Second test: cat links
/link1 should've been resolved correctly, because /tmp/bar exists in
/tmp/test-chroot. /link2 should not have resolved because /tmp/foo only
exists outside the chroot. /link3 should not have been resolved either
because /tmp/test-chroot/tmp/bar is only visible like that from outside
the chroot. To check:
Third test: cat files
all works as expected
As a result I suspect there is something wrong with readlink and open?
Hope all this helps a bit to fix the issue.
cheers, josch
The text was updated successfully, but these errors were encountered: