lighttpd/make-setrlimit-warn-not-fatal.patch
wk333 cb35eac102 Update to 1.4.63
(cherry picked from commit ed61801e69a7239cccafd53ca1d0f235c1fe5ae9)
2022-07-30 18:50:23 +08:00

30 lines
990 B
Diff

From 5a257fab511225bbfa56b4f1a8b2bb7085f96478 Mon Sep 17 00:00:00 2001
From: Glenn Strauss <gstrauss@gluelogic.com>
Date: Wed, 8 Dec 2021 18:42:31 -0500
Subject: [PATCH] [core] make setrlimit() warn, not fatal
Origin:https://github.com/lighttpd/lighttpd1.4/commit/5a257fab511225bbfa56b4f1a8b2bb7085f96478
(thx limb)
make setrlimit() issue warning on error, not fatal,
and add suggesting to configure SELinux permissions
---
src/server.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/server.c b/src/server.c
index f2ff7b73..beca364a 100644
--- a/src/server.c
+++ b/src/server.c
@@ -1357,7 +1357,8 @@ static int server_main_setup (server * const srv, int argc, char **argv) {
if (0 != setrlimit(RLIMIT_NOFILE, &rlim)) {
log_perror(srv->errh, __FILE__, __LINE__, "setrlimit()");
- return -1;
+ log_error(srv->errh, __FILE__, __LINE__, "setrlimit() may need root to run once: setsebool -P httpd_setrlimit on");
+ use_rlimit = 0;
}
}