aboutsummaryrefslogtreecommitdiff
path: root/src/utils.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/utils.c
parentde7939699e83a35015328371c45d4e3df3b06279 (diff)
POTD skeleton #65.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'src/utils.c')
-rw-r--r--src/utils.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/utils.c b/src/utils.c
index 455b90d..aa65c28 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -76,7 +76,7 @@ static void sighandler_master(int signo)
case SIGINT:
case SIGTERM:
case SIGABRT:
- kill(0, SIGKILL);
+ kill(0, SIGTERM);
exit(EXIT_FAILURE);
}
}
@@ -254,6 +254,11 @@ int change_user_group(const char *user, const char *group)
return 0;
}
+int change_default_user_group(void)
+{
+ return change_user_group("nobody", NULL);
+}
+
int safe_chroot(const char *newroot)
{
int s;