aboutsummaryrefslogtreecommitdiff
path: root/toys/posix/touch.c
diff options
context:
space:
mode:
authorAlistair Strachan <alistair.strachan@imgtec.com>2015-05-06 15:20:19 -0700
committerRob Landley <rob@landley.net>2015-08-08 16:57:30 -0500
commit430bf378418e655b06d518a7cd62ae680301af80 (patch)
treead5a0364976f57f7210d59f73f0f5b8eb9084b25 /toys/posix/touch.c
parent5fb2766a9b51ee326a14ec9909066b20a2bfa9ac (diff)
downloadtoybox-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/touch.c')
0 files changed, 0 insertions, 0 deletions