mirror of
https://github.com/bdnugget/kcgi.git
synced 2026-11-07 05:47:27 +00:00
Allow writing to (for example) a log file opened with kutil_openlog when
using FreeBSD's capsicum.
This commit is contained in:
1 parent
9d2678f0b3
commit
5e21770084
1 file changed
+8
-2
+8
-2
@@ -150,10 +150,16 @@ ksandbox_capsicum_init_worker(int fd1, int fd2)
|
||||
|
||||
rl_zero.rlim_cur = rl_zero.rlim_max = 0;
|
||||
|
||||
if (setrlimit(RLIMIT_NOFILE, &rl_zero) == -1) {
|
||||
#if 0
|
||||
/* Don't run this: if we use openlog, it will fail. */
|
||||
|
||||
if (setrlimit(RLIMIT_FSIZE, &rl_zero) == -1) {
|
||||
kutil_warn(NULL, NULL, "setrlimit");
|
||||
return 0;
|
||||
} else if (setrlimit(RLIMIT_FSIZE, &rl_zero) == -1) {
|
||||
}
|
||||
#endif
|
||||
|
||||
if (setrlimit(RLIMIT_NOFILE, &rl_zero) == -1) {
|
||||
kutil_warn(NULL, NULL, "setrlimit");
|
||||
return 0;
|
||||
} else if (setrlimit(RLIMIT_NPROC, &rl_zero) == -1) {
|
||||
|
||||
Reference in new issue
Block a user