From 997a93efbdcbbaeed517e0bdc5283e9d8b31f422 Mon Sep 17 00:00:00 2001 From: Fred Barclay Date: Wed, 24 May 2017 14:38:01 -0500 Subject: strip trailing whitespace from test/ --- test/chroot/fs_chroot.exp | 1 - test/chroot/unchroot-as-root.exp | 1 - test/chroot/unchroot.c | 16 ++++++++-------- 3 files changed, 8 insertions(+), 10 deletions(-) (limited to 'test/chroot') diff --git a/test/chroot/fs_chroot.exp b/test/chroot/fs_chroot.exp index 2190db359..a071027e5 100755 --- a/test/chroot/fs_chroot.exp +++ b/test/chroot/fs_chroot.exp @@ -59,4 +59,3 @@ after 100 puts "all done\n" - diff --git a/test/chroot/unchroot-as-root.exp b/test/chroot/unchroot-as-root.exp index 9f8a1d784..e4bedd539 100755 --- a/test/chroot/unchroot-as-root.exp +++ b/test/chroot/unchroot-as-root.exp @@ -24,4 +24,3 @@ expect { after 100 puts "all done\n" - diff --git a/test/chroot/unchroot.c b/test/chroot/unchroot.c index 1982e07f3..4919637d6 100644 --- a/test/chroot/unchroot.c +++ b/test/chroot/unchroot.c @@ -13,28 +13,28 @@ void die(char *msg) { int main(int argc, char *argv[]) { int i; - + if (chdir("/") != 0) die("chdir(/)"); - + if (mkdir("baz", 0777) != 0) ; //die("mkdir(baz)"); - + if (chroot("baz") != 0) die("chroot(baz)"); - + for (i=0; i<50; i++) { if (chdir("..") != 0) die("chdir(..)"); } - + if (chroot(".") != 0) die("chroot(.)"); - + printf("Exploit seems to work. =)\n"); - + execl("/bin/bash", "bash", "-i", (char *)0); die("exec bash"); - + exit(0); } -- cgit v1.2.3-54-g00ecf