ujail: add <stdio.h> and <syslog.h> to seccomp.h
[project/procd.git] / jail / preload.c
index 97ac44d..5466f27 100644 (file)
 
 #define _GNU_SOURCE
 #include <sys/types.h>
-#include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
 #include <string.h>
 #include <dlfcn.h>
-#include <syslog.h>
 
 #include "seccomp.h"
 #include "../preload.h"
@@ -27,14 +25,8 @@ static main_t __main__;
 
 static int __preload_main__(int argc, char **argv, char **envp)
 {
-       uid_t uid = getuid();
        char *env_file = getenv("SECCOMP_FILE");
 
-       if (uid) {
-               INFO("preload-seccomp: %s: not root, cannot install seccomp filter\n", *argv);
-               return -1;
-       }
-
        if (install_syscall_filter(*argv, env_file))
                return -1;