Skip to content

Commit dbef490

Browse files
new-sashok724Сашка724ая
authored and
Сашка724ая
committed
common: fix unshare chroot /dev symlinks
Fixes invalid symlink paths for /dev/fd, /dev/stderr, /dev/stdin, /dev/stdout in arch-chroot when run in unshare mode. Signed-off-by: Aleksandr Ksenofontov <[email protected]>
1 parent a5b772d commit dbef490

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

common

+4-4
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ unshare_setup() {
6767
chroot_add_mount_lazy "$1" "$1" --bind &&
6868
chroot_add_mount proc "$1/proc" -t proc -o nosuid,noexec,nodev &&
6969
chroot_add_mount_lazy /sys "$1/sys" --rbind &&
70-
chroot_add_link "$1/proc/self/fd" "$1/dev/fd" &&
71-
chroot_add_link "$1/proc/self/fd/0" "$1/dev/stdin" &&
72-
chroot_add_link "$1/proc/self/fd/1" "$1/dev/stdout" &&
73-
chroot_add_link "$1/proc/self/fd/2" "$1/dev/stderr" &&
70+
chroot_add_link /proc/self/fd "$1/dev/fd" &&
71+
chroot_add_link /proc/self/fd/0 "$1/dev/stdin" &&
72+
chroot_add_link /proc/self/fd/1 "$1/dev/stdout" &&
73+
chroot_add_link /proc/self/fd/2 "$1/dev/stderr" &&
7474
chroot_bind_device /dev/full "$1/dev/full" &&
7575
chroot_bind_device /dev/null "$1/dev/null" &&
7676
chroot_bind_device /dev/random "$1/dev/random" &&

0 commit comments

Comments
 (0)