]> git.ipfire.org Git - thirdparty/coreutils.git/commit
chroot: make changing root check more robust
authorPádraig Brady <P@draigBrady.com>
Sun, 18 May 2014 16:20:06 +0000 (17:20 +0100)
committerPádraig Brady <P@draigBrady.com>
Wed, 21 May 2014 10:18:27 +0000 (11:18 +0100)
commit0c4729516baa2fbefb0af66c38f434b1f7519078
tree53401704e3202224cac326298cff134180d65f1e
parentaa1a72706bb9581fc08c63efc3bc03b908407124
chroot: make changing root check more robust

* src/chroot.c (is_root): A new helper function to
determine if the passed argument is the root directory
based on inode comparison.
(main): Use the new helper rather than comparing strings.
* tests/misc/chroot-fail.sh: Add cases for alternative root paths.
src/chroot.c
tests/misc/chroot-fail.sh