From d520929586ee2063d48359aaaef8f28807604cae Mon Sep 17 00:00:00 2001 From: Pádraig Brady
Date: Wed, 15 Oct 2014 18:08:42 +0100 Subject: chroot: call chroot() unconditionally to handle bind mounted "/" * src/chroot.c (is_root): Adjust to compare canonicalized paths rather than inodes, to handle (return false in) the case where we have a tree that is constructed by first bind mounting "/" (thus having the same inode). (main): Unconditionally call chroot() because it's safer and of minimal performance benefit to avoid in this case. This will cause inconsistency with some platforms not allowing `chroot / true` for non root users. * tests/misc/chroot-fail.sh: Adjust appropriately. * NEWS: Mention the bug fixes. Fixes http://bugs.gnu.org/18736 --- NEWS | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'NEWS') diff --git a/NEWS b/NEWS index 52332bd11..5fbdc6a4f 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,11 @@ GNU coreutils NEWS -*- outline -*- dd supports more robust SIGINFO/SIGUSR1 handling for outputting statistics. Previously those signals may have inadvertently terminated the process. + chroot again calls chroot(DIR) and chdir("/"), even if DIR is "/". + This handles separate bind mounted "/" trees, and environments + depending on the implicit chdir("/"). + [bugs introduced in coreutils-8.23] + cp no longer issues an incorrect warning about directory hardlinks when a source directory is specified multiple times. Now, consistent with other file types, a warning is issued for source directories with duplicate names, @@ -25,12 +30,6 @@ GNU coreutils NEWS -*- outline -*- dd accepts a new status=progress level to print data transfer statistics on stderr approximately every second. -** Changes in behavior - - chroot changes the current directory to "/" in again - unless the above new - --skip-chdir option is specified. - [bug introduced in coreutils-8.23] - ** Improvements cp,install,mv will convert smaller runs of NULs in the input to holes, -- cgit v1.2.3-70-g09d2