diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2018-05-19 17:36:57 +0200 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2018-05-19 17:36:57 +0200 |
commit | 84d818f280f3a398fc91ca82699bc380d37d99cf (patch) | |
tree | eda5dd74cc99e43fa8320d1ec30b41fb2c5c3d47 /src/main.c | |
parent | f48123bfaa46f5c93fe4b56423c6b52153e5c9b1 (diff) |
POTD skeleton #62.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -2,6 +2,7 @@ #include <sys/types.h> #include <sys/wait.h> +#include "pseccomp.h" #include "capabilities.h" #include "log.h" #include "log_colored.h" @@ -34,11 +35,14 @@ int main(int argc, char *argv[]) (void) argc; (void) argv; arg0 = argv[0]; - caps_default_filter(); LOG_SET_FUNCS_VA(LOG_COLORED_FUNCS); N("%s (C) 2018 Toni Uhlig (%s)", PACKAGE_STRING, PACKAGE_BUGREPORT); + pseccomp_init(); + pseccomp_set_immutable(); + caps_default_filter(); + D("%s", "Forking into background/foreground"); daemon_pid = daemonize(1); ABORT_ON_FATAL( daemon_pid > 0, "Forking" ); |