removed chrootsafe.cc; such an implementation seems to be impossible...
authorEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Fri, 28 Nov 2003 23:10:09 +0000 (23:10 +0000)
committerEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Fri, 28 Nov 2003 23:10:09 +0000 (23:10 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/branches/SYSCALL_SWITCH@450 94cd875c-1c1d-0410-91d2-eb244daf1a30

util-vserver/tests/Makefile-files
util-vserver/tests/chrootsafe.cc [deleted file]

index f4b4331..2145465 100644 (file)
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 ##  
 
-test_PRGS              =  tests/chrootsafe \
-                          tests/escaperoot \
+test_PRGS              =  tests/escaperoot \
                           tests/forkbomb \
                           tests/testipc \
                           tests/testlimit \
                           tests/testopenf
 
-tests_chrootsafe_SOURCES       =  tests/chrootsafe.cc
-tests_chrootsafe_LDADD         =  lib/libvserver.a
-
 tests_escaperoot_SOURCES       =  tests/escaperoot.cc
 tests_forkbomb_SOURCES         =  tests/forkbomb.cc
 tests_testipc_SOURCES          =  tests/testipc.cc
diff --git a/util-vserver/tests/chrootsafe.cc b/util-vserver/tests/chrootsafe.cc
deleted file mode 100644 (file)
index 9a5d333..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-// $Id$    --*- c++ -*--
-
-// Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
-// based on tests/chrootsafe.cc by Jacques Gelinas
-//  
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//  
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//  
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-/*
-       Test the chrootsafe command.
-       Pass the path of a vserver as the only argument
-
-       chrootsafe /vservers/test
-*/
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-#include "compat.h"
-
-#include <stdio.h>
-#include <string.h>
-#include <fcntl.h>
-#include <pwd.h>
-#include <grp.h>
-#include <errno.h>
-#include <unistd.h>
-#include <stdlib.h>
-
-#include "vserver.h"
-
-int main (int, char *argv[])
-{
-       // This test must fail
-       int fd = open ("/",O_RDONLY);
-       if (fd != -1){
-               if (vc_chrootsafe(argv[1])==-1){
-                       fprintf (stderr,"Ok, chrootsafe failed with one open directory errno=%s\n",strerror(errno));
-               }else{
-                       fprintf (stderr,"Hum, chrootsafe succeed with one open directory\n");
-                       system ("/bin/sh");
-               }
-               close (fd);
-       }
-       // Now it should work
-       if (vc_chrootsafe(argv[1])!=-1){
-               fprintf (stderr,"Ok, chrootsafe worked\n");
-               system ("/bin/sh");
-       }else{
-               fprintf (stderr,"chrootsafe failed errno=%s\n",strerror(errno));
-       }
-       return 0;
-}      
-