aboutsummaryrefslogtreecommitdiff
path: root/src/redirector.c
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2018-05-20 14:15:40 +0200
committerToni Uhlig <matzeton@googlemail.com>2018-05-20 14:15:40 +0200
commit9c8dc27ee791b24e7325fa065cb57fa9b1339d11 (patch)
tree65826a877e400843315c7265491cd39b920408a8 /src/redirector.c
parentde7939699e83a35015328371c45d4e3df3b06279 (diff)
POTD skeleton #65.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'src/redirector.c')
-rw-r--r--src/redirector.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/redirector.c b/src/redirector.c
index 4a577ca..6d5b216 100644
--- a/src/redirector.c
+++ b/src/redirector.c
@@ -157,6 +157,10 @@ pid_t redirector_daemonize(event_ctx *ev_ctx, redirector_ctx *rdr_ctx[], size_t
W_STRERR("%s", "Server daemonize");
return -1;
case 0:
+ if (change_default_user_group()) {
+ E_STRERR("%s", "Change user/group");
+ return -1;
+ }
N("%s", "Server daemon mainloop");
redirector_mainloop(ev_ctx, rdr_ctx, siz);
break;