3 ms·
PR_SET_NO_NEW_PRIVS was added in Linux 3.5 chroot() is from ancient Unix/BSD times and was in Linux since pretty much the beginning of Linux. Changing its beh
by st_goliath 6y ago
PR_SET_NO_NEW_PRIVS was added in Linux 3.5
chroot() is from ancient Unix/BSD times and was in Linux since pretty much the beginning of Linux.
Changing its behavior after the fact would break expected behavior of existing programs AND would break compatibility with other Unixen.
- totetsu 6y agoUnixen, is that german?
- st_goliath 6y agoInteresting. According to the German Wiktionary, yes. Back in high school (in Austria, speaking German) I've been told several times by a Unix grey beard I had as a teacher that "Unixen" is the preferred plural of Unix, similar to "VAXen" for VAX, which the English Wiktionary does seem to know about.
- whizzter 6y agoYes, it'd break compatibility, but mostly compatibility of components added after chroot if I'm not mistaken? Would escaping chroot and/or rooting by tampering with /bin/su(-do) have been possible on these older unices?
- st_goliath 6y agoThose problems were known before Linux was a thing, which is part of the reasons only root was historically allowed to do a chroot(). Even Unix v7 insists on chroot() being only called by the root user (the chroot syscall is in /usr/sys/sys/sys4.c).