|author||Alistair Strachan <firstname.lastname@example.org>||Wed May 06 15:20:19 2015 -0700|
|committer||Rob Landley <email@example.com>||Sat Aug 08 16:57:30 2015 -0500|
Fix switch_root implementation. Add the MS_MOVE of cwd to / and chroot into it. chdir is also called to ensure cwd does not point outside the chroot. The switch_root toy was also blocking any case where NEW_ROOT/init did not exist, even though NEW_INIT was a required parameter and did not have to be '/init'. Change it to handle any NEW_INIT passed as either a relative or absolute path. With this change, the switch_root toy actually works from initramfs.