fixed do-display-dir behavior
[util-vserver.git] / util-vserver / src / capchroot.c
index 740a69c..45a6c80 100644 (file)
@@ -37,7 +37,6 @@
 #include <stdbool.h>
 #include <stdlib.h>
 
-#include "linuxcaps.h"
 #include "vserver.h"
 
 int main (int argc, char *argv[])
@@ -74,7 +73,7 @@ int main (int argc, char *argv[])
                // and also a security flaw. The shared objects in the vserver
                // may be tweaked to get control of the root server ...
                getpwnam ("root");
-               if (vc_chrootsafe (argv[dir]) == -1){
+               if (chroot(argv[dir]) == -1){
                        fprintf (stderr,"Can't chroot to directory %s (%s)\n",argv[dir]
                                ,strerror(errno));
                }else{
@@ -82,7 +81,7 @@ int main (int argc, char *argv[])
                        int cmd          = dir + 1;
 
                        if (nochroot){
-                               vc_new_s_context (-2,1<<CAP_SYS_CHROOT,0);
+                               vc_new_s_context (-2,1<<VC_CAP_SYS_CHROOT,0);
                        }
 
                        if (uid != NULL && strcmp(uid,"root")!=0){