diff options
Diffstat (limited to 'src/firejail/sandbox.c')
-rw-r--r-- | src/firejail/sandbox.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/firejail/sandbox.c b/src/firejail/sandbox.c index cc5483c08..08296d823 100644 --- a/src/firejail/sandbox.c +++ b/src/firejail/sandbox.c | |||
@@ -28,6 +28,8 @@ | |||
28 | #include <sys/types.h> | 28 | #include <sys/types.h> |
29 | #include <dirent.h> | 29 | #include <dirent.h> |
30 | #include <errno.h> | 30 | #include <errno.h> |
31 | #include <sys/ioctl.h> | ||
32 | #include <termios.h> | ||
31 | 33 | ||
32 | #include <sched.h> | 34 | #include <sched.h> |
33 | #ifndef CLONE_NEWUSER | 35 | #ifndef CLONE_NEWUSER |
@@ -80,8 +82,10 @@ static void sandbox_handler(int sig){ | |||
80 | 82 | ||
81 | } | 83 | } |
82 | 84 | ||
85 | |||
83 | // broadcast a SIGKILL | 86 | // broadcast a SIGKILL |
84 | kill(-1, SIGKILL); | 87 | kill(-1, SIGKILL); |
88 | ioctl(0, TCFLSH, TCIFLUSH); | ||
85 | exit(sig); | 89 | exit(sig); |
86 | } | 90 | } |
87 | 91 | ||
@@ -290,6 +294,8 @@ void start_audit(void) { | |||
290 | } | 294 | } |
291 | 295 | ||
292 | void start_application(void) { | 296 | void start_application(void) { |
297 | //if (setsid() == -1) | ||
298 | //errExit("setsid"); | ||
293 | //**************************************** | 299 | //**************************************** |
294 | // audit | 300 | // audit |
295 | //**************************************** | 301 | //**************************************** |
@@ -890,6 +896,7 @@ int sandbox(void* sandbox_arg) { | |||
890 | } | 896 | } |
891 | 897 | ||
892 | int status = monitor_application(app_pid); // monitor application | 898 | int status = monitor_application(app_pid); // monitor application |
899 | ioctl(0, TCFLSH, TCIFLUSH); | ||
893 | 900 | ||
894 | if (WIFEXITED(status)) { | 901 | if (WIFEXITED(status)) { |
895 | // if we had a proper exit, return that exit status | 902 | // if we had a proper exit, return that exit status |