diff options
author | Fred Barclay <Fred-Barclay@users.noreply.github.com> | 2017-05-24 14:38:01 -0500 |
---|---|---|
committer | Fred Barclay <Fred-Barclay@users.noreply.github.com> | 2017-05-24 14:38:01 -0500 |
commit | 997a93efbdcbbaeed517e0bdc5283e9d8b31f422 (patch) | |
tree | cbb47fb1b41ced351501686e3fdf9aaf46b31414 /test/chroot/unchroot.c | |
parent | Remove trailing whitespace from platform (diff) | |
download | firejail-997a93efbdcbbaeed517e0bdc5283e9d8b31f422.tar.gz firejail-997a93efbdcbbaeed517e0bdc5283e9d8b31f422.tar.zst firejail-997a93efbdcbbaeed517e0bdc5283e9d8b31f422.zip |
strip trailing whitespace from test/
Diffstat (limited to 'test/chroot/unchroot.c')
-rw-r--r-- | test/chroot/unchroot.c | 16 |
1 files changed, 8 insertions, 8 deletions
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) { | |||
13 | int main(int argc, char *argv[]) | 13 | int main(int argc, char *argv[]) |
14 | { | 14 | { |
15 | int i; | 15 | int i; |
16 | 16 | ||
17 | if (chdir("/") != 0) | 17 | if (chdir("/") != 0) |
18 | die("chdir(/)"); | 18 | die("chdir(/)"); |
19 | 19 | ||
20 | if (mkdir("baz", 0777) != 0) | 20 | if (mkdir("baz", 0777) != 0) |
21 | ; //die("mkdir(baz)"); | 21 | ; //die("mkdir(baz)"); |
22 | 22 | ||
23 | if (chroot("baz") != 0) | 23 | if (chroot("baz") != 0) |
24 | die("chroot(baz)"); | 24 | die("chroot(baz)"); |
25 | 25 | ||
26 | for (i=0; i<50; i++) { | 26 | for (i=0; i<50; i++) { |
27 | if (chdir("..") != 0) | 27 | if (chdir("..") != 0) |
28 | die("chdir(..)"); | 28 | die("chdir(..)"); |
29 | } | 29 | } |
30 | 30 | ||
31 | if (chroot(".") != 0) | 31 | if (chroot(".") != 0) |
32 | die("chroot(.)"); | 32 | die("chroot(.)"); |
33 | 33 | ||
34 | printf("Exploit seems to work. =)\n"); | 34 | printf("Exploit seems to work. =)\n"); |
35 | 35 | ||
36 | execl("/bin/bash", "bash", "-i", (char *)0); | 36 | execl("/bin/bash", "bash", "-i", (char *)0); |
37 | die("exec bash"); | 37 | die("exec bash"); |
38 | 38 | ||
39 | exit(0); | 39 | exit(0); |
40 | } | 40 | } |