diff options
author | Alistair Strachan <alistair.strachan@imgtec.com> | 2015-05-06 15:20:19 -0700 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2015-08-08 16:57:30 -0500 |
commit | 430bf378418e655b06d518a7cd62ae680301af80 (patch) | |
tree | ad5a0364976f57f7210d59f73f0f5b8eb9084b25 /toys/posix/nice.c | |
parent | 5fb2766a9b51ee326a14ec9909066b20a2bfa9ac (diff) | |
download | toybox-430bf378418e655b06d518a7cd62ae680301af80.tar.gz |
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.
Diffstat (limited to 'toys/posix/nice.c')
0 files changed, 0 insertions, 0 deletions