diff options
Diffstat (limited to 'src/firejail/main.c')
-rw-r--r-- | src/firejail/main.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/firejail/main.c b/src/firejail/main.c index fef333601..04900d6f9 100644 --- a/src/firejail/main.c +++ b/src/firejail/main.c | |||
@@ -67,6 +67,7 @@ char *arg_caps_list = NULL; // optional caps list | |||
67 | 67 | ||
68 | int arg_trace = 0; // syscall tracing support | 68 | int arg_trace = 0; // syscall tracing support |
69 | int arg_tracelog = 0; // blacklist tracing support | 69 | int arg_tracelog = 0; // blacklist tracing support |
70 | int arg_rlimit_cpu = 0; // rlimit max cpu time | ||
70 | int arg_rlimit_nofile = 0; // rlimit nofile | 71 | int arg_rlimit_nofile = 0; // rlimit nofile |
71 | int arg_rlimit_nproc = 0; // rlimit nproc | 72 | int arg_rlimit_nproc = 0; // rlimit nproc |
72 | int arg_rlimit_fsize = 0; // rlimit fsize | 73 | int arg_rlimit_fsize = 0; // rlimit fsize |
@@ -1259,6 +1260,11 @@ int main(int argc, char **argv) { | |||
1259 | arg_trace = 1; | 1260 | arg_trace = 1; |
1260 | else if (strcmp(argv[i], "--tracelog") == 0) | 1261 | else if (strcmp(argv[i], "--tracelog") == 0) |
1261 | arg_tracelog = 1; | 1262 | arg_tracelog = 1; |
1263 | else if (strncmp(argv[i], "--rlimit-cpu=", 13) == 0) { | ||
1264 | check_unsigned(argv[i] + 13, "Error: invalid rlimit"); | ||
1265 | sscanf(argv[i] + 13, "%llu", &cfg.rlimit_cpu); | ||
1266 | arg_rlimit_cpu = 1; | ||
1267 | } | ||
1262 | else if (strncmp(argv[i], "--rlimit-nofile=", 16) == 0) { | 1268 | else if (strncmp(argv[i], "--rlimit-nofile=", 16) == 0) { |
1263 | check_unsigned(argv[i] + 16, "Error: invalid rlimit"); | 1269 | check_unsigned(argv[i] + 16, "Error: invalid rlimit"); |
1264 | sscanf(argv[i] + 16, "%llu", &cfg.rlimit_nofile); | 1270 | sscanf(argv[i] + 16, "%llu", &cfg.rlimit_nofile); |