aboutsummaryrefslogtreecommitdiffstats
path: root/src/firejail/profile.c
diff options
context:
space:
mode:
authorLibravatar startx2017 <vradu.startx@yandex.com>2017-10-24 12:41:42 -0400
committerLibravatar startx2017 <vradu.startx@yandex.com>2017-10-24 12:41:42 -0400
commite8685de73159e005a84d3e756767c6d2db943e2e (patch)
tree524a0375e4998dfa9a958cf99ae56fb7b4a877bd /src/firejail/profile.c
parentsystemd-resoved fix this time for both Ubuntu and Arch (diff)
downloadfirejail-e8685de73159e005a84d3e756767c6d2db943e2e.tar.gz
firejail-e8685de73159e005a84d3e756767c6d2db943e2e.tar.zst
firejail-e8685de73159e005a84d3e756767c6d2db943e2e.zip
implemented --rlimit-cpu - set max CPU time for processes running in the sandbox; for issue #1614, more to come...
Diffstat (limited to 'src/firejail/profile.c')
-rw-r--r--src/firejail/profile.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/firejail/profile.c b/src/firejail/profile.c
index 622306c22..9f49d7405 100644
--- a/src/firejail/profile.c
+++ b/src/firejail/profile.c
@@ -1022,6 +1022,11 @@ int profile_check_line(char *ptr, int lineno, const char *fname) {
1022 sscanf(ptr + 14, "%llu", &cfg.rlimit_nofile); 1022 sscanf(ptr + 14, "%llu", &cfg.rlimit_nofile);
1023 arg_rlimit_nofile = 1; 1023 arg_rlimit_nofile = 1;
1024 } 1024 }
1025 else if (strncmp(ptr, "rlimit-cpu ", 11) == 0) {
1026 check_unsigned(ptr + 11, "Error: invalid rlimit in profile file: ");
1027 sscanf(ptr + 11, "%llu", &cfg.rlimit_cpu);
1028 arg_rlimit_cpu = 1;
1029 }
1025 else if (strncmp(ptr, "rlimit-nproc ", 13) == 0) { 1030 else if (strncmp(ptr, "rlimit-nproc ", 13) == 0) {
1026 check_unsigned(ptr + 13, "Error: invalid rlimit in profile file: "); 1031 check_unsigned(ptr + 13, "Error: invalid rlimit in profile file: ");
1027 sscanf(ptr + 13, "%llu", &cfg.rlimit_nproc); 1032 sscanf(ptr + 13, "%llu", &cfg.rlimit_nproc);