added Vector_zeroEnd() function
[util-vserver.git] / util-vserver / src / chcontext.c
index 6102aa6..4da51d9 100644 (file)
@@ -40,6 +40,7 @@
 #include <assert.h>
 #include <fcntl.h>
 #include <libgen.h>
+#include <signal.h>
 
 #define ENSC_WRAPPERS_PREFIX   "chcontext: "
 #define ENSC_WRAPPERS_VSERVER  1
@@ -206,7 +207,7 @@ setFlags(char const *str, uint32_t *flags)
 {
   struct vc_err_listparser     err;
   
-  *flags = vc_list2flag_compat(str, 0, &err);
+  *flags = vc_list2cflag_compat(str, 0, &err);
 
   if (err.ptr!=0) {
     WRITE_MSG(2, "Unknown flag '");
@@ -283,7 +284,8 @@ int main (int argc, char *argv[])
   pid_t                pid;
   
   global_args = &args;
-  
+  signal(SIGCHLD, SIG_DFL);
+
   while (1) {
     int                c = getopt_long(argc, argv, "+", CMDLINE_OPTIONS, 0);
     if (c==-1) break;
@@ -300,7 +302,7 @@ int main (int argc, char *argv[])
        setCap(optarg, &args.add_caps, &args.remove_caps);
        break;
       case CMD_SECURE          :
-       args.remove_caps |= vc_get_insecurecaps();
+       args.remove_caps |= vc_get_insecurebcaps();
        break;
       case CMD_FLAG            :
        setFlags(optarg, &args.flags);