Detecting a chroot jail from within

后端 未结 8 710
名媛妹妹
名媛妹妹 2020-12-24 03:02

How can one detect being in a chroot jail without root privileges? Assume a standard BSD or Linux system. The best I came up with was to look at the inode value for \"/\"

8条回答
  •  眼角桃花
    2020-12-24 03:42

    If you entered the chroot with schroot, then you can check the value of $debian_chroot.

提交回复
热议问题