diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-11-17 11:55:27 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-11-20 10:30:24 +0100 |
commit | fa028bb2ef1e3cd9a8dfdd8b557e5acda3e11505 (patch) | |
tree | e114dddd79c06902df5d24e627fe41a789ca70fb /testsuites/samples | |
parent | 373ccbb93887c95e7923f31461471ad57f8fd180 (diff) |
shell: Do chroot() after successful login
Diffstat (limited to 'testsuites/samples')
-rw-r--r-- | testsuites/samples/fileio/init.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/testsuites/samples/fileio/init.c b/testsuites/samples/fileio/init.c index 1c6c88c6a6..4dd00ed7a7 100644 --- a/testsuites/samples/fileio/init.c +++ b/testsuites/samples/fileio/init.c @@ -636,9 +636,14 @@ static void fileio_start_shell(void) printf( "mkdir /etc: %s:\n", strerror(errno) ); } + sc = mkdir("/chroot", 0777); + if ( sc ) { + printf( "mkdir /chroot: %s:\n", strerror(errno) ); + } + printf( "Creating /etc/passwd and group with three useable accounts\n" - "root/pwd , test/pwd, rtems/NO PASSWORD" + "root/pwd , test/pwd, rtems/NO PASSWORD, chroot/NO PASSWORD" ); writeFile( @@ -649,6 +654,7 @@ static void fileio_start_shell(void) "rtems::1:1:RTEMS Application::/:/bin/sh\n" "test:$1$$oPu1Xt2Pw0ngIc7LyDHqu1:2:2:test account::/:/bin/sh\n" "tty:*:3:3:tty owner::/:/bin/false\n" + "chroot::4:2:chroot account::/chroot:/bin/sh\n" ); writeFile( "/etc/group", |