Index: NEWS =================================================================== RCS file: /cvsroot/util-vserver/util-vserver/NEWS,v retrieving revision 1.1.2.1.2.10 diff -u -p -I$Id: -r1.1.2.1.2.10 NEWS --- NEWS 11 Feb 2004 21:06:17 -0000 1.1.2.1.2.10 +++ NEWS 20 Feb 2004 19:55:09 -0000 @@ -1,3 +1,13 @@ +Version 0.30 +============ + + - BUGFIX: vlimit: fixed communication with kernel so that it + should work now. Output of this tools has been enhanced too. + + - BUGFIX: fixed off-by-one error when setting ipv4root; now the + full 16 IPs can be specified instead of 15 formerly + + Version 0.29 ============ Index: configure.ac =================================================================== RCS file: /cvsroot/util-vserver/util-vserver/configure.ac,v retrieving revision 1.1.2.1.2.31 retrieving revision 1.1.2.1.2.33 diff -u -p -I$Id: -r1.1.2.1.2.31 -r1.1.2.1.2.33 --- configure.ac 11 Feb 2004 21:06:17 -0000 1.1.2.1.2.31 +++ configure.ac 20 Feb 2004 19:47:10 -0000 1.1.2.1.2.33 @@ -25,7 +25,7 @@ dnl AC_PREREQ(2.57) -AC_INIT(util-vserver, 0.29, enrico.scholz@informatik.tu-chemnitz.de) +AC_INIT(util-vserver, 0.29.2, enrico.scholz@informatik.tu-chemnitz.de) AC_CONFIG_SRCDIR([src/capchroot.c]) AC_CONFIG_HEADER([config.h]) @@ -101,6 +101,7 @@ done IFS=$old_IFS AC_MSG_RESULT([$enable_apis]) +ENSC_SYSCALLNR(vserver,273) ENSC_SYSCALL ENSC_CHECK_EXT2FS_HEADER AC_CHECK_FUNCS([vserver]) Index: lib/syscall-compat.hc =================================================================== RCS file: /cvsroot/util-vserver/util-vserver/lib/syscall-compat.hc,v retrieving revision 1.1.4.7 retrieving revision 1.1.4.8 diff -u -p -I$Id: -r1.1.4.7 -r1.1.4.8 --- lib/syscall-compat.hc 30 Dec 2003 13:45:57 -0000 1.1.4.7 +++ lib/syscall-compat.hc 19 Feb 2004 22:56:53 -0000 1.1.4.8 @@ -44,7 +44,7 @@ vc_set_ipv4root_compat(uint32_t bcast, struct vcmd_set_ipv4root_v3 msg; size_t i; - if (nb>=NB_IPV4ROOT) { + if (nb>NB_IPV4ROOT) { errno = -EINVAL; return -1; } Index: lib/syscall_rlimit-v11.hc =================================================================== RCS file: /cvsroot/util-vserver/util-vserver/lib/syscall_rlimit-v11.hc,v retrieving revision 1.1.2.6 retrieving revision 1.1.2.7 diff -u -p -I$Id: -r1.1.2.6 -r1.1.2.7 --- lib/syscall_rlimit-v11.hc 30 Dec 2003 13:45:57 -0000 1.1.2.6 +++ lib/syscall_rlimit-v11.hc 20 Feb 2004 19:43:29 -0000 1.1.2.7 @@ -59,8 +59,8 @@ vc_set_rlimit_v11(xid_t ctx, int resourc static inline ALWAYSINLINE int vc_get_rlimit_mask_v11(xid_t ctx, int tmp, struct vc_rlimit_mask *lim) { - struct vcmd_ctx_rlimit_v0 vc_lim; - int rc; + struct vcmd_ctx_rlimit_mask_v0 vc_lim; + int rc; (void)tmp; Index: lib/vserver-internal.h =================================================================== RCS file: /cvsroot/util-vserver/util-vserver/lib/vserver-internal.h,v retrieving revision 1.1.4.13 retrieving revision 1.1.4.14 diff -u -p -I$Id: -r1.1.4.13 -r1.1.4.14 --- lib/vserver-internal.h 5 Feb 2004 03:52:45 -0000 1.1.4.13 +++ lib/vserver-internal.h 14 Feb 2004 00:25:34 -0000 1.1.4.14 @@ -26,8 +26,8 @@ #include #include -#ifndef __NR_vserver -# define __NR_vserver 273 +#if !defined(__NR_vserver) && defined(ENSC_SYSCALL__NR_vserver) +# define __NR_vserver ENSC_SYSCALL__NR_vserver #endif #define VC_PREFIX 0) Index: m4/ensc_e2fscheck.m4 =================================================================== RCS file: /cvsroot/util-vserver/util-vserver/m4/ensc_e2fscheck.m4,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -p -I$Id: -r1.1.2.1 -r1.1.2.2 --- m4/ensc_e2fscheck.m4 26 Jan 2004 18:20:51 -0000 1.1.2.1 +++ m4/ensc_e2fscheck.m4 19 Feb 2004 22:56:27 -0000 1.1.2.2 @@ -46,9 +46,11 @@ the following reasons: * you have neither the e2fsprogs nor the kernel headers installed * kernel headers are broken (e.g. these of linux 2.6 are known to be) - and you do not have e2fsprogs headers installed; please try to - install e2fsprogs-devel (for Red Hat) or e2fsprogs-dev (for Debian) - in this case + and you do not have e2fsprogs headers installed; please try to install + - e2fsprogs-devel (for Red Hat), or + - libext2fs2-devel (for Mandrake), or + - e2fslibs-dev (for Debian) + in this case. * kernel headers are broken and your e2fsprogs headers are too old; until version 1.27 (inclusive), they are using reserved C++ keywords Index: m4/ensc_syscallnr.m4 =================================================================== RCS file: m4/ensc_syscallnr.m4 diff -N m4/ensc_syscallnr.m4 --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ m4/ensc_syscallnr.m4 14 Feb 2004 00:24:57 -0000 1.1.2.1 @@ -0,0 +1,55 @@ +dnl $Id: ensc_syscallnr.m4,v 1.1.2.1 2004/02/14 00:24:57 ensc Exp $ + +dnl Copyright (C) 2004 Enrico Scholz +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; version 2 of the License. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +dnl Usage: ENSC_SYSCALLNR(,) + +AC_DEFUN([ENSC_SYSCALLNR], +[ + AC_REQUIRE([ENSC_KERNEL_HEADERS]) + AC_REQUIRE([AC_PROG_EGREP]) + + AC_CACHE_CHECK([for number of syscall '$1'], [ensc_cv_value_syscall_$1], + [ + AC_LANG_PUSH(C) + AC_EGREP_CPP(ensc_cv_value_syscall_$1=auto, [ +#include +#ifdef __NR_$1 +ensc_cv_value_syscall_$1=auto +#endif +], + [ensc_cv_value_syscall_$1=auto], [ + AC_LANG_CONFTEST([ +#include +#ifdef __NR_$1 +ensc_cv_value_syscall_$1=__NR_$1 +#else +ensc_cv_value_syscall_$1=$2 +#endif +]) + eval $($CPP $CPPFLAGS -I$ensc_cv_path_kernelheaders conftest.c | $EGREP -x 'ensc_cv_value_syscall_$1=[[1-9]][[0-9]]*') + if test x"$ensc_cv_value_syscall_$1" = x; then + AC_MSG_ERROR( +[Can not determine value of __NR_$1; please verify your glibc/kernelheaders, and/or set CPPFLAGS='-D=__NR_$1=' environment when calling configure.]) + fi + ]) + AC_LANG_POP + ]) + + if test x"$ensc_cv_value_syscall_$1" != xauto; then + AC_DEFINE_UNQUOTED(ENSC_SYSCALL__NR_$1, $ensc_cv_value_syscall_$1, [The number of the $1 syscall]) + fi +]) Index: src/vlimit.c =================================================================== RCS file: /cvsroot/util-vserver/util-vserver/src/vlimit.c,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -p -I$Id: -r1.1.2.2 -r1.1.2.3 --- src/vlimit.c 30 Dec 2003 13:47:08 -0000 1.1.2.2 +++ src/vlimit.c 20 Feb 2004 19:35:50 -0000 1.1.2.3 @@ -74,7 +74,7 @@ showHelp(int fd, char const *cmd, int re WRITE_MSG(fd, "Usage: "); WRITE_STR(fd, cmd); WRITE_MSG(fd, - " [-c|--ctx ] [-a|--all] [-MSH -- ]*\n" + " -c [-a|--all] [-MSH -- ]*\n" "Please report bugs to " PACKAGE_BUGREPORT "\n"); exit(res); } @@ -123,9 +123,9 @@ showAll(int ctx) struct vc_rlimit_mask mask; size_t i; - if (vc_get_rlimit_mask(-2, &mask)==-1) { + if (vc_get_rlimit_mask(ctx, &mask)==-1) { perror("vc_get_rlimit_mask()"); - //exit(1); + exit(1); } for (i=0; i<32; ++i) { @@ -133,6 +133,7 @@ showAll(int ctx) struct vc_rlimit limit; char buf[100], *ptr=buf; + if (((mask.min|mask.soft|mask.hard) & bitmask)==0) continue; if (vc_get_rlimit(ctx, i, &limit)==-1) { perror("vc_get_rlimit()"); //continue; @@ -157,7 +158,7 @@ static void size_t i; for (i=0; i<32; ++i) { if ((mask & (1<