summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2017-10-06 15:42:53 +0200
committerJan Holesovsky <kendy@collabora.com>2017-10-06 15:42:53 +0200
commit262916363d6e86beb4e40f0e97d19b539c8f5fb6 (patch)
tree330d65bbfd378f0342cd76f64e0610aff6aa4a6c /common
parentMove the language menus one level up. (diff)
downloadonline-262916363d6e86beb4e40f0e97d19b539c8f5fb6.tar.gz
online-262916363d6e86beb4e40f0e97d19b539c8f5fb6.zip
rlimits: The fsize and nofile need more tweaking...
Change-Id: Ifdb4d24f103f54fd286b8ffa715c0a61c2cff94f
Diffstat (limited to 'common')
-rw-r--r--common/Seccomp.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/common/Seccomp.cpp b/common/Seccomp.cpp
index ac57d07143..42922b554f 100644
--- a/common/Seccomp.cpp
+++ b/common/Seccomp.cpp
@@ -272,6 +272,10 @@ bool handleSetrlimitCommand(const std::vector<std::string>& tokens)
if (lim <= 0)
lim = RLIM_INFINITY;
+ /* FIXME Currently the RLIMIT_FSIZE handling is non-ideal, and can
+ * lead to crashes of the kit processes due to not handling signal
+ * 25 gracefully. Let's disable for now before there's a more
+ * concrete plan.
rlimit rlim = { lim, lim };
if (setrlimit(RLIMIT_FSIZE, &rlim) != 0)
LOG_SYS("Failed to set RLIMIT_FSIZE to " << lim << " bytes.");
@@ -280,6 +284,8 @@ bool handleSetrlimitCommand(const std::vector<std::string>& tokens)
LOG_INF("RLIMIT_FSIZE is " << rlim.rlim_max << " bytes after setting it to " << lim << " bytes.");
else
LOG_SYS("Failed to get RLIMIT_FSIZE.");
+ */
+ LOG_SYS("Ignored setting RLIMIT_FSIZE to " << lim << " bytes.");
return true;
}
@@ -289,14 +295,19 @@ bool handleSetrlimitCommand(const std::vector<std::string>& tokens)
if (lim <= 0)
lim = RLIM_INFINITY;
+ /* FIXME Currently the RLIMIT_ is non-ideal, and can lead to
+ * problems. Let's disable for now before there's a more
+ * concrete plan.
rlimit rlim = { lim, lim };
if (setrlimit(RLIMIT_NOFILE, &rlim) != 0)
- LOG_SYS("Failed to set RLIMIT_NOFILE to " << lim << " bytes.");
+ LOG_SYS("Failed to set RLIMIT_NOFILE to " << lim << " files.");
if (getrlimit(RLIMIT_NOFILE, &rlim) == 0)
LOG_INF("RLIMIT_NOFILE is " << rlim.rlim_max << " files after setting it to " << lim << " files.");
else
LOG_SYS("Failed to get RLIMIT_NOFILE.");
+ */
+ LOG_SYS("Ignored setting RLIMIT_NOFILE to " << lim << " files.");
return true;
}