From 15cb576293b208ecf3c11edc83d06470ba9f1372 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Wed, 10 Jan 2018 01:36:24 +0100 Subject: [PATCH] Fix v3.1 regression in start of inetd services, missing rlimit Per service rlimit is new in v3.1. When an inetd service connection is created we do a selective copy from the parent inetd. We also need to copy the parent's rlimits, otherwise the child will be killed as soon as the kernel starts it. Signed-off-by: Joachim Nilsson --- src/inetd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/inetd.c b/src/inetd.c index cb86890d..de973f88 100644 --- a/src/inetd.c +++ b/src/inetd.c @@ -208,6 +208,7 @@ static void socket_cb(uev_t *w, void *arg, int events) task->inetd.cmd = svc->inetd.cmd; task->inetd.type = svc->inetd.type; + memcpy(task->rlimit, svc->rlimit, sizeof(task->rlimit)); memcpy(task->cond, svc->cond, sizeof(task->cond)); memcpy(task->username, svc->username, sizeof(task->username)); memcpy(task->group, svc->group, sizeof(task->group));