aboutsummaryrefslogtreecommitdiffstats
path: root/src/firejail/no_sandbox.c
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2015-08-24 09:05:18 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2015-08-24 09:05:18 -0400
commit820de6829fedccffb8b3c32f079436fa7e89273e (patch)
treea1e0cf62b892e91d18de28d7459180339c5636d1 /src/firejail/no_sandbox.c
parentprivate-home testing (diff)
downloadfirejail-820de6829fedccffb8b3c32f079436fa7e89273e.tar.gz
firejail-820de6829fedccffb8b3c32f079436fa7e89273e.tar.zst
firejail-820de6829fedccffb8b3c32f079436fa7e89273e.zip
added --env option
Diffstat (limited to 'src/firejail/no_sandbox.c')
-rw-r--r--src/firejail/no_sandbox.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/firejail/no_sandbox.c b/src/firejail/no_sandbox.c
index 9dc01435f..5603974aa 100644
--- a/src/firejail/no_sandbox.c
+++ b/src/firejail/no_sandbox.c
@@ -1,7 +1,27 @@
1/*
2 * Copyright (C) 2014, 2015 Firejail Authors
3 *
4 * This file is part of firejail project
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
1#include "firejail.h" 20#include "firejail.h"
2#include <sys/types.h> 21#include <sys/types.h>
3#include <sys/stat.h> 22#include <sys/stat.h>
4#include <unistd.h> 23#include <unistd.h>
24#include <grp.h>
5 25
6// check process space for kernel processes 26// check process space for kernel processes
7// return 1 if found, 0 if not found 27// return 1 if found, 0 if not found
@@ -112,7 +132,8 @@ void run_no_sandbox(int argc, char **argv) {
112 // start the program in /bin/sh 132 // start the program in /bin/sh
113 fprintf(stderr, "Warning: an existing sandbox was detected. " 133 fprintf(stderr, "Warning: an existing sandbox was detected. "
114 "%s will run without any additional sandboxing features in a /bin/sh shell\n", command); 134 "%s will run without any additional sandboxing features in a /bin/sh shell\n", command);
115 system(command); 135 rv = system(command);
136 (void) rv;
116 if (allocated) 137 if (allocated)
117 free(command); 138 free(command);
118 exit(1); 139 exit(1);