X-Git-Url: http://git.onelab.eu/?p=util-vserver.git;a=blobdiff_plain;f=src%2Fchroot-sh.c;h=a1d4bb990dfbe35fb84a24f8be7eb80a2172b5d5;hp=f8baac3a0abef03bcf0be6557c6296f346bd8deb;hb=2822ba293eb308225c50d346930c47bf98d9927b;hpb=2894fc5a4c8335e4d7221311fed0556f33f8047c diff --git a/src/chroot-sh.c b/src/chroot-sh.c index f8baac3..a1d4bb9 100644 --- a/src/chroot-sh.c +++ b/src/chroot-sh.c @@ -1,4 +1,4 @@ -// $Id: chroot-sh.c 2407 2006-11-25 19:18:06Z dhozac $ --*- c -*-- +// $Id: chroot-sh.c,v 1.2 2005/07/03 17:40:15 ensc Exp $ --*- c -*-- // Copyright (C) 2005 Enrico Scholz // @@ -28,7 +28,7 @@ #include #include -#define ENSC_WRAPPERS_PREFIX "chroot-sh: " +#define ENSC_WRAPPERS_PREFIX "chroot-sh" #define ENSC_WRAPPERS_UNISTD 1 #define ENSC_WRAPPERS_IO 1 #define ENSC_WRAPPERS_FCNTL 1 @@ -85,7 +85,7 @@ testInternal(int argc, char *argv[], char const *operation) return wrapper_exit_code; } - if (stat(argv[1], &st)==-1) return -1; + if (stat(argv[1], &st)==-1) return 0; else return st.st_mode; } @@ -142,55 +142,6 @@ execTestFile(int argc, char *argv[]) return res!=-1 && S_ISREG(res) ? EXIT_SUCCESS : EXIT_FAILURE; } -static int -execMkdir(int argc, char *argv[]) -{ - int i = 1; - int res = EXIT_SUCCESS; - - if (argc<2) { - WRITE_MSG(2, "No files specified for 'mkdir' operation; try '--help' for more information\n"); - return wrapper_exit_code; - } - - for (;i ... appends stdin to which is created when needed\n" " truncate ... clear and fill it with stdin; the is\n" " created when needed\n" - " rm + ... unlink the given files\n" - " mkdir + ... create the given directories\n" - " chmod +\n" - " ... change access permissions of files\n\n" + " rm + ... unlink the given files\n\n" "Please report bugs to " PACKAGE_BUGREPORT "\n"); exit(0); }