util-vserver 0.30.215.
authorDaniel Hokka Zakrisson <dhokka@cs.princeton.edu>
Wed, 26 Mar 2008 23:23:15 +0000 (23:23 +0000)
committerDaniel Hokka Zakrisson <dhokka@cs.princeton.edu>
Wed, 26 Mar 2008 23:23:15 +0000 (23:23 +0000)
116 files changed:
ChangeLog
Makefile.in
NEWS
aclocal.m4
config.h.in
configure
configure.ac
contrib/Makefile-files
contrib/manifest.dat.pathsubst
contrib/yum-3.2.4-chroot.patch [new file with mode: 0644]
distrib/Makefile.in
distrib/gentoo/initpost
doc/configuration.html
doc/configuration.xml
ensc_wrappers/wrappers-ioctl.hc
gentoo/Makefile-files
gentoo/bash-wrapper
gentoo/util-vserver
kernel/context_cmd.h
kernel/device_cmd.h
kernel/switch.h
lib/Makefile-files
lib/ccaps-v13.c
lib/ncaps-net.c
lib/nflags-net.c
lib/syscall_ctxcreate-v21.hc
lib/syscall_fgetiattr-v22.hc
lib/syscall_fgetiattr.c
lib/syscall_fsetiattr-v22.hc
lib/syscall_fsetiattr.c
lib/syscall_getbadness-v23.hc [new file with mode: 0644]
lib/syscall_getbadness.c [new file with mode: 0644]
lib/syscall_getccaps-v21.hc
lib/syscall_getsched-v21.hc
lib/syscall_getsched.c
lib/syscall_netadd-netv2.hc
lib/syscall_netremove-netv2.hc
lib/syscall_setbadness-v23.hc [new file with mode: 0644]
lib/syscall_setbadness.c [new file with mode: 0644]
lib/syscall_setsched-v22.hc
lib/syscall_tagcreate.c
lib/syscall_tagmigrate-v23.hc
lib/syscall_tagmigrate.c
lib/syscall_tasktag-v23.hc
lib/syscall_tasktag.c
lib/syscall_unsetmapping-v21.hc [new file with mode: 0644]
lib/syscall_unsetmapping.c [new file with mode: 0644]
lib/tagopt2tag.c
lib/val2text.hc
lib/vserver.h
lib_internal/Makefile-files
lib_internal/crypto-wrapper-beecrypt.h [new file with mode: 0644]
lib_internal/crypto-wrapper-nss.h [new file with mode: 0644]
lib_internal/crypto-wrapper.h [new file with mode: 0644]
lib_internal/matchlist-appendfiles.c
lib_internal/matchlist-initmanually.c
lib_internal/matchlist.h
lib_internal/mkdir.c
lib_internal/sys_unshare.h
lib_internal/testsuite/Makefile-files
lib_internal/testsuite/crypto-speed.c [new file with mode: 0644]
lib_internal/testsuite/crypto.c [new file with mode: 0644]
lib_internal/testsuite/matchlist.c
lib_internal/util-io.h
lib_internal/util-lockfile.c
lib_internal/util-safechdir.h
man/Makefile-files
man/vserver-build.8.pathsubst [new file with mode: 0644]
man/vserver.8
scripts/Makefile-files
scripts/h2ext-worker
scripts/util-vserver-vars.pathsubst
scripts/vdispatch-conf
scripts/vemerge
scripts/vesync
scripts/vmount [new file with mode: 0755]
scripts/vserver
scripts/vserver-build
scripts/vserver-build.clone
scripts/vserver-build.debootstrap
scripts/vserver-build.functions
scripts/vserver-build.functions.yum
scripts/vserver.delete
scripts/vserver.functions
scripts/vserver.start
scripts/vserver.stop
scripts/vserver.suexec
scripts/vupdateworld
src/Makefile-files
src/attribute-util.h [new file with mode: 0644]
src/h2ext.c
src/lockfile.c
src/naddress.c
src/nattribute.c
src/rpm-fake.c
src/secure-mount.c
src/testsuite/Makefile-files
src/testsuite/hashcalc-plain.c
src/testsuite/hashcalc.c
src/testsuite/hashcalc.sh
src/tunctl.c [new file with mode: 0644]
src/vattribute.c
src/vclone.c
src/vdevmap.c
src/vhashify-init.hc
src/vhashify.c
src/vmemctrl.c [new file with mode: 0644]
src/vnamespace.c
src/vrsetup.c
src/vsched.c
src/vspace.c [new file with mode: 0644]
src/vtag.c
sysv/util-vserver
util-vserver.spec
util-vserver.spec.in
vserver-start/main.c

index 89dd3df..ec812cb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,544 @@
+2008-03-17 08:59  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * NEWS, configure.ac: Version 0.30.215.
+
+2008-03-17 08:55  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * lib/ncaps-net.c, lib/nflags-net.c, lib/vserver.h: Add the new
+         flags.
+
+2008-03-16 03:30  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * scripts/vserver-build.functions, scripts/vserver.stop: Fix
+         vserver ... stop --rescue-init.
+         Use it in stopSleepingGuest, to prevent races and to do proper
+         cleanup.
+         If vserver ... stop has already been invoked, remove SC_HELPER
+         from the context.
+
+2008-03-15 16:05  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * src/vdevmap.c: Add some examples.
+         Disallow combinations that make no sense.
+         Allow defaults to be set.
+
+2008-03-11 10:07  Benedikt Böhm <hollow@gentoo.org>
+
+       * distrib/gentoo/initpost, scripts/vserver.functions: fix openrc
+         startup; only fix inittab in plain initstyle
+
+2008-03-10 22:41  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * scripts/vserver-build.functions: bash doesn't execute traps until
+         after the current job has finished executing, so run sleep in a
+         loop.
+
+2008-03-10 19:59  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * lib/syscall_netremove-netv2.hc: A kernel without IPv6-support
+         will return ENOSYS for vc_net_remove_ipv6.
+
+2008-03-05 15:46  Benedikt Böhm <hollow@gentoo.org>
+
+       * distrib/gentoo/initpost: add openrc support to gentoo/initpost
+
+2008-03-02 14:04  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * scripts/vserver-build.functions: Workaround kernel oddities.
+
+2008-03-01 01:24  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * src/Makefile-files: Include attribute-util.h in the tarball.
+
+2008-03-01 01:20  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * src/lockfile.c: lockf(F_LOCK) requests a write lock, which
+         requires the file to be open in write mode.
+
+2008-03-01 01:15  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * src/vattribute.c: Remove unused variable.
+
+2008-03-01 01:07  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * src/attribute-util.h, src/nattribute.c, src/vattribute.c: Factor
+         out bitfield-to-string code to src/attribute-util.h.
+         Add --get for nattribute too.
+
+2008-03-01 00:26  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * src/rpm-fake.c, src/vnamespace.c, src/vspace.c: Revert commit
+         2690, clone is needed for pid namespaces and on kernels <2.6.16.
+
+2008-03-01 00:22  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * doc/configuration.xml, scripts/util-vserver-vars.pathsubst,
+         scripts/vserver.functions, scripts/vserver.stop, src/tunctl.c:
+         Add basic support for creating tun/tap interfaces in the
+         configuration.
+
+2008-02-29 22:16  Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
+
+       * scripts/vserver.stop: use ! instead of ~ to avoid shell expansion
+
+2008-02-29 13:29  Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
+
+       * src/rpm-fake.c, src/vnamespace.c, src/vspace.c: use
+         unshare(CLONE_NEWNS) instead of a complicated 'clone(NEWNS) ...
+         waitpid()' operation
+
+2008-02-29 13:27  Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
+
+       * build-all: use hostspecific Build directory
+
+2008-02-28 23:54  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * src/tunctl.c: Set persist last, this way, no interface is left
+         behind if one of the ioctls fail.
+
+2008-02-28 23:28  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * contrib/manifest.dat.pathsubst, ensc_wrappers/wrappers-ioctl.hc,
+         src/Makefile-files, src/tunctl.c: Add tunctl.
+
+2008-02-28 23:12  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * src/vrsetup.c: Avoid pointer/integer conversion warning on LP64.
+
+2008-02-21 23:22  Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
+
+       * NEWS, configure.ac, lib_internal/Makefile-files,
+         lib_internal/crypto-wrapper-beecrypt.h,
+         lib_internal/crypto-wrapper-nss.h, lib_internal/crypto-wrapper.h,
+         lib_internal/testsuite/Makefile-files,
+         lib_internal/testsuite/SPEED-RESULTS.txt,
+         lib_internal/testsuite/crypto-speed.c,
+         lib_internal/testsuite/crypto.c, src/Makefile-files,
+         src/testsuite/Makefile-files, src/testsuite/hashcalc-plain.c,
+         src/testsuite/hashcalc.c, src/testsuite/hashcalc.sh,
+         src/vhashify-init.hc, src/vhashify.c: added support for using
+         libnss instead of beecrypt for vhashify's
+         hash calculation. libnss has bad SHA1 performance on i386, but is
+         a)
+         maintained and b) gives better performance with all other hashes
+         and
+         on x86_64.
+         
+         I am just waiting for somebody to write the OpenSSL layer so that
+         I
+         can try the padlock hardware crypto device on my C7 ;)
+
+2008-02-21 23:11  Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
+
+       * scripts/Makefile-files: added h2ext-worker to OPTIONS_PREEMPT
+         list
+
+2008-02-21 23:11  Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
+
+       * build-all: fixed CPPFLAGS quoting problems introduced by last
+         commit
+
+2008-02-21 23:10  Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
+
+       * scripts/vmount: fixed endless loop when no '--' is given
+         fixed --help/--version handling
+
+2008-02-21 22:34  Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
+
+       * build-all: added code to enable i386 builds on x86_64 platforms
+         added $CONFIGURE_FLAGS configuration env
+         set LDFLAGS
+
+2008-02-21 22:33  Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
+
+       * lib_internal/testsuite/matchlist.c: fixed unused param +
+         unsigned/signed mismatch warning
+
+2008-02-21 22:32  Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
+
+       * src/vspace.c: fixed
+         
+         | src/vspace.c:177: warning: passing argument 2 of
+         'isNumberUnsigned' from incompatible pointer type
+         
+         warning
+
+2008-02-16 22:09  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * lib_internal/util-lockfile.c, src/lockfile.c, src/secure-mount.c,
+         vserver-start/main.c: Use lockf instead of flock, the former
+         works on NFS.
+
+2008-02-14 19:28  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * src/rpm-fake.c: Disable VXF_SC_HELPER for rpm-fake created
+         contexts.
+
+2008-02-11 23:41  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * scripts/vserver-build.functions: Set the barrier and warn if it
+         could not be set automatically.
+
+2008-02-09 00:27  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * src/rpm-fake.c: We only want to wait on the context if we created
+         it.
+
+2008-01-27 07:55  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * distrib/alpine/initpost, distrib/alpine/initpre,
+         distrib/debian/initpost, distrib/gentoo/init-vserver.sh,
+         distrib/gentoo/initpost, distrib/gentoo/initpre,
+         distrib/gentoo/net.vserver, distrib/gentoo/reboot.sh,
+         distrib/gentoo/shutdown.sh, distrib/misc/environment,
+         distrib/misc/h2ext.desc, gentoo/Makefile-files,
+         gentoo/bash-wrapper, gentoo/util-vserver, gentoo/vprocunhide,
+         gentoo/vservers.default, lib/syscall_ctxcreate-v21.hc,
+         lib/syscall_fgetiattr-v22.hc, lib/syscall_fgetiattr.c,
+         lib/syscall_fsetiattr-v22.hc, lib/syscall_fsetiattr.c,
+         lib/syscall_getbadness-v23.hc, lib/syscall_getbadness.c,
+         lib/syscall_getccaps-v21.hc, lib/syscall_getsched-v21.hc,
+         lib/syscall_getsched.c, lib/syscall_netadd-netv2.hc,
+         lib/syscall_netremove-netv2.hc, lib/syscall_setbadness-v23.hc,
+         lib/syscall_setbadness.c, lib/syscall_setsched-v22.hc,
+         lib/syscall_tagcreate.c, lib/syscall_tagmigrate-v23.hc,
+         lib/syscall_tagmigrate.c, lib/syscall_tasktag-v23.hc,
+         lib/syscall_tasktag.c, lib/syscall_unsetmapping-v21.hc,
+         lib/syscall_unsetmapping.c, lib/tagopt2tag.c,
+         lib_internal/mkdir.c, lib_internal/sys_unshare.h,
+         lib_internal/testsuite/matchlist.c,
+         man/vserver-build.8.pathsubst, mkrelease, scripts/h2ext-worker,
+         scripts/vserver-build.fai, src/h2ext.c, src/vmemctrl.c,
+         src/vspace.c, src/vtag.c: Add missing svn:keywords.
+
+2008-01-26 11:44  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * scripts/vserver-build.functions: Make sure /dev gets proper
+         permissions.
+
+2008-01-26 11:44  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * scripts/vserver-build.functions: Prevent deadlock between
+         sc_helper vserver ... stop invocation, and stopSleepingGuest.
+
+2008-01-23 10:38  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * lib_internal/sys_unshare.h: Use the correct syscall number.
+
+2008-01-23 06:14  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * distrib/Makefile.am: Fedora 8 is redhat-style too.
+
+2008-01-22 09:19  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * scripts/vserver.stop, scripts/vserver.suexec, src/vspace.c: Fix
+         vspace stuff.
+
+2008-01-21 14:13  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * src/naddress.c: Don't require a netmask/prefix.
+
+2008-01-20 08:15  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * contrib/manifest.dat.pathsubst: Add missing files.
+
+2008-01-20 08:03  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * doc/configuration.xml: Add missing closing tag.
+
+2008-01-20 08:01  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * src/rpm-fake.c: Hopefully this will make it bullet-proof.
+
+2008-01-20 07:56  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * doc/configuration.xml, scripts/vserver.functions,
+         scripts/vserver.start, scripts/vserver.stop,
+         scripts/vserver.suexec, src/vspace.c: Add preliminary support for
+         pid and network namespaces.
+
+2008-01-20 06:58  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * sysv/util-vserver: getPhysicalDir doesn't work if it doesn't
+         already exist.
+
+2008-01-15 13:26  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * distrib/misc/debootstrap.uri: debootstrap 1.0.8.
+
+2008-01-13 18:26  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * scripts/vserver: Use $cmd instead of $2.
+
+2008-01-13 18:26  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * lib/syscall_tagmigrate-v23.hc: Only migrate to the tag once.
+
+2008-01-12 15:55  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * lib/vserver.h, src/vspace.c: Add support for PID and net
+         namespaces.
+
+2008-01-12 15:48  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * src/vspace.c: Pid namespaces require clone.
+
+2008-01-12 15:35  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * ., lib, lib_internal: Fix svn:ignores.
+
+2008-01-08 17:19  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * scripts/vserver.functions: Backslash...
+
+2008-01-08 16:53  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * src/rpm-fake.c: Attempt to close race between dying
+         rpm-fake-resolver and other rpm-fake processes.
+
+2008-01-08 16:49  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * scripts/vserver.delete: cache need not exist.
+
+2008-01-06 01:40  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * scripts/vmount: Work with nonamespace guests.
+
+2008-01-04 17:42  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * src/vattribute.c: Add --get.
+
+2008-01-03 15:33  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * lib/val2text.hc: Don't remove bits for which there were no match.
+         Cast 1 to the TYPE, so uint64 values can be looked up.
+
+2008-01-03 15:30  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * lib_internal/util-io.h, src/h2ext.c: Move WRITE_INT to util-io.h,
+         so other programs can use it too.
+
+2008-01-03 14:18  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * scripts/vmount: Make vmount <guest> -- -a work.
+
+2008-01-03 00:40  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * lib/vserver.h: Fix typo.
+
+2007-12-22 16:30  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * distrib/redhat/initpost: Leave rsyslog enabled for Fedora 8.
+
+2007-12-20 00:09  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * src/vclone.c: Don't bail on EINVAL, since the clone build method
+         sets the contexts unconditionally.
+
+2007-12-19 19:13  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * distrib/debian/initpost: Remove all unknown services.
+
+2007-12-19 14:28  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * scripts/vserver-build, scripts/vserver-build.clone: Use/support
+         the "new" vclone features in the clone build method.
+
+2007-12-19 02:17  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * lib/ccaps-v13.c, lib/vserver.h: Add VXC_KTHREAD.
+
+2007-12-05 14:24  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * lib/syscall_tagmigrate-v23.hc: Use TAG_KERNEL2USER on the result.
+
+2007-12-05 00:51  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * scripts/vserver-build.debootstrap: Work with newer versions of
+         debootstrap too.
+
+2007-12-03 21:08  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * distrib/f7/yum.repos.d/fedora.repo: Correct path to keys.
+
+2007-12-03 18:06  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * scripts/vserver: Document --debug.
+
+2007-11-30 23:18  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * distrib/misc/h2ext.desc: Use --numeric-owner for tar and
+         --numeric-uid-gid for cpio.
+
+2007-11-26 23:47  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * src/vsched.c: Floats are numbers too.
+
+2007-11-19 04:48  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * distrib/Makefile.am, distrib/f8,
+         distrib/f8/yum.repos.d/fedora-development.repo,
+         distrib/f8/yum.repos.d/fedora-updates-testing.repo,
+         distrib/f8/yum.repos.d/fedora-updates.repo,
+         distrib/f8/yum.repos.d/fedora.repo: Add Fedora 8.
+
+2007-11-17 23:52  Benedikt Böhm <hollow@gentoo.org>
+
+       * scripts/vdispatch-conf, scripts/vemerge, scripts/vesync,
+         scripts/vupdateworld: fix a corner case in gentoo helpers
+
+2007-11-17 21:36  Benedikt Böhm <hollow@gentoo.org>
+
+       * scripts/vserver.functions: use sane PATH during shutdown
+
+2007-11-13 22:17  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * distrib/misc/debootstrap.uri: Update to 1.0.6.
+
+2007-10-29 21:13  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * scripts/Makefile-files, scripts/vmount: Add vmount, a wrapper to
+         mount something in a guest.
+
+2007-10-27 19:34  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * contrib/manifest.dat.pathsubst, man/Makefile-files,
+         man/vserver-build.8.pathsubst, man/vserver.8: Man pages update
+         from Micah Anderson.
+
+2007-10-25 01:18  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * distrib/Makefile.am, distrib/alpine, distrib/alpine/initpost,
+         distrib/alpine/initpre: Add "Alpine Linux".
+
+2007-10-25 00:26  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * scripts/vserver: Cleanup the help message.
+
+2007-10-25 00:23  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * distrib/debian/initpost, distrib/redhat/initpost,
+         scripts/vserver, scripts/vserver-build.functions,
+         scripts/vserver.stop: Create helper functions to start a guest
+         that just sleeps and kills.
+
+2007-10-22 20:43  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * src/vmemctrl.c: Fix startup bug on older kernels.
+
+2007-10-16 00:27  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * configure.ac, scripts/util-vserver-vars.pathsubst,
+         scripts/vserver.functions, scripts/vserver.start,
+         util-vserver.spec.in: Lots of small fixes to make everything
+         behave like it should.
+
+2007-10-15 11:38  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * contrib/manifest.dat.pathsubst: Add vmemctrl and vspace to the
+         manifest.
+
+2007-10-15 11:31  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * doc/configuration.xml, gentoo/util-vserver,
+         scripts/vserver.functions, scripts/vserver.start,
+         scripts/vserver.stop, sysv/util-vserver: Add support for
+         per-guest device maps.
+
+2007-10-14 14:40  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * doc/configuration.xml: Improve the disk limit descriptions.
+
+2007-10-14 00:32  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * distrib/misc/vprocunhide-files: Hide conntrack files.
+
+2007-10-13 14:17  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * doc/configuration.xml, scripts/vserver.functions,
+         scripts/vserver.start: Add support for the OOM bias in the
+         configuration.
+
+2007-10-13 12:13  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * kernel/context_cmd.h, kernel/switch.h, lib/Makefile-files,
+         lib/syscall_getbadness-v23.hc, lib/syscall_getbadness.c,
+         lib/syscall_setbadness-v23.hc, lib/syscall_setbadness.c,
+         lib/vserver.h, src, src/Makefile-files, src/vmemctrl.c: Add
+         support for the OOM bias, and vmemctrl to control it.
+
+2007-10-13 01:10  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * lib/vserver.h, src, src/Makefile-files, src/vspace.c: Added
+         vspace, like vnamespace but generic.
+
+2007-10-12 00:03  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * scripts/vserver.functions, scripts/vserver.start: Run fsck on
+         filesystems in the guest's fstab.
+
+2007-10-11 23:47  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * lib/vserver.h, src/naddress.c: Ranges might want masks too.
+
+2007-10-11 20:37  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * kernel/device_cmd.h, lib/Makefile-files,
+         lib/syscall_unsetmapping-v21.hc, lib/syscall_unsetmapping.c,
+         lib/vserver.h, scripts/vserver.functions, src/vdevmap.c: Add
+         support for vc_unset_mapping introduced in 2.3.0.27.
+
+2007-10-10 09:01  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * doc/configuration.xml: Clarify which entries are required for
+         cpusets.
+
+2007-10-06 17:23  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * scripts/vserver.functions: People love symlinks.
+
+2007-09-11 21:26  Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
+
+       * distrib/f7/yum/yum.conf, scripts/vserver-build.functions.yum:
+         added support for yum's new persistdir option
+
+2007-09-11 21:22  Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
+
+       * contrib/yum-3.2.4-chroot.patch: fixed patch and re-added lost
+         hunk which caused broken paths for cachedir, logfile and friends
+
+2007-09-06 17:48  Daniel Hokka Zakrisson <daniel@hozac.com>
+
+       * scripts/vserver.functions, src/vtag.c: Unbreak dynamic contexts.
+
+2007-09-06 07:53  Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
+
+       * contrib/Makefile-files, contrib/yum-3.2.4-chroot.patch: added
+         patch for yum-3.2.4
+
+2007-09-03 07:42  Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
+
+       * lib_internal/matchlist-appendfiles.c,
+         lib_internal/matchlist-initmanually.c, lib_internal/matchlist.h,
+         lib_internal/util-safechdir.h: whitespace-cleanup
+
+2007-09-03 07:40  Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
+
+       * lib_internal/matchlist-appendfiles.c,
+         lib_internal/matchlist-initmanually.c, lib_internal/matchlist.h:
+         fixed const-ness of matchlist functions
+         
+         made the initial file-list a 'char const **' to ease
+         initialization from string constants
+
+2007-09-03 07:38  Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
+
+       * lib_internal/util-safechdir.h: fixed declaration of 'struct stat'
+         
+         include <sys/stat.h> instead of declaring it with 'struct stat'
+         as it might cause conflicts when 'stat' is #defined as stat64
+         in this header
+
 2007-09-02 20:03  Daniel Hokka Zakrisson <daniel@hozac.com>
 
        * NEWS, configure.ac: Version 0.30.214.
 2007-09-02 20:03  Daniel Hokka Zakrisson <daniel@hozac.com>
 
        * NEWS, configure.ac: Version 0.30.214.
index eace06d..febb25e 100644 (file)
@@ -63,8 +63,9 @@ pkglib_PROGRAMS = src/capchroot$(EXEEXT) src/chain-echo$(EXEEXT) \
        src/mask2prefix$(EXEEXT) src/exec-ulimit$(EXEEXT) \
        src/rpm-fake-resolver$(EXEEXT) src/vshelper-sync$(EXEEXT) \
        src/sigexec$(EXEEXT) src/chbind-compat$(EXEEXT) \
        src/mask2prefix$(EXEEXT) src/exec-ulimit$(EXEEXT) \
        src/rpm-fake-resolver$(EXEEXT) src/vshelper-sync$(EXEEXT) \
        src/sigexec$(EXEEXT) src/chbind-compat$(EXEEXT) \
-       src/vsysctl$(EXEEXT) src/h2ext$(EXEEXT) $(am__EXEEXT_8) \
-       $(am__EXEEXT_9) $(am__EXEEXT_10) $(am__EXEEXT_11)
+       src/vsysctl$(EXEEXT) src/h2ext$(EXEEXT) src/tunctl$(EXEEXT) \
+       $(am__EXEEXT_9) $(am__EXEEXT_10) $(am__EXEEXT_11) \
+       $(am__EXEEXT_12)
 legacy_PROGRAMS = src/ifspec$(EXEEXT) src/listdevip$(EXEEXT) \
        src/parserpmdump$(EXEEXT) src/rebootmgr$(EXEEXT) \
        src/showperm$(EXEEXT) src/vreboot$(EXEEXT)
 legacy_PROGRAMS = src/ifspec$(EXEEXT) src/listdevip$(EXEEXT) \
        src/parserpmdump$(EXEEXT) src/rebootmgr$(EXEEXT) \
        src/showperm$(EXEEXT) src/vreboot$(EXEEXT)
@@ -77,24 +78,26 @@ sbin_PROGRAMS = src/exec-cd$(EXEEXT) src/lsxid$(EXEEXT) \
        src/vserver-stat$(EXEEXT) src/vserver-info$(EXEEXT) \
        src/vuname$(EXEEXT) src/vwait$(EXEEXT) src/ncontext$(EXEEXT) \
        src/nattribute$(EXEEXT) src/naddress$(EXEEXT) \
        src/vserver-stat$(EXEEXT) src/vserver-info$(EXEEXT) \
        src/vuname$(EXEEXT) src/vwait$(EXEEXT) src/ncontext$(EXEEXT) \
        src/nattribute$(EXEEXT) src/naddress$(EXEEXT) \
-       src/vdevmap$(EXEEXT) src/vtag$(EXEEXT) $(am__EXEEXT_9) \
-       $(am__EXEEXT_12)
+       src/vdevmap$(EXEEXT) src/vtag$(EXEEXT) src/vspace$(EXEEXT) \
+       src/vmemctrl$(EXEEXT) $(am__EXEEXT_10) $(am__EXEEXT_13)
 noinst_PROGRAMS = tests/escaperoot$(EXEEXT) tests/forkbomb$(EXEEXT) \
        tests/testipc$(EXEEXT) tests/testlimit$(EXEEXT) \
 noinst_PROGRAMS = tests/escaperoot$(EXEEXT) tests/forkbomb$(EXEEXT) \
        tests/testipc$(EXEEXT) tests/testlimit$(EXEEXT) \
-       tests/testopenf$(EXEEXT) $(am__EXEEXT_6)
+       tests/testopenf$(EXEEXT) $(am__EXEEXT_7)
 EXTRA_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_1)
 check_PROGRAMS = lib/testsuite/cflags$(EXEEXT) \
        lib/testsuite/personality$(EXEEXT) lib/testsuite/fmt$(EXEEXT) \
        lib/testsuite/parselimit$(EXEEXT) $(am__EXEEXT_3) \
        $(am__EXEEXT_4) ensc_vector/testsuite/test1$(EXEEXT) \
        ensc_vector/testsuite/test2$(EXEEXT) \
 EXTRA_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_1)
 check_PROGRAMS = lib/testsuite/cflags$(EXEEXT) \
        lib/testsuite/personality$(EXEEXT) lib/testsuite/fmt$(EXEEXT) \
        lib/testsuite/parselimit$(EXEEXT) $(am__EXEEXT_3) \
        $(am__EXEEXT_4) ensc_vector/testsuite/test1$(EXEEXT) \
        ensc_vector/testsuite/test2$(EXEEXT) \
-       lib_internal/testsuite/command$(EXEEXT) $(am__EXEEXT_5)
+       lib_internal/testsuite/command$(EXEEXT) $(am__EXEEXT_5) \
+       $(am__EXEEXT_6)
 TESTS = lib/testsuite/cflags$(EXEEXT) \
        lib/testsuite/personality$(EXEEXT) lib/testsuite/fmt$(EXEEXT) \
        lib/testsuite/parselimit$(EXEEXT) $(am__EXEEXT_4) \
 TESTS = lib/testsuite/cflags$(EXEEXT) \
        lib/testsuite/personality$(EXEEXT) lib/testsuite/fmt$(EXEEXT) \
        lib/testsuite/parselimit$(EXEEXT) $(am__EXEEXT_4) \
-       $(am__EXEEXT_14) $(am__EXEEXT_1) \
+       $(am__EXEEXT_15) $(am__EXEEXT_1) \
        ensc_vector/testsuite/test1$(EXEEXT) \
        ensc_vector/testsuite/test1$(EXEEXT) \
-       ensc_vector/testsuite/test2$(EXEEXT) $(am__EXEEXT_15)
+       ensc_vector/testsuite/test2$(EXEEXT) $(am__EXEEXT_16) \
+       $(am__EXEEXT_17)
 DIST_COMMON = README $(am__configure_deps) $(include_HEADERS) \
        $(noinst_HEADERS) $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
        $(srcdir)/config.h.in \
 DIST_COMMON = README $(am__configure_deps) $(include_HEADERS) \
        $(noinst_HEADERS) $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
        $(srcdir)/config.h.in \
@@ -134,14 +137,14 @@ DIST_COMMON = README $(am__configure_deps) $(include_HEADERS) \
 @ENSC_HAVE_C99_COMPILER_TRUE@                          lib/syscall_setdlimit.c
 
 @USE_DIETLIBC_TRUE@am__append_2 = $(LIBVSERVER_DIET)
 @ENSC_HAVE_C99_COMPILER_TRUE@                          lib/syscall_setdlimit.c
 
 @USE_DIETLIBC_TRUE@am__append_2 = $(LIBVSERVER_DIET)
-@ENSC_CAN_BEECRYPT_WITH_DIETLIBC_TRUE@am__append_3 = src/vhashify
-@ENSC_HAVE_BEECRYPT_TRUE@@ENSC_HAVE_C99_COMPILER_TRUE@am__append_4 = src/vhashify
+@ENSC_CAN_CRYPTO_WITH_DIETLIBC_TRUE@am__append_3 = src/vhashify
+@ENSC_HAVE_C99_COMPILER_TRUE@@ENSC_HAVE_CRYPTO_TRUE@am__append_4 = src/vhashify
 @ENSC_HAVE_C99_COMPILER_TRUE@am__append_5 = src/vdlimit
 @ENSC_HAVE_C99_COMPILER_TRUE@am__append_5 = src/vdlimit
-@ENSC_HAVE_BEECRYPT_TRUE@@ENSC_HAVE_C99_COMPILER_TRUE@am__append_6 = src/testsuite/hashcalc            \
-@ENSC_HAVE_BEECRYPT_TRUE@@ENSC_HAVE_C99_COMPILER_TRUE@                                 src/testsuite/hashcalc-plain
+@ENSC_HAVE_C99_COMPILER_TRUE@@ENSC_HAVE_CRYPTO_TRUE@am__append_6 = src/testsuite/hashcalc              \
+@ENSC_HAVE_C99_COMPILER_TRUE@@ENSC_HAVE_CRYPTO_TRUE@                                   src/testsuite/hashcalc-plain
 
 
-@ENSC_HAVE_BEECRYPT_TRUE@@ENSC_HAVE_C99_COMPILER_TRUE@am__append_7 = src/testsuite/hashcalc-plain.sh           \
-@ENSC_HAVE_BEECRYPT_TRUE@@ENSC_HAVE_C99_COMPILER_TRUE@                                 src/testsuite/hashcalc.sh
+@ENSC_HAVE_C99_COMPILER_TRUE@@ENSC_HAVE_CRYPTO_TRUE@am__append_7 = src/testsuite/hashcalc-plain.sh             \
+@ENSC_HAVE_C99_COMPILER_TRUE@@ENSC_HAVE_CRYPTO_TRUE@                                   src/testsuite/hashcalc.sh
 
 @HAVE_XSLTP_TRUE@am__append_8 = $(doc_gen_DOCS)
 @HAVE_XSLTPROC_TRUE@@HAVE_XSLTP_FALSE@am__append_9 = $(doc_gen_DOCS)
 
 @HAVE_XSLTP_TRUE@am__append_8 = $(doc_gen_DOCS)
 @HAVE_XSLTPROC_TRUE@@HAVE_XSLTP_FALSE@am__append_9 = $(doc_gen_DOCS)
@@ -170,10 +173,17 @@ DIST_COMMON = README $(am__configure_deps) $(include_HEADERS) \
 @ENSC_HAVE_C99_COMPILER_TRUE@                          lib_internal/testsuite/matchlist \
 @ENSC_HAVE_C99_COMPILER_TRUE@                          lib_internal/testsuite/matchlist-gnu
 
 @ENSC_HAVE_C99_COMPILER_TRUE@                          lib_internal/testsuite/matchlist \
 @ENSC_HAVE_C99_COMPILER_TRUE@                          lib_internal/testsuite/matchlist-gnu
 
-@ENSC_HAVE_C99_COMPILER_TRUE@am__append_17 = vserver-start/vserver.start.bin
-@ENSC_HAVE_C99_COMPILER_TRUE@am__append_18 = vserver-start/vserver.start.bin
-@HAVE_GENTOO_INIT_TRUE@am__append_19 = $(gentoo_src_SCRPTS)
-@HAVE_GENTOO_INIT_TRUE@am__append_20 = gentoo/bash-wrapper
+@ENSC_HAVE_CRYPTO_TRUE@am__append_17 = lib_internal/testsuite/crypto \
+@ENSC_HAVE_CRYPTO_TRUE@                                lib_internal/testsuite/crypto-speed
+
+@ENSC_HAVE_CRYPTO_TRUE@am__append_18 = lib_internal/testsuite/crypto
+@ENSC_CAN_CRYPTO_WITH_DIETLIBC_TRUE@am__append_19 = lib_internal/testsuite/crypto \
+@ENSC_CAN_CRYPTO_WITH_DIETLIBC_TRUE@                           lib_internal/testsuite/crypto-speed
+
+@ENSC_HAVE_C99_COMPILER_TRUE@am__append_20 = vserver-start/vserver.start.bin
+@ENSC_HAVE_C99_COMPILER_TRUE@am__append_21 = vserver-start/vserver.start.bin
+@HAVE_GENTOO_INIT_TRUE@am__append_22 = $(gentoo_src_SCRPTS)
+@HAVE_GENTOO_INIT_TRUE@am__append_23 = gentoo/bash-wrapper
 subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/ensc_cflags.m4 \
 subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/ensc_cflags.m4 \
@@ -297,6 +307,7 @@ am__lib_libvserver_a_SOURCES_DIST = lib/syscall.c lib/checkversion.c \
        lib/syscall_enternamespace-v21.hc \
        lib/syscall_setnamespace-v21.hc lib/syscall_ctxmigrate-v21.hc \
        lib/syscall_setmapping.c lib/syscall_setmapping-v21.hc \
        lib/syscall_enternamespace-v21.hc \
        lib/syscall_setnamespace-v21.hc lib/syscall_ctxmigrate-v21.hc \
        lib/syscall_setmapping.c lib/syscall_setmapping-v21.hc \
+       lib/syscall_unsetmapping.c lib/syscall_unsetmapping-v21.hc \
        lib/syscall_schedinfo.c lib/syscall_schedinfo-v21.hc \
        lib/syscall_getccaps-v21.hc lib/syscall_getsched.c \
        lib/syscall_getsched-v21.hc lib/syscall_ctxcreate-v21.hc \
        lib/syscall_schedinfo.c lib/syscall_schedinfo-v21.hc \
        lib/syscall_getccaps-v21.hc lib/syscall_getsched.c \
        lib/syscall_getsched-v21.hc lib/syscall_ctxcreate-v21.hc \
@@ -306,6 +317,8 @@ am__lib_libvserver_a_SOURCES_DIST = lib/syscall.c lib/checkversion.c \
        lib/syscall_netremove-netv2.hc lib/syscall_tagmigrate-v23.hc \
        lib/syscall_tagmigrate.c lib/syscall_tagcreate.c \
        lib/syscall_tasktag-v23.hc lib/syscall_tasktag.c \
        lib/syscall_netremove-netv2.hc lib/syscall_tagmigrate-v23.hc \
        lib/syscall_tagmigrate.c lib/syscall_tagcreate.c \
        lib/syscall_tasktag-v23.hc lib/syscall_tasktag.c \
+       lib/syscall_getbadness.c lib/syscall_getbadness-v23.hc \
+       lib/syscall_setbadness.c lib/syscall_setbadness-v23.hc \
        ensc_fmt/fmt-32.c ensc_fmt/fmt-64.c ensc_fmt/fmtx-32.c \
        ensc_fmt/fmtx-64.c ensc_fmt/fmt-tai64n.c ensc_fmt/fmt.h \
        ensc_fmt/fmt.hc ensc_fmt/fmtx.hc ensc_fmt/fmt-internal.h
        ensc_fmt/fmt-32.c ensc_fmt/fmt-64.c ensc_fmt/fmtx-32.c \
        ensc_fmt/fmtx-64.c ensc_fmt/fmt-tai64n.c ensc_fmt/fmt.h \
        ensc_fmt/fmt.hc ensc_fmt/fmtx.hc ensc_fmt/fmt-internal.h
@@ -376,6 +389,7 @@ am__objects_7 = lib/lib_libvserver_a-syscall_rlimitstat.$(OBJEXT) \
        lib/lib_libvserver_a-syscall_ctxstat.$(OBJEXT) \
        lib/lib_libvserver_a-syscall_getspacemask.$(OBJEXT) \
        lib/lib_libvserver_a-syscall_setmapping.$(OBJEXT) \
        lib/lib_libvserver_a-syscall_ctxstat.$(OBJEXT) \
        lib/lib_libvserver_a-syscall_getspacemask.$(OBJEXT) \
        lib/lib_libvserver_a-syscall_setmapping.$(OBJEXT) \
+       lib/lib_libvserver_a-syscall_unsetmapping.$(OBJEXT) \
        lib/lib_libvserver_a-syscall_schedinfo.$(OBJEXT) \
        lib/lib_libvserver_a-syscall_getsched.$(OBJEXT)
 am__objects_8 = lib/lib_libvserver_a-syscall_fsetiattr.$(OBJEXT) \
        lib/lib_libvserver_a-syscall_schedinfo.$(OBJEXT) \
        lib/lib_libvserver_a-syscall_getsched.$(OBJEXT)
 am__objects_8 = lib/lib_libvserver_a-syscall_fsetiattr.$(OBJEXT) \
@@ -383,7 +397,9 @@ am__objects_8 = lib/lib_libvserver_a-syscall_fsetiattr.$(OBJEXT) \
 am__objects_9 =
 am__objects_10 = lib/lib_libvserver_a-syscall_tagmigrate.$(OBJEXT) \
        lib/lib_libvserver_a-syscall_tagcreate.$(OBJEXT) \
 am__objects_9 =
 am__objects_10 = lib/lib_libvserver_a-syscall_tagmigrate.$(OBJEXT) \
        lib/lib_libvserver_a-syscall_tagcreate.$(OBJEXT) \
-       lib/lib_libvserver_a-syscall_tasktag.$(OBJEXT)
+       lib/lib_libvserver_a-syscall_tasktag.$(OBJEXT) \
+       lib/lib_libvserver_a-syscall_getbadness.$(OBJEXT) \
+       lib/lib_libvserver_a-syscall_setbadness.$(OBJEXT)
 am__objects_11 = ensc_fmt/lib_libvserver_a-fmt-32.$(OBJEXT) \
        ensc_fmt/lib_libvserver_a-fmt-64.$(OBJEXT) \
        ensc_fmt/lib_libvserver_a-fmtx-32.$(OBJEXT) \
 am__objects_11 = ensc_fmt/lib_libvserver_a-fmt-32.$(OBJEXT) \
        ensc_fmt/lib_libvserver_a-fmt-64.$(OBJEXT) \
        ensc_fmt/lib_libvserver_a-fmtx-32.$(OBJEXT) \
@@ -687,6 +703,7 @@ am__lib_libvserver_la_SOURCES_DIST = lib/syscall.c lib/checkversion.c \
        lib/syscall_enternamespace-v21.hc \
        lib/syscall_setnamespace-v21.hc lib/syscall_ctxmigrate-v21.hc \
        lib/syscall_setmapping.c lib/syscall_setmapping-v21.hc \
        lib/syscall_enternamespace-v21.hc \
        lib/syscall_setnamespace-v21.hc lib/syscall_ctxmigrate-v21.hc \
        lib/syscall_setmapping.c lib/syscall_setmapping-v21.hc \
+       lib/syscall_unsetmapping.c lib/syscall_unsetmapping-v21.hc \
        lib/syscall_schedinfo.c lib/syscall_schedinfo-v21.hc \
        lib/syscall_getccaps-v21.hc lib/syscall_getsched.c \
        lib/syscall_getsched-v21.hc lib/syscall_ctxcreate-v21.hc \
        lib/syscall_schedinfo.c lib/syscall_schedinfo-v21.hc \
        lib/syscall_getccaps-v21.hc lib/syscall_getsched.c \
        lib/syscall_getsched-v21.hc lib/syscall_ctxcreate-v21.hc \
@@ -696,6 +713,8 @@ am__lib_libvserver_la_SOURCES_DIST = lib/syscall.c lib/checkversion.c \
        lib/syscall_netremove-netv2.hc lib/syscall_tagmigrate-v23.hc \
        lib/syscall_tagmigrate.c lib/syscall_tagcreate.c \
        lib/syscall_tasktag-v23.hc lib/syscall_tasktag.c \
        lib/syscall_netremove-netv2.hc lib/syscall_tagmigrate-v23.hc \
        lib/syscall_tagmigrate.c lib/syscall_tagcreate.c \
        lib/syscall_tasktag-v23.hc lib/syscall_tasktag.c \
+       lib/syscall_getbadness.c lib/syscall_getbadness-v23.hc \
+       lib/syscall_setbadness.c lib/syscall_setbadness-v23.hc \
        ensc_fmt/fmt-32.c ensc_fmt/fmt-64.c ensc_fmt/fmtx-32.c \
        ensc_fmt/fmtx-64.c ensc_fmt/fmt-tai64n.c ensc_fmt/fmt.h \
        ensc_fmt/fmt.hc ensc_fmt/fmtx.hc ensc_fmt/fmt-internal.h
        ensc_fmt/fmt-32.c ensc_fmt/fmt-64.c ensc_fmt/fmtx-32.c \
        ensc_fmt/fmtx-64.c ensc_fmt/fmt-tai64n.c ensc_fmt/fmt.h \
        ensc_fmt/fmt.hc ensc_fmt/fmtx.hc ensc_fmt/fmt-internal.h
@@ -764,13 +783,16 @@ am__objects_27 = lib/lib_libvserver_la-syscall_rlimitstat.lo \
        lib/lib_libvserver_la-syscall_ctxstat.lo \
        lib/lib_libvserver_la-syscall_getspacemask.lo \
        lib/lib_libvserver_la-syscall_setmapping.lo \
        lib/lib_libvserver_la-syscall_ctxstat.lo \
        lib/lib_libvserver_la-syscall_getspacemask.lo \
        lib/lib_libvserver_la-syscall_setmapping.lo \
+       lib/lib_libvserver_la-syscall_unsetmapping.lo \
        lib/lib_libvserver_la-syscall_schedinfo.lo \
        lib/lib_libvserver_la-syscall_getsched.lo
 am__objects_28 = lib/lib_libvserver_la-syscall_fsetiattr.lo \
        lib/lib_libvserver_la-syscall_fgetiattr.lo
 am__objects_29 = lib/lib_libvserver_la-syscall_tagmigrate.lo \
        lib/lib_libvserver_la-syscall_tagcreate.lo \
        lib/lib_libvserver_la-syscall_schedinfo.lo \
        lib/lib_libvserver_la-syscall_getsched.lo
 am__objects_28 = lib/lib_libvserver_la-syscall_fsetiattr.lo \
        lib/lib_libvserver_la-syscall_fgetiattr.lo
 am__objects_29 = lib/lib_libvserver_la-syscall_tagmigrate.lo \
        lib/lib_libvserver_la-syscall_tagcreate.lo \
-       lib/lib_libvserver_la-syscall_tasktag.lo
+       lib/lib_libvserver_la-syscall_tasktag.lo \
+       lib/lib_libvserver_la-syscall_getbadness.lo \
+       lib/lib_libvserver_la-syscall_setbadness.lo
 am__objects_30 = ensc_fmt/lib_libvserver_la-fmt-32.lo \
        ensc_fmt/lib_libvserver_la-fmt-64.lo \
        ensc_fmt/lib_libvserver_la-fmtx-32.lo \
 am__objects_30 = ensc_fmt/lib_libvserver_la-fmt-32.lo \
        ensc_fmt/lib_libvserver_la-fmt-64.lo \
        ensc_fmt/lib_libvserver_la-fmtx-32.lo \
@@ -817,8 +839,8 @@ src_rpm_fake_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
        $(LIBTOOLFLAGS) --mode=link $(CCLD) $(src_rpm_fake_la_CFLAGS) \
        $(CFLAGS) $(src_rpm_fake_la_LDFLAGS) $(LDFLAGS) -o $@
 am__EXEEXT_1 =
        $(LIBTOOLFLAGS) --mode=link $(CCLD) $(src_rpm_fake_la_CFLAGS) \
        $(CFLAGS) $(src_rpm_fake_la_LDFLAGS) $(LDFLAGS) -o $@
 am__EXEEXT_1 =
-@ENSC_HAVE_BEECRYPT_TRUE@@ENSC_HAVE_C99_COMPILER_TRUE@am__EXEEXT_2 = src/testsuite/hashcalc$(EXEEXT) \
-@ENSC_HAVE_BEECRYPT_TRUE@@ENSC_HAVE_C99_COMPILER_TRUE@ src/testsuite/hashcalc-plain$(EXEEXT)
+@ENSC_HAVE_C99_COMPILER_TRUE@@ENSC_HAVE_CRYPTO_TRUE@am__EXEEXT_2 = src/testsuite/hashcalc$(EXEEXT) \
+@ENSC_HAVE_C99_COMPILER_TRUE@@ENSC_HAVE_CRYPTO_TRUE@   src/testsuite/hashcalc-plain$(EXEEXT)
 am__EXEEXT_3 = src/testsuite/rpm-fake-test$(EXEEXT) $(am__EXEEXT_2)
 am__EXEEXT_4 = src/testsuite/vunify-functest$(EXEEXT) \
        src/testsuite/chcontext-test$(EXEEXT) \
 am__EXEEXT_3 = src/testsuite/rpm-fake-test$(EXEEXT) $(am__EXEEXT_2)
 am__EXEEXT_4 = src/testsuite/vunify-functest$(EXEEXT) \
        src/testsuite/chcontext-test$(EXEEXT) \
@@ -831,17 +853,20 @@ am__EXEEXT_4 = src/testsuite/vunify-functest$(EXEEXT) \
 @ENSC_HAVE_C99_COMPILER_TRUE@  lib_internal/testsuite/sigbus-gnu$(EXEEXT) \
 @ENSC_HAVE_C99_COMPILER_TRUE@  lib_internal/testsuite/matchlist$(EXEEXT) \
 @ENSC_HAVE_C99_COMPILER_TRUE@  lib_internal/testsuite/matchlist-gnu$(EXEEXT)
 @ENSC_HAVE_C99_COMPILER_TRUE@  lib_internal/testsuite/sigbus-gnu$(EXEEXT) \
 @ENSC_HAVE_C99_COMPILER_TRUE@  lib_internal/testsuite/matchlist$(EXEEXT) \
 @ENSC_HAVE_C99_COMPILER_TRUE@  lib_internal/testsuite/matchlist-gnu$(EXEEXT)
+@ENSC_HAVE_CRYPTO_TRUE@am__EXEEXT_6 =  \
+@ENSC_HAVE_CRYPTO_TRUE@        lib_internal/testsuite/crypto$(EXEEXT) \
+@ENSC_HAVE_CRYPTO_TRUE@        lib_internal/testsuite/crypto-speed$(EXEEXT)
 legacyPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
 legacyPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
-am__EXEEXT_6 = tests/getctx$(EXEEXT) tests/getinitpid$(EXEEXT) \
+am__EXEEXT_7 = tests/getctx$(EXEEXT) tests/getinitpid$(EXEEXT) \
        tests/vserver-info$(EXEEXT)
        tests/vserver-info$(EXEEXT)
-am__EXEEXT_7 = src/vunify$(EXEEXT) src/vcopy$(EXEEXT) \
+am__EXEEXT_8 = src/vunify$(EXEEXT) src/vcopy$(EXEEXT) \
        src/vclone$(EXEEXT)
        src/vclone$(EXEEXT)
-@ENSC_HAVE_C99_COMPILER_TRUE@am__EXEEXT_8 = $(am__EXEEXT_7)
-@ENSC_HAVE_CXX_COMPILER_TRUE@am__EXEEXT_9 = $(am__EXEEXT_1)
-@ENSC_HAVE_BEECRYPT_TRUE@@ENSC_HAVE_C99_COMPILER_TRUE@am__EXEEXT_10 = src/vhashify$(EXEEXT)
-@ENSC_HAVE_C99_COMPILER_TRUE@am__EXEEXT_11 = vserver-start/vserver.start.bin$(EXEEXT)
+@ENSC_HAVE_C99_COMPILER_TRUE@am__EXEEXT_9 = $(am__EXEEXT_8)
+@ENSC_HAVE_CXX_COMPILER_TRUE@am__EXEEXT_10 = $(am__EXEEXT_1)
+@ENSC_HAVE_C99_COMPILER_TRUE@@ENSC_HAVE_CRYPTO_TRUE@am__EXEEXT_11 = src/vhashify$(EXEEXT)
+@ENSC_HAVE_C99_COMPILER_TRUE@am__EXEEXT_12 = vserver-start/vserver.start.bin$(EXEEXT)
 pkglibPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
 pkglibPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
-@ENSC_HAVE_C99_COMPILER_TRUE@am__EXEEXT_12 = src/vdlimit$(EXEEXT)
+@ENSC_HAVE_C99_COMPILER_TRUE@am__EXEEXT_13 = src/vdlimit$(EXEEXT)
 sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
 PROGRAMS = $(legacy_PROGRAMS) $(noinst_PROGRAMS) $(pkglib_PROGRAMS) \
        $(sbin_PROGRAMS)
 sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
 PROGRAMS = $(legacy_PROGRAMS) $(noinst_PROGRAMS) $(pkglib_PROGRAMS) \
        $(sbin_PROGRAMS)
@@ -897,6 +922,30 @@ am_lib_internal_testsuite_copy_OBJECTS =  \
 lib_internal_testsuite_copy_OBJECTS =  \
        $(am_lib_internal_testsuite_copy_OBJECTS)
 lib_internal_testsuite_copy_DEPENDENCIES = $(LIBINTERNAL_GLIBC)
 lib_internal_testsuite_copy_OBJECTS =  \
        $(am_lib_internal_testsuite_copy_OBJECTS)
 lib_internal_testsuite_copy_DEPENDENCIES = $(LIBINTERNAL_GLIBC)
+am__lib_internal_testsuite_crypto_SOURCES_DIST =  \
+       lib_internal/testsuite/crypto.c
+@ENSC_HAVE_CRYPTO_TRUE@am_lib_internal_testsuite_crypto_OBJECTS = lib_internal/testsuite/lib_internal_testsuite_crypto-crypto.$(OBJEXT)
+lib_internal_testsuite_crypto_OBJECTS =  \
+       $(am_lib_internal_testsuite_crypto_OBJECTS)
+am__DEPENDENCIES_1 =
+@ENSC_HAVE_CRYPTO_TRUE@lib_internal_testsuite_crypto_DEPENDENCIES =  \
+@ENSC_HAVE_CRYPTO_TRUE@        $(am__DEPENDENCIES_1)
+lib_internal_testsuite_crypto_LINK = $(LIBTOOL) --tag=CC \
+       $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+       $(lib_internal_testsuite_crypto_CFLAGS) $(CFLAGS) \
+       $(lib_internal_testsuite_crypto_LDFLAGS) $(LDFLAGS) -o $@
+am__lib_internal_testsuite_crypto_speed_SOURCES_DIST =  \
+       lib_internal/testsuite/crypto-speed.c
+@ENSC_HAVE_CRYPTO_TRUE@am_lib_internal_testsuite_crypto_speed_OBJECTS = lib_internal/testsuite/lib_internal_testsuite_crypto_speed-crypto-speed.$(OBJEXT)
+lib_internal_testsuite_crypto_speed_OBJECTS =  \
+       $(am_lib_internal_testsuite_crypto_speed_OBJECTS)
+@ENSC_HAVE_CRYPTO_TRUE@lib_internal_testsuite_crypto_speed_DEPENDENCIES =  \
+@ENSC_HAVE_CRYPTO_TRUE@        $(am__DEPENDENCIES_1)
+lib_internal_testsuite_crypto_speed_LINK = $(LIBTOOL) --tag=CC \
+       $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+       $(lib_internal_testsuite_crypto_speed_CFLAGS) $(CFLAGS) \
+       $(lib_internal_testsuite_crypto_speed_LDFLAGS) $(LDFLAGS) -o \
+       $@
 am_lib_internal_testsuite_filecfg_ml_OBJECTS =  \
        lib_internal/testsuite/filecfg-ml.$(OBJEXT)
 lib_internal_testsuite_filecfg_ml_OBJECTS =  \
 am_lib_internal_testsuite_filecfg_ml_OBJECTS =  \
        lib_internal/testsuite/filecfg-ml.$(OBJEXT)
 lib_internal_testsuite_filecfg_ml_OBJECTS =  \
@@ -930,7 +979,6 @@ lib_internal_testsuite_sigbus_gnu_OBJECTS =  \
 lib_internal_testsuite_sigbus_gnu_LDADD = $(LDADD)
 am_src_capchroot_OBJECTS = src/capchroot.$(OBJEXT)
 src_capchroot_OBJECTS = $(am_src_capchroot_OBJECTS)
 lib_internal_testsuite_sigbus_gnu_LDADD = $(LDADD)
 am_src_capchroot_OBJECTS = src/capchroot.$(OBJEXT)
 src_capchroot_OBJECTS = $(am_src_capchroot_OBJECTS)
-am__DEPENDENCIES_1 =
 am__DEPENDENCIES_2 = $(LIBVSERVER) $(am__DEPENDENCIES_1)
 src_capchroot_DEPENDENCIES = $(am__DEPENDENCIES_2)
 src_capchroot_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
 am__DEPENDENCIES_2 = $(LIBVSERVER) $(am__DEPENDENCIES_1)
 src_capchroot_DEPENDENCIES = $(am__DEPENDENCIES_2)
 src_capchroot_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
@@ -1090,35 +1138,40 @@ src_testsuite_chcontext_test_OBJECTS =  \
        $(am_src_testsuite_chcontext_test_OBJECTS)
 src_testsuite_chcontext_test_DEPENDENCIES = lib/libvserver.la \
        $(LIBINTERNAL)
        $(am_src_testsuite_chcontext_test_OBJECTS)
 src_testsuite_chcontext_test_DEPENDENCIES = lib/libvserver.la \
        $(LIBINTERNAL)
-am_src_testsuite_hashcalc_OBJECTS = src/testsuite/hashcalc.$(OBJEXT)
+am_src_testsuite_hashcalc_OBJECTS =  \
+       src/testsuite/src_testsuite_hashcalc-hashcalc.$(OBJEXT)
 src_testsuite_hashcalc_OBJECTS = $(am_src_testsuite_hashcalc_OBJECTS)
 src_testsuite_hashcalc_OBJECTS = $(am_src_testsuite_hashcalc_OBJECTS)
-@ENSC_CAN_BEECRYPT_WITH_DIETLIBC_FALSE@src_testsuite_hashcalc_DEPENDENCIES =  \
-@ENSC_CAN_BEECRYPT_WITH_DIETLIBC_FALSE@        $(LIBINTERNAL_GLIBC) \
-@ENSC_CAN_BEECRYPT_WITH_DIETLIBC_FALSE@        $(LIBENSCVECTOR_GLIBC) \
-@ENSC_CAN_BEECRYPT_WITH_DIETLIBC_FALSE@        $(LIBVSERVER_GLIBC)
-@ENSC_CAN_BEECRYPT_WITH_DIETLIBC_TRUE@src_testsuite_hashcalc_DEPENDENCIES =  \
-@ENSC_CAN_BEECRYPT_WITH_DIETLIBC_TRUE@ $(LIBINTERNAL) \
-@ENSC_CAN_BEECRYPT_WITH_DIETLIBC_TRUE@ $(LIBENSCVECTOR) \
-@ENSC_CAN_BEECRYPT_WITH_DIETLIBC_TRUE@ $(am__DEPENDENCIES_2)
+@ENSC_CAN_CRYPTO_WITH_DIETLIBC_FALSE@src_testsuite_hashcalc_DEPENDENCIES =  \
+@ENSC_CAN_CRYPTO_WITH_DIETLIBC_FALSE@  $(LIBINTERNAL_GLIBC) \
+@ENSC_CAN_CRYPTO_WITH_DIETLIBC_FALSE@  $(LIBENSCVECTOR_GLIBC) \
+@ENSC_CAN_CRYPTO_WITH_DIETLIBC_FALSE@  $(LIBVSERVER_GLIBC) \
+@ENSC_CAN_CRYPTO_WITH_DIETLIBC_FALSE@  $(am__DEPENDENCIES_1)
+@ENSC_CAN_CRYPTO_WITH_DIETLIBC_TRUE@src_testsuite_hashcalc_DEPENDENCIES =  \
+@ENSC_CAN_CRYPTO_WITH_DIETLIBC_TRUE@   $(LIBINTERNAL) \
+@ENSC_CAN_CRYPTO_WITH_DIETLIBC_TRUE@   $(LIBENSCVECTOR) \
+@ENSC_CAN_CRYPTO_WITH_DIETLIBC_TRUE@   $(am__DEPENDENCIES_1) \
+@ENSC_CAN_CRYPTO_WITH_DIETLIBC_TRUE@   $(am__DEPENDENCIES_2)
 src_testsuite_hashcalc_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
 src_testsuite_hashcalc_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
-       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+       $(src_testsuite_hashcalc_CFLAGS) $(CFLAGS) \
        $(src_testsuite_hashcalc_LDFLAGS) $(LDFLAGS) -o $@
        $(src_testsuite_hashcalc_LDFLAGS) $(LDFLAGS) -o $@
-am_src_testsuite_hashcalc_plain_OBJECTS =  \
-       src/testsuite/hashcalc-plain.$(OBJEXT)
+am_src_testsuite_hashcalc_plain_OBJECTS = src/testsuite/src_testsuite_hashcalc_plain-hashcalc-plain.$(OBJEXT)
 src_testsuite_hashcalc_plain_OBJECTS =  \
        $(am_src_testsuite_hashcalc_plain_OBJECTS)
 src_testsuite_hashcalc_plain_OBJECTS =  \
        $(am_src_testsuite_hashcalc_plain_OBJECTS)
-@ENSC_CAN_BEECRYPT_WITH_DIETLIBC_FALSE@src_testsuite_hashcalc_plain_DEPENDENCIES =  \
-@ENSC_CAN_BEECRYPT_WITH_DIETLIBC_FALSE@        $(LIBINTERNAL_GLIBC) \
-@ENSC_CAN_BEECRYPT_WITH_DIETLIBC_FALSE@        $(LIBENSCVECTOR_GLIBC) \
-@ENSC_CAN_BEECRYPT_WITH_DIETLIBC_FALSE@        $(LIBVSERVER_GLIBC)
-@ENSC_CAN_BEECRYPT_WITH_DIETLIBC_TRUE@src_testsuite_hashcalc_plain_DEPENDENCIES =  \
-@ENSC_CAN_BEECRYPT_WITH_DIETLIBC_TRUE@ $(LIBINTERNAL) \
-@ENSC_CAN_BEECRYPT_WITH_DIETLIBC_TRUE@ $(LIBENSCVECTOR) \
-@ENSC_CAN_BEECRYPT_WITH_DIETLIBC_TRUE@ $(am__DEPENDENCIES_2)
+@ENSC_CAN_CRYPTO_WITH_DIETLIBC_FALSE@src_testsuite_hashcalc_plain_DEPENDENCIES =  \
+@ENSC_CAN_CRYPTO_WITH_DIETLIBC_FALSE@  $(LIBINTERNAL_GLIBC) \
+@ENSC_CAN_CRYPTO_WITH_DIETLIBC_FALSE@  $(LIBENSCVECTOR_GLIBC) \
+@ENSC_CAN_CRYPTO_WITH_DIETLIBC_FALSE@  $(LIBVSERVER_GLIBC) \
+@ENSC_CAN_CRYPTO_WITH_DIETLIBC_FALSE@  $(am__DEPENDENCIES_1)
+@ENSC_CAN_CRYPTO_WITH_DIETLIBC_TRUE@src_testsuite_hashcalc_plain_DEPENDENCIES =  \
+@ENSC_CAN_CRYPTO_WITH_DIETLIBC_TRUE@   $(LIBINTERNAL) \
+@ENSC_CAN_CRYPTO_WITH_DIETLIBC_TRUE@   $(LIBENSCVECTOR) \
+@ENSC_CAN_CRYPTO_WITH_DIETLIBC_TRUE@   $(am__DEPENDENCIES_1) \
+@ENSC_CAN_CRYPTO_WITH_DIETLIBC_TRUE@   $(am__DEPENDENCIES_2)
 src_testsuite_hashcalc_plain_LINK = $(LIBTOOL) --tag=CC \
        $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
 src_testsuite_hashcalc_plain_LINK = $(LIBTOOL) --tag=CC \
        $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
-       $(AM_CFLAGS) $(CFLAGS) $(src_testsuite_hashcalc_plain_LDFLAGS) \
-       $(LDFLAGS) -o $@
+       $(src_testsuite_hashcalc_plain_CFLAGS) $(CFLAGS) \
+       $(src_testsuite_hashcalc_plain_LDFLAGS) $(LDFLAGS) -o $@
 am_src_testsuite_rpm_fake_test_OBJECTS =  \
        src/testsuite/rpm-fake-test.$(OBJEXT)
 src_testsuite_rpm_fake_test_OBJECTS =  \
 am_src_testsuite_rpm_fake_test_OBJECTS =  \
        src/testsuite/rpm-fake-test.$(OBJEXT)
 src_testsuite_rpm_fake_test_OBJECTS =  \
@@ -1128,6 +1181,12 @@ am_src_testsuite_vunify_functest_OBJECTS = src/testsuite/src_testsuite_vunify_fu
 src_testsuite_vunify_functest_OBJECTS =  \
        $(am_src_testsuite_vunify_functest_OBJECTS)
 src_testsuite_vunify_functest_DEPENDENCIES = $(LIBINTERNAL)
 src_testsuite_vunify_functest_OBJECTS =  \
        $(am_src_testsuite_vunify_functest_OBJECTS)
 src_testsuite_vunify_functest_DEPENDENCIES = $(LIBINTERNAL)
+am_src_tunctl_OBJECTS = src/tunctl.$(OBJEXT)
+src_tunctl_OBJECTS = $(am_src_tunctl_OBJECTS)
+src_tunctl_DEPENDENCIES = $(am__DEPENDENCIES_2) $(LIBINTERNAL)
+src_tunctl_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+       $(src_tunctl_LDFLAGS) $(LDFLAGS) -o $@
 am_src_vattribute_OBJECTS = src/vattribute.$(OBJEXT)
 src_vattribute_OBJECTS = $(am_src_vattribute_OBJECTS)
 src_vattribute_DEPENDENCIES = $(am__DEPENDENCIES_2)
 am_src_vattribute_OBJECTS = src/vattribute.$(OBJEXT)
 src_vattribute_OBJECTS = $(am_src_vattribute_OBJECTS)
 src_vattribute_DEPENDENCIES = $(am__DEPENDENCIES_2)
@@ -1170,19 +1229,21 @@ src_vdu_DEPENDENCIES = $(am__DEPENDENCIES_2) $(LIBINTERNAL)
 src_vdu_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
        --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(src_vdu_LDFLAGS) \
        $(LDFLAGS) -o $@
 src_vdu_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
        --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(src_vdu_LDFLAGS) \
        $(LDFLAGS) -o $@
-am_src_vhashify_OBJECTS = src/vhashify.$(OBJEXT)
+am_src_vhashify_OBJECTS = src/src_vhashify-vhashify.$(OBJEXT)
 src_vhashify_OBJECTS = $(am_src_vhashify_OBJECTS)
 src_vhashify_OBJECTS = $(am_src_vhashify_OBJECTS)
-@ENSC_CAN_BEECRYPT_WITH_DIETLIBC_FALSE@src_vhashify_DEPENDENCIES =  \
-@ENSC_CAN_BEECRYPT_WITH_DIETLIBC_FALSE@        $(LIBINTERNAL_GLIBC) \
-@ENSC_CAN_BEECRYPT_WITH_DIETLIBC_FALSE@        $(LIBENSCVECTOR_GLIBC) \
-@ENSC_CAN_BEECRYPT_WITH_DIETLIBC_FALSE@        $(LIBVSERVER_GLIBC)
-@ENSC_CAN_BEECRYPT_WITH_DIETLIBC_TRUE@src_vhashify_DEPENDENCIES =  \
-@ENSC_CAN_BEECRYPT_WITH_DIETLIBC_TRUE@ $(LIBINTERNAL) \
-@ENSC_CAN_BEECRYPT_WITH_DIETLIBC_TRUE@ $(LIBENSCVECTOR) \
-@ENSC_CAN_BEECRYPT_WITH_DIETLIBC_TRUE@ $(am__DEPENDENCIES_2)
+@ENSC_CAN_CRYPTO_WITH_DIETLIBC_FALSE@src_vhashify_DEPENDENCIES =  \
+@ENSC_CAN_CRYPTO_WITH_DIETLIBC_FALSE@  $(LIBINTERNAL_GLIBC) \
+@ENSC_CAN_CRYPTO_WITH_DIETLIBC_FALSE@  $(LIBENSCVECTOR_GLIBC) \
+@ENSC_CAN_CRYPTO_WITH_DIETLIBC_FALSE@  $(LIBVSERVER_GLIBC) \
+@ENSC_CAN_CRYPTO_WITH_DIETLIBC_FALSE@  $(am__DEPENDENCIES_1)
+@ENSC_CAN_CRYPTO_WITH_DIETLIBC_TRUE@src_vhashify_DEPENDENCIES =  \
+@ENSC_CAN_CRYPTO_WITH_DIETLIBC_TRUE@   $(LIBINTERNAL) \
+@ENSC_CAN_CRYPTO_WITH_DIETLIBC_TRUE@   $(LIBENSCVECTOR) \
+@ENSC_CAN_CRYPTO_WITH_DIETLIBC_TRUE@   $(am__DEPENDENCIES_1) \
+@ENSC_CAN_CRYPTO_WITH_DIETLIBC_TRUE@   $(am__DEPENDENCIES_2)
 src_vhashify_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
 src_vhashify_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
-       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-       $(src_vhashify_LDFLAGS) $(LDFLAGS) -o $@
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(src_vhashify_CFLAGS) \
+       $(CFLAGS) $(src_vhashify_LDFLAGS) $(LDFLAGS) -o $@
 am_src_vkill_OBJECTS = src/src_vkill-vkill.$(OBJEXT)
 src_vkill_OBJECTS = $(am_src_vkill_OBJECTS)
 src_vkill_DEPENDENCIES = $(am__DEPENDENCIES_2)
 am_src_vkill_OBJECTS = src/src_vkill-vkill.$(OBJEXT)
 src_vkill_OBJECTS = $(am_src_vkill_OBJECTS)
 src_vkill_DEPENDENCIES = $(am__DEPENDENCIES_2)
@@ -1195,6 +1256,12 @@ src_vlimit_DEPENDENCIES = $(am__DEPENDENCIES_2)
 src_vlimit_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
        $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
        $(src_vlimit_LDFLAGS) $(LDFLAGS) -o $@
 src_vlimit_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
        $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
        $(src_vlimit_LDFLAGS) $(LDFLAGS) -o $@
+am_src_vmemctrl_OBJECTS = src/vmemctrl.$(OBJEXT)
+src_vmemctrl_OBJECTS = $(am_src_vmemctrl_OBJECTS)
+src_vmemctrl_DEPENDENCIES = $(am__DEPENDENCIES_2) $(LIBINTERNAL)
+src_vmemctrl_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+       $(src_vmemctrl_LDFLAGS) $(LDFLAGS) -o $@
 am_src_vnamespace_OBJECTS = src/vnamespace.$(OBJEXT)
 src_vnamespace_OBJECTS = $(am_src_vnamespace_OBJECTS)
 src_vnamespace_DEPENDENCIES = $(am__DEPENDENCIES_2) $(LIBINTERNAL)
 am_src_vnamespace_OBJECTS = src/vnamespace.$(OBJEXT)
 src_vnamespace_OBJECTS = $(am_src_vnamespace_OBJECTS)
 src_vnamespace_DEPENDENCIES = $(am__DEPENDENCIES_2) $(LIBINTERNAL)
@@ -1235,6 +1302,12 @@ src_vserver_stat_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
 am_src_vshelper_sync_OBJECTS = src/vshelper-sync.$(OBJEXT)
 src_vshelper_sync_OBJECTS = $(am_src_vshelper_sync_OBJECTS)
 src_vshelper_sync_LDADD = $(LDADD)
 am_src_vshelper_sync_OBJECTS = src/vshelper-sync.$(OBJEXT)
 src_vshelper_sync_OBJECTS = $(am_src_vshelper_sync_OBJECTS)
 src_vshelper_sync_LDADD = $(LDADD)
+am_src_vspace_OBJECTS = src/vspace.$(OBJEXT)
+src_vspace_OBJECTS = $(am_src_vspace_OBJECTS)
+src_vspace_DEPENDENCIES = $(am__DEPENDENCIES_2) $(LIBINTERNAL)
+src_vspace_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+       $(src_vspace_LDFLAGS) $(LDFLAGS) -o $@
 am_src_vsysctl_OBJECTS = src/vsysctl.$(OBJEXT)
 src_vsysctl_OBJECTS = $(am_src_vsysctl_OBJECTS)
 src_vsysctl_DEPENDENCIES = $(am__DEPENDENCIES_2)
 am_src_vsysctl_OBJECTS = src/vsysctl.$(OBJEXT)
 src_vsysctl_OBJECTS = $(am_src_vsysctl_OBJECTS)
 src_vsysctl_DEPENDENCIES = $(am__DEPENDENCIES_2)
@@ -1351,6 +1424,8 @@ SOURCES = $(nodist_lib_dietlibc_not_enabled_error_a_SOURCES) \
        $(lib_testsuite_personality_SOURCES) \
        $(lib_internal_testsuite_command_SOURCES) \
        $(lib_internal_testsuite_copy_SOURCES) \
        $(lib_testsuite_personality_SOURCES) \
        $(lib_internal_testsuite_command_SOURCES) \
        $(lib_internal_testsuite_copy_SOURCES) \
+       $(lib_internal_testsuite_crypto_SOURCES) \
+       $(lib_internal_testsuite_crypto_speed_SOURCES) \
        $(lib_internal_testsuite_filecfg_ml_SOURCES) \
        $(lib_internal_testsuite_isnumber_SOURCES) \
        $(lib_internal_testsuite_isnumber_gnu_SOURCES) \
        $(lib_internal_testsuite_filecfg_ml_SOURCES) \
        $(lib_internal_testsuite_isnumber_SOURCES) \
        $(lib_internal_testsuite_isnumber_gnu_SOURCES) \
@@ -1378,16 +1453,17 @@ SOURCES = $(nodist_lib_dietlibc_not_enabled_error_a_SOURCES) \
        $(src_testsuite_hashcalc_SOURCES) \
        $(src_testsuite_hashcalc_plain_SOURCES) \
        $(src_testsuite_rpm_fake_test_SOURCES) \
        $(src_testsuite_hashcalc_SOURCES) \
        $(src_testsuite_hashcalc_plain_SOURCES) \
        $(src_testsuite_rpm_fake_test_SOURCES) \
-       $(src_testsuite_vunify_functest_SOURCES) \
+       $(src_testsuite_vunify_functest_SOURCES) $(src_tunctl_SOURCES) \
        $(src_vattribute_SOURCES) $(src_vclone_SOURCES) \
        $(src_vcontext_SOURCES) $(src_vcopy_SOURCES) \
        $(src_vdevmap_SOURCES) $(src_vdlimit_SOURCES) \
        $(src_vdu_SOURCES) $(src_vhashify_SOURCES) \
        $(src_vkill_SOURCES) $(src_vlimit_SOURCES) \
        $(src_vattribute_SOURCES) $(src_vclone_SOURCES) \
        $(src_vcontext_SOURCES) $(src_vcopy_SOURCES) \
        $(src_vdevmap_SOURCES) $(src_vdlimit_SOURCES) \
        $(src_vdu_SOURCES) $(src_vhashify_SOURCES) \
        $(src_vkill_SOURCES) $(src_vlimit_SOURCES) \
-       $(src_vnamespace_SOURCES) $(src_vps_SOURCES) \
-       $(src_vreboot_SOURCES) src/vrsetup.c $(src_vsched_SOURCES) \
-       $(src_vserver_info_SOURCES) $(src_vserver_stat_SOURCES) \
-       $(src_vshelper_sync_SOURCES) $(src_vsysctl_SOURCES) \
+       $(src_vmemctrl_SOURCES) $(src_vnamespace_SOURCES) \
+       $(src_vps_SOURCES) $(src_vreboot_SOURCES) src/vrsetup.c \
+       $(src_vsched_SOURCES) $(src_vserver_info_SOURCES) \
+       $(src_vserver_stat_SOURCES) $(src_vshelper_sync_SOURCES) \
+       $(src_vspace_SOURCES) $(src_vsysctl_SOURCES) \
        $(src_vtag_SOURCES) $(src_vuname_SOURCES) \
        $(src_vunify_SOURCES) $(src_vwait_SOURCES) \
        $(tests_escaperoot_SOURCES) $(tests_forkbomb_SOURCES) \
        $(src_vtag_SOURCES) $(src_vuname_SOURCES) \
        $(src_vunify_SOURCES) $(src_vwait_SOURCES) \
        $(tests_escaperoot_SOURCES) $(tests_forkbomb_SOURCES) \
@@ -1409,6 +1485,8 @@ DIST_SOURCES = $(am__lib_libvserver_a_SOURCES_DIST) \
        $(lib_testsuite_personality_SOURCES) \
        $(lib_internal_testsuite_command_SOURCES) \
        $(lib_internal_testsuite_copy_SOURCES) \
        $(lib_testsuite_personality_SOURCES) \
        $(lib_internal_testsuite_command_SOURCES) \
        $(lib_internal_testsuite_copy_SOURCES) \
+       $(am__lib_internal_testsuite_crypto_SOURCES_DIST) \
+       $(am__lib_internal_testsuite_crypto_speed_SOURCES_DIST) \
        $(lib_internal_testsuite_filecfg_ml_SOURCES) \
        $(lib_internal_testsuite_isnumber_SOURCES) \
        $(lib_internal_testsuite_isnumber_gnu_SOURCES) \
        $(lib_internal_testsuite_filecfg_ml_SOURCES) \
        $(lib_internal_testsuite_isnumber_SOURCES) \
        $(lib_internal_testsuite_isnumber_gnu_SOURCES) \
@@ -1436,16 +1514,17 @@ DIST_SOURCES = $(am__lib_libvserver_a_SOURCES_DIST) \
        $(src_testsuite_hashcalc_SOURCES) \
        $(src_testsuite_hashcalc_plain_SOURCES) \
        $(src_testsuite_rpm_fake_test_SOURCES) \
        $(src_testsuite_hashcalc_SOURCES) \
        $(src_testsuite_hashcalc_plain_SOURCES) \
        $(src_testsuite_rpm_fake_test_SOURCES) \
-       $(src_testsuite_vunify_functest_SOURCES) \
+       $(src_testsuite_vunify_functest_SOURCES) $(src_tunctl_SOURCES) \
        $(src_vattribute_SOURCES) $(src_vclone_SOURCES) \
        $(src_vcontext_SOURCES) $(src_vcopy_SOURCES) \
        $(src_vdevmap_SOURCES) $(src_vdlimit_SOURCES) \
        $(src_vdu_SOURCES) $(src_vhashify_SOURCES) \
        $(src_vkill_SOURCES) $(src_vlimit_SOURCES) \
        $(src_vattribute_SOURCES) $(src_vclone_SOURCES) \
        $(src_vcontext_SOURCES) $(src_vcopy_SOURCES) \
        $(src_vdevmap_SOURCES) $(src_vdlimit_SOURCES) \
        $(src_vdu_SOURCES) $(src_vhashify_SOURCES) \
        $(src_vkill_SOURCES) $(src_vlimit_SOURCES) \
-       $(src_vnamespace_SOURCES) $(src_vps_SOURCES) \
-       $(src_vreboot_SOURCES) src/vrsetup.c $(src_vsched_SOURCES) \
-       $(src_vserver_info_SOURCES) $(src_vserver_stat_SOURCES) \
-       $(src_vshelper_sync_SOURCES) $(src_vsysctl_SOURCES) \
+       $(src_vmemctrl_SOURCES) $(src_vnamespace_SOURCES) \
+       $(src_vps_SOURCES) $(src_vreboot_SOURCES) src/vrsetup.c \
+       $(src_vsched_SOURCES) $(src_vserver_info_SOURCES) \
+       $(src_vserver_stat_SOURCES) $(src_vshelper_sync_SOURCES) \
+       $(src_vspace_SOURCES) $(src_vsysctl_SOURCES) \
        $(src_vtag_SOURCES) $(src_vuname_SOURCES) \
        $(src_vunify_SOURCES) $(src_vwait_SOURCES) \
        $(tests_escaperoot_SOURCES) $(tests_forkbomb_SOURCES) \
        $(src_vtag_SOURCES) $(src_vuname_SOURCES) \
        $(src_vunify_SOURCES) $(src_vwait_SOURCES) \
        $(tests_escaperoot_SOURCES) $(tests_forkbomb_SOURCES) \
@@ -1473,11 +1552,11 @@ RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
   distclean-recursive maintainer-clean-recursive
 ETAGS = etags
 CTAGS = ctags
   distclean-recursive maintainer-clean-recursive
 ETAGS = etags
 CTAGS = ctags
-@ENSC_HAVE_C99_COMPILER_TRUE@am__EXEEXT_13 =  \
+@ENSC_HAVE_C99_COMPILER_TRUE@am__EXEEXT_14 =  \
 @ENSC_HAVE_C99_COMPILER_TRUE@  src/testsuite/vunify-test.sh \
 @ENSC_HAVE_C99_COMPILER_TRUE@  $(am__append_7)
 @ENSC_HAVE_C99_COMPILER_TRUE@  src/testsuite/vunify-test.sh \
 @ENSC_HAVE_C99_COMPILER_TRUE@  $(am__append_7)
-am__EXEEXT_14 = $(am__EXEEXT_13)
-@ENSC_HAVE_C99_COMPILER_TRUE@am__EXEEXT_15 = lib_internal/testsuite/filecfg-ml$(EXEEXT) \
+am__EXEEXT_15 = $(am__EXEEXT_14)
+@ENSC_HAVE_C99_COMPILER_TRUE@am__EXEEXT_16 = lib_internal/testsuite/filecfg-ml$(EXEEXT) \
 @ENSC_HAVE_C99_COMPILER_TRUE@  lib_internal/testsuite/copy-check \
 @ENSC_HAVE_C99_COMPILER_TRUE@  lib_internal/testsuite/isnumber$(EXEEXT) \
 @ENSC_HAVE_C99_COMPILER_TRUE@  lib_internal/testsuite/isnumber-gnu$(EXEEXT) \
 @ENSC_HAVE_C99_COMPILER_TRUE@  lib_internal/testsuite/copy-check \
 @ENSC_HAVE_C99_COMPILER_TRUE@  lib_internal/testsuite/isnumber$(EXEEXT) \
 @ENSC_HAVE_C99_COMPILER_TRUE@  lib_internal/testsuite/isnumber-gnu$(EXEEXT) \
@@ -1485,6 +1564,8 @@ am__EXEEXT_14 = $(am__EXEEXT_13)
 @ENSC_HAVE_C99_COMPILER_TRUE@  lib_internal/testsuite/sigbus-gnu$(EXEEXT) \
 @ENSC_HAVE_C99_COMPILER_TRUE@  lib_internal/testsuite/matchlist$(EXEEXT) \
 @ENSC_HAVE_C99_COMPILER_TRUE@  lib_internal/testsuite/matchlist-gnu$(EXEEXT)
 @ENSC_HAVE_C99_COMPILER_TRUE@  lib_internal/testsuite/sigbus-gnu$(EXEEXT) \
 @ENSC_HAVE_C99_COMPILER_TRUE@  lib_internal/testsuite/matchlist$(EXEEXT) \
 @ENSC_HAVE_C99_COMPILER_TRUE@  lib_internal/testsuite/matchlist-gnu$(EXEEXT)
+@ENSC_HAVE_CRYPTO_TRUE@am__EXEEXT_17 =  \
+@ENSC_HAVE_CRYPTO_TRUE@        lib_internal/testsuite/crypto$(EXEEXT)
 DIST_SUBDIRS = $(SUBDIRS)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
 DIST_SUBDIRS = $(SUBDIRS)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
@@ -1531,6 +1612,8 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ENSC_CRYPTO_CFLAGS = @ENSC_CRYPTO_CFLAGS@
+ENSC_CRYPTO_LIB = @ENSC_CRYPTO_LIB@
 ENSC_PATHPROG_SED = @ENSC_PATHPROG_SED@
 ENSC_USE_EXPENSIVE_TESTS = @ENSC_USE_EXPENSIVE_TESTS@
 ENV = @ENV@
 ENSC_PATHPROG_SED = @ENSC_PATHPROG_SED@
 ENSC_USE_EXPENSIVE_TESTS = @ENSC_USE_EXPENSIVE_TESTS@
 ENV = @ENV@
@@ -1538,6 +1621,7 @@ EXEEXT = @EXEEXT@
 F77 = @F77@
 FFLAGS = @FFLAGS@
 FILE = @FILE@
 F77 = @F77@
 FFLAGS = @FFLAGS@
 FILE = @FILE@
+FSCK = @FSCK@
 GPG_KEY = @GPG_KEY@
 GREP = @GREP@
 GZIP = @GZIP@
 GPG_KEY = @GPG_KEY@
 GREP = @GREP@
 GZIP = @GZIP@
@@ -1568,6 +1652,8 @@ MV = @MV@
 NAMEIF = @NAMEIF@
 NICE = @NICE@
 NOHUP = @NOHUP@
 NAMEIF = @NAMEIF@
 NICE = @NICE@
 NOHUP = @NOHUP@
+NSS_CFLAGS = @NSS_CFLAGS@
+NSS_LIBS = @NSS_LIBS@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -1576,6 +1662,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
 PS = @PS@
 RANLIB = @RANLIB@
 RELEASE_CPPFLAGS = @RELEASE_CPPFLAGS@
 PS = @PS@
 RANLIB = @RANLIB@
 RELEASE_CPPFLAGS = @RELEASE_CPPFLAGS@
@@ -1679,7 +1766,8 @@ noinst_HEADERS = $(ENSC_VECTOR_HDRS) compat.h compat-c99.h \
        src/compat-pivot_root.h src/stack-start.h src/vcopy-init.hc \
        src/vunify.h src/vunify-init.hc src/vhashify.h \
        src/vhashify-init.hc src/vserver-visitdir.hc \
        src/compat-pivot_root.h src/stack-start.h src/vcopy-init.hc \
        src/vunify.h src/vunify-init.hc src/vhashify.h \
        src/vhashify-init.hc src/vserver-visitdir.hc \
-       src/context-sync.hc ensc_wrappers/wrappers-clone.hc \
+       src/context-sync.hc src/attribute-util.h \
+       ensc_wrappers/wrappers-clone.hc \
        ensc_wrappers/wrappers-dirent.hc \
        ensc_wrappers/wrappers-fcntl.hc ensc_wrappers/wrappers-io.hc \
        ensc_wrappers/wrappers-ioctl.hc \
        ensc_wrappers/wrappers-dirent.hc \
        ensc_wrappers/wrappers-fcntl.hc ensc_wrappers/wrappers-io.hc \
        ensc_wrappers/wrappers-ioctl.hc \
@@ -1696,14 +1784,17 @@ noinst_HEADERS = $(ENSC_VECTOR_HDRS) compat.h compat-c99.h \
        ensc_wrappers/wrappers-vserver.hc \
        ensc_wrappers/wrappers-wait.hc ensc_wrappers/wrappers.h \
        ensc_wrappers/wrappers_handler.hc lib_internal/coreassert.h \
        ensc_wrappers/wrappers-vserver.hc \
        ensc_wrappers/wrappers-wait.hc ensc_wrappers/wrappers.h \
        ensc_wrappers/wrappers_handler.hc lib_internal/coreassert.h \
-       lib_internal/errinfo.h lib_internal/jail.h \
-       lib_internal/matchlist.h lib_internal/pathinfo.h \
-       lib_internal/string.h lib_internal/sys_clone.h \
-       lib_internal/sys_personality.h lib_internal/sys_unshare.h \
-       lib_internal/unify.h lib_internal/util.h \
-       lib_internal/util-cast.h lib_internal/util-commonstrings.h \
-       lib_internal/util-debug.h lib_internal/util-declarecmd.h \
-       lib_internal/util-dimof.h lib_internal/util-dotfile.h \
+       lib_internal/crypto-wrapper.h \
+       lib_internal/crypto-wrapper-nss.h \
+       lib_internal/crypto-wrapper-beecrypt.h lib_internal/errinfo.h \
+       lib_internal/jail.h lib_internal/matchlist.h \
+       lib_internal/pathinfo.h lib_internal/string.h \
+       lib_internal/sys_clone.h lib_internal/sys_personality.h \
+       lib_internal/sys_unshare.h lib_internal/unify.h \
+       lib_internal/util.h lib_internal/util-cast.h \
+       lib_internal/util-commonstrings.h lib_internal/util-debug.h \
+       lib_internal/util-declarecmd.h lib_internal/util-dimof.h \
+       lib_internal/util-dotfile.h \
        lib_internal/util-exitlikeprocess.h lib_internal/util-io.h \
        lib_internal/util-lockfile.h lib_internal/util-mem.h \
        lib_internal/util-perror.h lib_internal/util-safechdir.h \
        lib_internal/util-exitlikeprocess.h lib_internal/util-io.h \
        lib_internal/util-lockfile.h lib_internal/util-mem.h \
        lib_internal/util-perror.h lib_internal/util-safechdir.h \
@@ -1713,7 +1804,7 @@ noinst_LIBRARIES = $(ENSC_VECTOR_LIBS) $(LIBINTERNAL_GLIBC) \
 lib_LIBRARIES = $(am__append_2)
 lib_LTLIBRARIES = $(LIBVSERVER_GLIBC)
 pkglib_LTLIBRARIES = src/rpm-fake.la
 lib_LIBRARIES = $(am__append_2)
 lib_LTLIBRARIES = $(LIBVSERVER_GLIBC)
 pkglib_LTLIBRARIES = src/rpm-fake.la
-pkglib_SCRIPTS = $(scripts_pkglib_src_SCRPTS) $(am__append_20)
+pkglib_SCRIPTS = $(scripts_pkglib_src_SCRPTS) $(am__append_23)
 pkglib_DATA = FEATURES.txt $(scripts_pkglib_src_DTA) \
        $(scripts_pkglib_gen_DTA)
 legacy_SCRIPTS = $(scripts_legacy_src_SCRPTS) \
 pkglib_DATA = FEATURES.txt $(scripts_pkglib_src_DTA) \
        $(scripts_pkglib_gen_DTA)
 legacy_SCRIPTS = $(scripts_legacy_src_SCRPTS) \
@@ -1721,7 +1812,7 @@ legacy_SCRIPTS = $(scripts_legacy_src_SCRPTS) \
 sbin_SCRIPTS = $(scripts_sbin_src_PRGS) $(scripts_sbin_gen_PRGS) \
        $(scripts_legacy_src_PRGS)
 noinst_DATA = $(contrib_gen_DTA)
 sbin_SCRIPTS = $(scripts_sbin_src_PRGS) $(scripts_sbin_gen_PRGS) \
        $(scripts_legacy_src_PRGS)
 noinst_DATA = $(contrib_gen_DTA)
-initrd_SCRIPTS = $(am__append_11) $(am__append_19)
+initrd_SCRIPTS = $(am__append_11) $(am__append_22)
 sysconf_DATA = $(am__append_10)
 DIETPROGS = $(LIBENSCVECTOR_DIET) lib/lib_libvserver_a-% \
        ensc_fmt/lib_libvserver_a-% lib/testsuite/cflags \
 sysconf_DATA = $(am__append_10)
 DIETPROGS = $(LIBENSCVECTOR_DIET) lib/lib_libvserver_a-% \
        ensc_fmt/lib_libvserver_a-% lib/testsuite/cflags \
@@ -1737,14 +1828,16 @@ DIETPROGS = $(LIBENSCVECTOR_DIET) lib/lib_libvserver_a-% \
        src/vsched src/vshelper-sync src/vrsetup src/vserver-stat \
        src/vserver-info src/vdlimit src/vdu src/vwait src/ncontext \
        src/nattribute src/naddress src/vdevmap src/vsysctl src/vclone \
        src/vsched src/vshelper-sync src/vrsetup src/vserver-stat \
        src/vserver-info src/vdlimit src/vdu src/vwait src/ncontext \
        src/nattribute src/naddress src/vdevmap src/vsysctl src/vclone \
-       src/h2ext src/vtag $(am__append_3) $(tests_dietprogs) \
+       src/h2ext src/vtag src/vspace src/vmemctrl src/tunctl \
+       $(am__append_3) $(tests_dietprogs) \
        lib_internal/libinternal-diet.a \
        lib_internal/testsuite/isnumber lib_internal/testsuite/sigbus \
        lib_internal/libinternal-diet.a \
        lib_internal/testsuite/isnumber lib_internal/testsuite/sigbus \
-       lib_internal/testsuite/matchlist $(am__append_17)
+       lib_internal/testsuite/matchlist $(am__append_19) \
+       $(am__append_20)
 BUILT_SOURCES = pathconfig.h \
                        .fixups
 
 BUILT_SOURCES = pathconfig.h \
                        .fixups
 
-man_MANS = $(man_pages)
+man_MANS = $(man_pages) $(man_gen_DTA)
 kernel_HDRS = $(wildcard kernel/*.h)
 EXTRA_DIST = pathconfig.h.pathsubst util-vserver.spec THANKS \
        REQUIREMENTS $(kernel_HDRS) lib/apidoc/list2xxx.syntax \
 kernel_HDRS = $(wildcard kernel/*.h)
 EXTRA_DIST = pathconfig.h.pathsubst util-vserver.spec THANKS \
        REQUIREMENTS $(kernel_HDRS) lib/apidoc/list2xxx.syntax \
@@ -1752,7 +1845,7 @@ EXTRA_DIST = pathconfig.h.pathsubst util-vserver.spec THANKS \
        src/testsuite/hashcalc.sh src/testsuite/hashcalc-plain.sh \
        src/testsuite/vwait-test.sh $(doc_compatibility_SRCS) \
        $(doc_configuration_SRCS) $(doc_old_doc) $(doc_gen_DOCS) \
        src/testsuite/hashcalc.sh src/testsuite/hashcalc-plain.sh \
        src/testsuite/vwait-test.sh $(doc_compatibility_SRCS) \
        $(doc_configuration_SRCS) $(doc_old_doc) $(doc_gen_DOCS) \
-       $(man_pages) $(scripts_pkglib_src_DTA) \
+       $(man_pages) $(man_susbt_SRCS) $(scripts_pkglib_src_DTA) \
        $(scripts_pkglib_src_SCRPTS) $(scripts_legacy_src_SCRPTS) \
        $(scripts_legacy_src_PRGS) $(scripts_sbin_src_PRGS) \
        $(scripts_subst_SRCS) sysv/v_gated.subst sysv/v_httpd.subst \
        $(scripts_pkglib_src_SCRPTS) $(scripts_legacy_src_SCRPTS) \
        $(scripts_legacy_src_PRGS) $(scripts_sbin_src_PRGS) \
        $(scripts_subst_SRCS) sysv/v_gated.subst sysv/v_httpd.subst \
@@ -1764,9 +1857,9 @@ EXTRA_DIST = pathconfig.h.pathsubst util-vserver.spec THANKS \
        contrib/yum-2.6.0-chroot.patch contrib/yum-2.9.6-chroot.patch \
        contrib/yum-3.0.3-chroot.patch contrib/yum-3.0.5-chroot.patch \
        contrib/yum-3.2.0-chroot.patch contrib/yum-3.2.1-chroot.patch \
        contrib/yum-2.6.0-chroot.patch contrib/yum-2.9.6-chroot.patch \
        contrib/yum-3.0.3-chroot.patch contrib/yum-3.0.5-chroot.patch \
        contrib/yum-3.2.0-chroot.patch contrib/yum-3.2.1-chroot.patch \
-       contrib/make-manifest lib_internal/testsuite/copy-check \
-       $(gentoo_src_SCRPTS) gentoo/bash-wrapper $(addsuffix \
-       .pc.subst, $(PKGCONFIG_FILES))
+       contrib/yum-3.2.4-chroot.patch contrib/make-manifest \
+       lib_internal/testsuite/copy-check $(gentoo_src_SCRPTS) \
+       gentoo/bash-wrapper $(addsuffix .pc.subst, $(PKGCONFIG_FILES))
 check_SCRIPTS = $(src_testsuite_check_src_SCRPTS) \
        $(src_testsuite_check_gen_SCRPTS)
 TESTS_DEBUG = no
 check_SCRIPTS = $(src_testsuite_check_src_SCRPTS) \
        $(src_testsuite_check_gen_SCRPTS)
 TESTS_DEBUG = no
@@ -1781,7 +1874,7 @@ AM_CPPFLAGS = -I $(top_srcdir)/lib -I $(top_srcdir)/ensc_wrappers \
 CLEANFILES = $(BUILT_SOURCES) .*.pathsubst.stamp */.*.pathsubst.stamp \
        */*/.*.pathsubst.stamp pathconfig.h .fixups lib/libvserver.la \
        lib/libvserver.a lib/apidoc/.apidoc doc/*.raw.html* \
 CLEANFILES = $(BUILT_SOURCES) .*.pathsubst.stamp */.*.pathsubst.stamp \
        */*/.*.pathsubst.stamp pathconfig.h .fixups lib/libvserver.la \
        lib/libvserver.a lib/apidoc/.apidoc doc/*.raw.html* \
-       doc/*.html.tmp $(am__append_8) $(am__append_9) \
+       doc/*.html.tmp $(am__append_8) $(am__append_9) $(man_gen_DTA) \
        $(scripts_pkglib_gen_DTA) $(scripts_sbin_gen_PRGS) \
        $(scripts_sbincfg_gen_DTA) $(scripts_legacy_gen_SCRPTS) \
        $(sysv_gen_SCRPTS) $(contrib_gen_DTA) libensc_vector-diet.a \
        $(scripts_pkglib_gen_DTA) $(scripts_sbin_gen_PRGS) \
        $(scripts_sbincfg_gen_DTA) $(scripts_legacy_gen_SCRPTS) \
        $(sysv_gen_SCRPTS) $(contrib_gen_DTA) libensc_vector-diet.a \
@@ -1796,12 +1889,12 @@ AM_INSTALLCHECK_STD_OPTIONS_EXEMPT = src/parserpmdump src/showperm \
        scripts/vyum-worker scripts/vrpm-preload \
        scripts/save_s_context scripts/vservers.grabinfo.sh \
        scripts/vpstree scripts/vserver-wrapper scripts/vsysvwrapper \
        scripts/vyum-worker scripts/vrpm-preload \
        scripts/save_s_context scripts/vservers.grabinfo.sh \
        scripts/vpstree scripts/vserver-wrapper scripts/vsysvwrapper \
-       scripts/vtop scripts/legacy/distrib-info scripts/legacy/vps \
-       scripts/legacy/save_s_context scripts/legacy/vserver \
-       scripts/legacy/rootshell scripts/legacy/vserver-copy \
-       scripts/legacy/vserverkillall $(sysv_src_SCRPTS) \
-       $(sysv_gen_SCRPTS) vserver-start/vserver.start.bin \
-       $(gentoo_src_SCRPTS)
+       scripts/vtop scripts/h2ext-worker scripts/legacy/distrib-info \
+       scripts/legacy/vps scripts/legacy/save_s_context \
+       scripts/legacy/vserver scripts/legacy/rootshell \
+       scripts/legacy/vserver-copy scripts/legacy/vserverkillall \
+       $(sysv_src_SCRPTS) $(sysv_gen_SCRPTS) \
+       vserver-start/vserver.start.bin $(gentoo_src_SCRPTS)
 @USE_DIETLIBC_TRUE@DIET_CC := $(DIET) $(DIETFLAGS) $(CC)
 @USE_DIETLIBC_FALSE@VSERVER_LDFLGS := 
 @USE_DIETLIBC_TRUE@VSERVER_LDFLGS := -static
 @USE_DIETLIBC_TRUE@DIET_CC := $(DIET) $(DIETFLAGS) $(CC)
 @USE_DIETLIBC_FALSE@VSERVER_LDFLGS := 
 @USE_DIETLIBC_TRUE@VSERVER_LDFLGS := -static
@@ -1932,6 +2025,8 @@ lib_v21_SRCS = lib/syscall_setccaps-v21.hc \
                                lib/syscall_ctxmigrate-v21.hc \
                                lib/syscall_setmapping.c \
                                lib/syscall_setmapping-v21.hc \
                                lib/syscall_ctxmigrate-v21.hc \
                                lib/syscall_setmapping.c \
                                lib/syscall_setmapping-v21.hc \
+                               lib/syscall_unsetmapping.c \
+                               lib/syscall_unsetmapping-v21.hc \
                                lib/syscall_schedinfo.c \
                                lib/syscall_schedinfo-v21.hc \
                                lib/syscall_getccaps-v21.hc \
                                lib/syscall_schedinfo.c \
                                lib/syscall_schedinfo-v21.hc \
                                lib/syscall_getccaps-v21.hc \
@@ -1952,7 +2047,11 @@ lib_v23_SRCS = lib/syscall_tagmigrate-v23.hc \
                                lib/syscall_tagmigrate.c \
                                lib/syscall_tagcreate.c \
                                lib/syscall_tasktag-v23.hc \
                                lib/syscall_tagmigrate.c \
                                lib/syscall_tagcreate.c \
                                lib/syscall_tasktag-v23.hc \
-                               lib/syscall_tasktag.c
+                               lib/syscall_tasktag.c \
+                               lib/syscall_getbadness.c \
+                               lib/syscall_getbadness-v23.hc \
+                               lib/syscall_setbadness.c \
+                               lib/syscall_setbadness-v23.hc
 
 PKGCONFIG_FILES = lib/util-vserver
 lib_SRCS = lib/syscall.c \
 
 PKGCONFIG_FILES = lib/util-vserver
 lib_SRCS = lib/syscall.c \
@@ -2113,10 +2212,11 @@ src_vunify_SOURCES = src/vunify.c
 src_vunify_LDADD = $(LIBINTERNAL) $(VSERVER_LDADDS)
 src_vunify_LDFLAGS = $(VSERVER_LDFLGS)
 src_vhashify_SOURCES = src/vhashify.c
 src_vunify_LDADD = $(LIBINTERNAL) $(VSERVER_LDADDS)
 src_vunify_LDFLAGS = $(VSERVER_LDFLGS)
 src_vhashify_SOURCES = src/vhashify.c
-@ENSC_CAN_BEECRYPT_WITH_DIETLIBC_FALSE@src_vhashify_LDADD = $(LIBINTERNAL_GLIBC) $(LIBENSCVECTOR_GLIBC) $(LIBVSERVER_GLIBC) -lbeecrypt
-@ENSC_CAN_BEECRYPT_WITH_DIETLIBC_TRUE@src_vhashify_LDADD = $(LIBINTERNAL) $(LIBENSCVECTOR) -lbeecrypt $(VSERVER_LDADDS)
-@ENSC_CAN_BEECRYPT_WITH_DIETLIBC_FALSE@src_vhashify_LDFLAGS = 
-@ENSC_CAN_BEECRYPT_WITH_DIETLIBC_TRUE@src_vhashify_LDFLAGS = $(VSERVER_LDFLGS)
+src_vhashify_CFLAGS = $(AM_CFLAGS) $(ENSC_CRYPTO_CFLAGS)
+@ENSC_CAN_CRYPTO_WITH_DIETLIBC_FALSE@src_vhashify_LDADD = $(LIBINTERNAL_GLIBC) $(LIBENSCVECTOR_GLIBC) $(LIBVSERVER_GLIBC) $(ENSC_CRYPTO_LIB)
+@ENSC_CAN_CRYPTO_WITH_DIETLIBC_TRUE@src_vhashify_LDADD = $(LIBINTERNAL) $(LIBENSCVECTOR) $(ENSC_CRYPTO_LIB) $(VSERVER_LDADDS)
+@ENSC_CAN_CRYPTO_WITH_DIETLIBC_FALSE@src_vhashify_LDFLAGS = -Wl,--as-needed
+@ENSC_CAN_CRYPTO_WITH_DIETLIBC_TRUE@src_vhashify_LDFLAGS = $(VSERVER_LDFLGS)
 src_vuname_SOURCES = src/vuname.c
 src_vuname_LDADD = $(VSERVER_LDADDS)
 src_vuname_LDFLAGS = $(VSERVER_LDFLGS)
 src_vuname_SOURCES = src/vuname.c
 src_vuname_LDADD = $(VSERVER_LDADDS)
 src_vuname_LDFLAGS = $(VSERVER_LDFLGS)
@@ -2154,6 +2254,15 @@ src_h2ext_LDFLAGS = $(VSERVER_LDFLGS)
 src_vtag_SOURCES = src/vtag.c
 src_vtag_LDADD = $(VSERVER_LDADDS)
 src_vtag_LDFLAGS = $(VSERVER_LDADDS)
 src_vtag_SOURCES = src/vtag.c
 src_vtag_LDADD = $(VSERVER_LDADDS)
 src_vtag_LDFLAGS = $(VSERVER_LDADDS)
+src_vspace_SOURCES = src/vspace.c
+src_vspace_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL)
+src_vspace_LDFLAGS = $(VSERVER_LDFLGS)
+src_vmemctrl_SOURCES = src/vmemctrl.c
+src_vmemctrl_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL)
+src_vmemctrl_LDFLAGS = $(VSERVER_LDFLGS)
+src_tunctl_SOURCES = src/tunctl.c
+src_tunctl_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL)
+src_tunctl_LDFLAGS = $(VSERVER_LDFLGS)
 @ENSC_HAVE_C99_COMPILER_FALSE@src_sbin_C99_X_PROGS = 
 @ENSC_HAVE_C99_COMPILER_TRUE@src_sbin_C99_X_PROGS = $(src_sbin_C99_PROGS)
 @ENSC_HAVE_C99_COMPILER_FALSE@src_pkglib_C99_X_PROGS = 
 @ENSC_HAVE_C99_COMPILER_FALSE@src_sbin_C99_X_PROGS = 
 @ENSC_HAVE_C99_COMPILER_TRUE@src_sbin_C99_X_PROGS = $(src_sbin_C99_PROGS)
 @ENSC_HAVE_C99_COMPILER_FALSE@src_pkglib_C99_X_PROGS = 
@@ -2184,14 +2293,16 @@ src_testsuite_chbind_test_SOURCES = src/testsuite/chbind-test.c
 src_testsuite_chbind_test_LDADD = lib/libvserver.la
 src_testsuite_hashcalc_SOURCES = src/testsuite/hashcalc.c
 src_testsuite_hashcalc_plain_SOURCES = src/testsuite/hashcalc-plain.c
 src_testsuite_chbind_test_LDADD = lib/libvserver.la
 src_testsuite_hashcalc_SOURCES = src/testsuite/hashcalc.c
 src_testsuite_hashcalc_plain_SOURCES = src/testsuite/hashcalc-plain.c
-@ENSC_CAN_BEECRYPT_WITH_DIETLIBC_FALSE@src_testsuite_hashcalc_LDADD = $(LIBINTERNAL_GLIBC) $(LIBENSCVECTOR_GLIBC) $(LIBVSERVER_GLIBC) -lbeecrypt
-@ENSC_CAN_BEECRYPT_WITH_DIETLIBC_TRUE@src_testsuite_hashcalc_LDADD = $(LIBINTERNAL) $(LIBENSCVECTOR) -lbeecrypt $(VSERVER_LDADDS)
-@ENSC_CAN_BEECRYPT_WITH_DIETLIBC_FALSE@src_testsuite_hashcalc_LDFLAGS = 
-@ENSC_CAN_BEECRYPT_WITH_DIETLIBC_TRUE@src_testsuite_hashcalc_LDFLAGS = $(VSERVER_LDFLGS)
-@ENSC_CAN_BEECRYPT_WITH_DIETLIBC_FALSE@src_testsuite_hashcalc_plain_LDADD = $(LIBINTERNAL_GLIBC) $(LIBENSCVECTOR_GLIBC) $(LIBVSERVER_GLIBC) -lbeecrypt
-@ENSC_CAN_BEECRYPT_WITH_DIETLIBC_TRUE@src_testsuite_hashcalc_plain_LDADD = $(LIBINTERNAL) $(LIBENSCVECTOR) -lbeecrypt $(VSERVER_LDADDS)
-@ENSC_CAN_BEECRYPT_WITH_DIETLIBC_FALSE@src_testsuite_hashcalc_plain_LDFLAGS = 
-@ENSC_CAN_BEECRYPT_WITH_DIETLIBC_TRUE@src_testsuite_hashcalc_plain_LDFLAGS = $(VSERVER_LDFLGS)
+src_testsuite_hashcalc_CFLAGS = $(AM_CFLAGS) $(ENSC_CRYPTO_CFLAGS)
+src_testsuite_hashcalc_plain_CFLAGS = $(AM_CFLAGS) $(ENSC_CRYPTO_CFLAGS)
+@ENSC_CAN_CRYPTO_WITH_DIETLIBC_FALSE@src_testsuite_hashcalc_LDADD = $(LIBINTERNAL_GLIBC) $(LIBENSCVECTOR_GLIBC) $(LIBVSERVER_GLIBC) $(ENSC_CRYPTO_LIB)
+@ENSC_CAN_CRYPTO_WITH_DIETLIBC_TRUE@src_testsuite_hashcalc_LDADD = $(LIBINTERNAL) $(LIBENSCVECTOR) $(ENSC_CRYPTO_LIB) $(VSERVER_LDADDS)
+@ENSC_CAN_CRYPTO_WITH_DIETLIBC_FALSE@src_testsuite_hashcalc_LDFLAGS = -Wl,--as-needed
+@ENSC_CAN_CRYPTO_WITH_DIETLIBC_TRUE@src_testsuite_hashcalc_LDFLAGS = $(VSERVER_LDFLGS)
+@ENSC_CAN_CRYPTO_WITH_DIETLIBC_FALSE@src_testsuite_hashcalc_plain_LDADD = $(LIBINTERNAL_GLIBC) $(LIBENSCVECTOR_GLIBC) $(LIBVSERVER_GLIBC) $(ENSC_CRYPTO_LIB)
+@ENSC_CAN_CRYPTO_WITH_DIETLIBC_TRUE@src_testsuite_hashcalc_plain_LDADD = $(LIBINTERNAL) $(LIBENSCVECTOR) $(ENSC_CRYPTO_LIB) $(VSERVER_LDADDS)
+@ENSC_CAN_CRYPTO_WITH_DIETLIBC_FALSE@src_testsuite_hashcalc_plain_LDFLAGS = -Wl,--as-needed
+@ENSC_CAN_CRYPTO_WITH_DIETLIBC_TRUE@src_testsuite_hashcalc_plain_LDFLAGS = $(VSERVER_LDFLGS)
 src_testsuite_CPPFLAGS = -I $(top_srcdir)/src -D ENSC_TESTSUITE
 doc_old_doc = doc/intro.txt
 XSLT_AMFLAGS = --stringparam confdir '$(sysconfdir)/vservers'
 src_testsuite_CPPFLAGS = -I $(top_srcdir)/src -D ENSC_TESTSUITE
 doc_old_doc = doc/intro.txt
 XSLT_AMFLAGS = --stringparam confdir '$(sysconfdir)/vservers'
@@ -2222,6 +2333,8 @@ man_pages = man/chbind.8 \
                           man/vserver.8 \
                           man/vtop.8
 
                           man/vserver.8 \
                           man/vtop.8
 
+man_susbt_SRCS = man/vserver-build.8.pathsubst
+man_gen_DTA = man/vserver-build.8
 scripts_pkglib_src_DTA = scripts/functions \
                                scripts/vserver-build.apt-rpm \
                                scripts/vserver-build.skeleton \
 scripts_pkglib_src_DTA = scripts/functions \
                                scripts/vserver-build.apt-rpm \
                                scripts/vserver-build.skeleton \
@@ -2281,7 +2394,8 @@ scripts_sbin_src_PRGS = scripts/chbind \
                                scripts/vsomething \
                                scripts/vtop \
                                scripts/vupdateworld \
                                scripts/vsomething \
                                scripts/vtop \
                                scripts/vupdateworld \
-                               scripts/vyum
+                               scripts/vyum \
+                               scripts/vmount
 
 scripts_sbin_gen_PRGS = 
 scripts_sbincfg_gen_DTA = 
 
 scripts_sbin_gen_PRGS = 
 scripts_sbincfg_gen_DTA = 
@@ -2471,6 +2585,14 @@ lib_internal_testsuite_matchlist_CPPFLAGS = $(AM_CPPFLAGS)               # see note above
 lib_internal_testsuite_matchlist_gnu_SOURCES = lib_internal/testsuite/matchlist.c
 lib_internal_testsuite_matchlist_gnu_LDADD = $(LIBINTERNAL_GLIBC)
 lib_internal_testsuite_matchlist_gnu_CPPFLAGS = $(AM_CPPFLAGS)         # see note above
 lib_internal_testsuite_matchlist_gnu_SOURCES = lib_internal/testsuite/matchlist.c
 lib_internal_testsuite_matchlist_gnu_LDADD = $(LIBINTERNAL_GLIBC)
 lib_internal_testsuite_matchlist_gnu_CPPFLAGS = $(AM_CPPFLAGS)         # see note above
+@ENSC_HAVE_CRYPTO_TRUE@lib_internal_testsuite_crypto_speed_SOURCES = lib_internal/testsuite/crypto-speed.c
+@ENSC_HAVE_CRYPTO_TRUE@lib_internal_testsuite_crypto_speed_CFLAGS = $(AM_CFLAGS) $(ENSC_CRYPTO_CFLAGS)
+@ENSC_HAVE_CRYPTO_TRUE@lib_internal_testsuite_crypto_speed_LDADD = $(ENSC_CRYPTO_LIB) -lrt
+@ENSC_HAVE_CRYPTO_TRUE@lib_internal_testsuite_crypto_SOURCES = lib_internal/testsuite/crypto.c
+@ENSC_HAVE_CRYPTO_TRUE@lib_internal_testsuite_crypto_CFLAGS = $(AM_CFLAGS) $(ENSC_CRYPTO_CFLAGS)
+@ENSC_HAVE_CRYPTO_TRUE@lib_internal_testsuite_crypto_LDADD = $(ENSC_CRYPTO_LIB)
+@ENSC_CAN_CRYPTO_WITH_DIETLIBC_FALSE@@ENSC_HAVE_CRYPTO_TRUE@lib_internal_testsuite_crypto_speed_LDFLAGS = -Wl,--as-needed
+@ENSC_CAN_CRYPTO_WITH_DIETLIBC_FALSE@@ENSC_HAVE_CRYPTO_TRUE@lib_internal_testsuite_crypto_LDFLAGS = -Wl,--as-needed
 vserver_start_vserver_start_bin_SOURCES = \
                                                vserver-start/main.c \
                                                vserver-start/mount.c \
 vserver_start_vserver_start_bin_SOURCES = \
                                                vserver-start/main.c \
                                                vserver-start/mount.c \
@@ -2808,6 +2930,8 @@ lib/lib_libvserver_a-syscall_getspacemask.$(OBJEXT):  \
        lib/$(am__dirstamp) lib/$(DEPDIR)/$(am__dirstamp)
 lib/lib_libvserver_a-syscall_setmapping.$(OBJEXT):  \
        lib/$(am__dirstamp) lib/$(DEPDIR)/$(am__dirstamp)
        lib/$(am__dirstamp) lib/$(DEPDIR)/$(am__dirstamp)
 lib/lib_libvserver_a-syscall_setmapping.$(OBJEXT):  \
        lib/$(am__dirstamp) lib/$(DEPDIR)/$(am__dirstamp)
+lib/lib_libvserver_a-syscall_unsetmapping.$(OBJEXT):  \
+       lib/$(am__dirstamp) lib/$(DEPDIR)/$(am__dirstamp)
 lib/lib_libvserver_a-syscall_schedinfo.$(OBJEXT): lib/$(am__dirstamp) \
        lib/$(DEPDIR)/$(am__dirstamp)
 lib/lib_libvserver_a-syscall_getsched.$(OBJEXT): lib/$(am__dirstamp) \
 lib/lib_libvserver_a-syscall_schedinfo.$(OBJEXT): lib/$(am__dirstamp) \
        lib/$(DEPDIR)/$(am__dirstamp)
 lib/lib_libvserver_a-syscall_getsched.$(OBJEXT): lib/$(am__dirstamp) \
@@ -2822,6 +2946,10 @@ lib/lib_libvserver_a-syscall_tagcreate.$(OBJEXT): lib/$(am__dirstamp) \
        lib/$(DEPDIR)/$(am__dirstamp)
 lib/lib_libvserver_a-syscall_tasktag.$(OBJEXT): lib/$(am__dirstamp) \
        lib/$(DEPDIR)/$(am__dirstamp)
        lib/$(DEPDIR)/$(am__dirstamp)
 lib/lib_libvserver_a-syscall_tasktag.$(OBJEXT): lib/$(am__dirstamp) \
        lib/$(DEPDIR)/$(am__dirstamp)
+lib/lib_libvserver_a-syscall_getbadness.$(OBJEXT):  \
+       lib/$(am__dirstamp) lib/$(DEPDIR)/$(am__dirstamp)
+lib/lib_libvserver_a-syscall_setbadness.$(OBJEXT):  \
+       lib/$(am__dirstamp) lib/$(DEPDIR)/$(am__dirstamp)
 ensc_fmt/$(am__dirstamp):
        @$(MKDIR_P) ensc_fmt
        @: > ensc_fmt/$(am__dirstamp)
 ensc_fmt/$(am__dirstamp):
        @$(MKDIR_P) ensc_fmt
        @: > ensc_fmt/$(am__dirstamp)
@@ -3448,6 +3576,8 @@ lib/lib_libvserver_la-syscall_getspacemask.lo: lib/$(am__dirstamp) \
        lib/$(DEPDIR)/$(am__dirstamp)
 lib/lib_libvserver_la-syscall_setmapping.lo: lib/$(am__dirstamp) \
        lib/$(DEPDIR)/$(am__dirstamp)
        lib/$(DEPDIR)/$(am__dirstamp)
 lib/lib_libvserver_la-syscall_setmapping.lo: lib/$(am__dirstamp) \
        lib/$(DEPDIR)/$(am__dirstamp)
+lib/lib_libvserver_la-syscall_unsetmapping.lo: lib/$(am__dirstamp) \
+       lib/$(DEPDIR)/$(am__dirstamp)
 lib/lib_libvserver_la-syscall_schedinfo.lo: lib/$(am__dirstamp) \
        lib/$(DEPDIR)/$(am__dirstamp)
 lib/lib_libvserver_la-syscall_getsched.lo: lib/$(am__dirstamp) \
 lib/lib_libvserver_la-syscall_schedinfo.lo: lib/$(am__dirstamp) \
        lib/$(DEPDIR)/$(am__dirstamp)
 lib/lib_libvserver_la-syscall_getsched.lo: lib/$(am__dirstamp) \
@@ -3462,6 +3592,10 @@ lib/lib_libvserver_la-syscall_tagcreate.lo: lib/$(am__dirstamp) \
        lib/$(DEPDIR)/$(am__dirstamp)
 lib/lib_libvserver_la-syscall_tasktag.lo: lib/$(am__dirstamp) \
        lib/$(DEPDIR)/$(am__dirstamp)
        lib/$(DEPDIR)/$(am__dirstamp)
 lib/lib_libvserver_la-syscall_tasktag.lo: lib/$(am__dirstamp) \
        lib/$(DEPDIR)/$(am__dirstamp)
+lib/lib_libvserver_la-syscall_getbadness.lo: lib/$(am__dirstamp) \
+       lib/$(DEPDIR)/$(am__dirstamp)
+lib/lib_libvserver_la-syscall_setbadness.lo: lib/$(am__dirstamp) \
+       lib/$(DEPDIR)/$(am__dirstamp)
 ensc_fmt/lib_libvserver_la-fmt-32.lo: ensc_fmt/$(am__dirstamp) \
        ensc_fmt/$(DEPDIR)/$(am__dirstamp)
 ensc_fmt/lib_libvserver_la-fmt-64.lo: ensc_fmt/$(am__dirstamp) \
 ensc_fmt/lib_libvserver_la-fmt-32.lo: ensc_fmt/$(am__dirstamp) \
        ensc_fmt/$(DEPDIR)/$(am__dirstamp)
 ensc_fmt/lib_libvserver_la-fmt-64.lo: ensc_fmt/$(am__dirstamp) \
@@ -3696,6 +3830,18 @@ lib_internal/testsuite/copy.$(OBJEXT):  \
 lib_internal/testsuite/copy$(EXEEXT): $(lib_internal_testsuite_copy_OBJECTS) $(lib_internal_testsuite_copy_DEPENDENCIES) lib_internal/testsuite/$(am__dirstamp)
        @rm -f lib_internal/testsuite/copy$(EXEEXT)
        $(LINK) $(lib_internal_testsuite_copy_OBJECTS) $(lib_internal_testsuite_copy_LDADD) $(LIBS)
 lib_internal/testsuite/copy$(EXEEXT): $(lib_internal_testsuite_copy_OBJECTS) $(lib_internal_testsuite_copy_DEPENDENCIES) lib_internal/testsuite/$(am__dirstamp)
        @rm -f lib_internal/testsuite/copy$(EXEEXT)
        $(LINK) $(lib_internal_testsuite_copy_OBJECTS) $(lib_internal_testsuite_copy_LDADD) $(LIBS)
+lib_internal/testsuite/lib_internal_testsuite_crypto-crypto.$(OBJEXT):  \
+       lib_internal/testsuite/$(am__dirstamp) \
+       lib_internal/testsuite/$(DEPDIR)/$(am__dirstamp)
+lib_internal/testsuite/crypto$(EXEEXT): $(lib_internal_testsuite_crypto_OBJECTS) $(lib_internal_testsuite_crypto_DEPENDENCIES) lib_internal/testsuite/$(am__dirstamp)
+       @rm -f lib_internal/testsuite/crypto$(EXEEXT)
+       $(lib_internal_testsuite_crypto_LINK) $(lib_internal_testsuite_crypto_OBJECTS) $(lib_internal_testsuite_crypto_LDADD) $(LIBS)
+lib_internal/testsuite/lib_internal_testsuite_crypto_speed-crypto-speed.$(OBJEXT):  \
+       lib_internal/testsuite/$(am__dirstamp) \
+       lib_internal/testsuite/$(DEPDIR)/$(am__dirstamp)
+lib_internal/testsuite/crypto-speed$(EXEEXT): $(lib_internal_testsuite_crypto_speed_OBJECTS) $(lib_internal_testsuite_crypto_speed_DEPENDENCIES) lib_internal/testsuite/$(am__dirstamp)
+       @rm -f lib_internal/testsuite/crypto-speed$(EXEEXT)
+       $(lib_internal_testsuite_crypto_speed_LINK) $(lib_internal_testsuite_crypto_speed_OBJECTS) $(lib_internal_testsuite_crypto_speed_LDADD) $(LIBS)
 lib_internal/testsuite/filecfg-ml.$(OBJEXT):  \
        lib_internal/testsuite/$(am__dirstamp) \
        lib_internal/testsuite/$(DEPDIR)/$(am__dirstamp)
 lib_internal/testsuite/filecfg-ml.$(OBJEXT):  \
        lib_internal/testsuite/$(am__dirstamp) \
        lib_internal/testsuite/$(DEPDIR)/$(am__dirstamp)
@@ -3913,12 +4059,14 @@ src/testsuite/chcontext-test.$(OBJEXT): src/testsuite/$(am__dirstamp) \
 src/testsuite/chcontext-test$(EXEEXT): $(src_testsuite_chcontext_test_OBJECTS) $(src_testsuite_chcontext_test_DEPENDENCIES) src/testsuite/$(am__dirstamp)
        @rm -f src/testsuite/chcontext-test$(EXEEXT)
        $(LINK) $(src_testsuite_chcontext_test_OBJECTS) $(src_testsuite_chcontext_test_LDADD) $(LIBS)
 src/testsuite/chcontext-test$(EXEEXT): $(src_testsuite_chcontext_test_OBJECTS) $(src_testsuite_chcontext_test_DEPENDENCIES) src/testsuite/$(am__dirstamp)
        @rm -f src/testsuite/chcontext-test$(EXEEXT)
        $(LINK) $(src_testsuite_chcontext_test_OBJECTS) $(src_testsuite_chcontext_test_LDADD) $(LIBS)
-src/testsuite/hashcalc.$(OBJEXT): src/testsuite/$(am__dirstamp) \
+src/testsuite/src_testsuite_hashcalc-hashcalc.$(OBJEXT):  \
+       src/testsuite/$(am__dirstamp) \
        src/testsuite/$(DEPDIR)/$(am__dirstamp)
 src/testsuite/hashcalc$(EXEEXT): $(src_testsuite_hashcalc_OBJECTS) $(src_testsuite_hashcalc_DEPENDENCIES) src/testsuite/$(am__dirstamp)
        @rm -f src/testsuite/hashcalc$(EXEEXT)
        $(src_testsuite_hashcalc_LINK) $(src_testsuite_hashcalc_OBJECTS) $(src_testsuite_hashcalc_LDADD) $(LIBS)
        src/testsuite/$(DEPDIR)/$(am__dirstamp)
 src/testsuite/hashcalc$(EXEEXT): $(src_testsuite_hashcalc_OBJECTS) $(src_testsuite_hashcalc_DEPENDENCIES) src/testsuite/$(am__dirstamp)
        @rm -f src/testsuite/hashcalc$(EXEEXT)
        $(src_testsuite_hashcalc_LINK) $(src_testsuite_hashcalc_OBJECTS) $(src_testsuite_hashcalc_LDADD) $(LIBS)
-src/testsuite/hashcalc-plain.$(OBJEXT): src/testsuite/$(am__dirstamp) \
+src/testsuite/src_testsuite_hashcalc_plain-hashcalc-plain.$(OBJEXT):  \
+       src/testsuite/$(am__dirstamp) \
        src/testsuite/$(DEPDIR)/$(am__dirstamp)
 src/testsuite/hashcalc-plain$(EXEEXT): $(src_testsuite_hashcalc_plain_OBJECTS) $(src_testsuite_hashcalc_plain_DEPENDENCIES) src/testsuite/$(am__dirstamp)
        @rm -f src/testsuite/hashcalc-plain$(EXEEXT)
        src/testsuite/$(DEPDIR)/$(am__dirstamp)
 src/testsuite/hashcalc-plain$(EXEEXT): $(src_testsuite_hashcalc_plain_OBJECTS) $(src_testsuite_hashcalc_plain_DEPENDENCIES) src/testsuite/$(am__dirstamp)
        @rm -f src/testsuite/hashcalc-plain$(EXEEXT)
@@ -3934,6 +4082,11 @@ src/testsuite/src_testsuite_vunify_functest-vunify-functest.$(OBJEXT):  \
 src/testsuite/vunify-functest$(EXEEXT): $(src_testsuite_vunify_functest_OBJECTS) $(src_testsuite_vunify_functest_DEPENDENCIES) src/testsuite/$(am__dirstamp)
        @rm -f src/testsuite/vunify-functest$(EXEEXT)
        $(LINK) $(src_testsuite_vunify_functest_OBJECTS) $(src_testsuite_vunify_functest_LDADD) $(LIBS)
 src/testsuite/vunify-functest$(EXEEXT): $(src_testsuite_vunify_functest_OBJECTS) $(src_testsuite_vunify_functest_DEPENDENCIES) src/testsuite/$(am__dirstamp)
        @rm -f src/testsuite/vunify-functest$(EXEEXT)
        $(LINK) $(src_testsuite_vunify_functest_OBJECTS) $(src_testsuite_vunify_functest_LDADD) $(LIBS)
+src/tunctl.$(OBJEXT): src/$(am__dirstamp) \
+       src/$(DEPDIR)/$(am__dirstamp)
+src/tunctl$(EXEEXT): $(src_tunctl_OBJECTS) $(src_tunctl_DEPENDENCIES) src/$(am__dirstamp)
+       @rm -f src/tunctl$(EXEEXT)
+       $(src_tunctl_LINK) $(src_tunctl_OBJECTS) $(src_tunctl_LDADD) $(LIBS)
 src/vattribute.$(OBJEXT): src/$(am__dirstamp) \
        src/$(DEPDIR)/$(am__dirstamp)
 src/vattribute$(EXEEXT): $(src_vattribute_OBJECTS) $(src_vattribute_DEPENDENCIES) src/$(am__dirstamp)
 src/vattribute.$(OBJEXT): src/$(am__dirstamp) \
        src/$(DEPDIR)/$(am__dirstamp)
 src/vattribute$(EXEEXT): $(src_vattribute_OBJECTS) $(src_vattribute_DEPENDENCIES) src/$(am__dirstamp)
@@ -3969,7 +4122,7 @@ src/vdu.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
 src/vdu$(EXEEXT): $(src_vdu_OBJECTS) $(src_vdu_DEPENDENCIES) src/$(am__dirstamp)
        @rm -f src/vdu$(EXEEXT)
        $(src_vdu_LINK) $(src_vdu_OBJECTS) $(src_vdu_LDADD) $(LIBS)
 src/vdu$(EXEEXT): $(src_vdu_OBJECTS) $(src_vdu_DEPENDENCIES) src/$(am__dirstamp)
        @rm -f src/vdu$(EXEEXT)
        $(src_vdu_LINK) $(src_vdu_OBJECTS) $(src_vdu_LDADD) $(LIBS)
-src/vhashify.$(OBJEXT): src/$(am__dirstamp) \
+src/src_vhashify-vhashify.$(OBJEXT): src/$(am__dirstamp) \
        src/$(DEPDIR)/$(am__dirstamp)
 src/vhashify$(EXEEXT): $(src_vhashify_OBJECTS) $(src_vhashify_DEPENDENCIES) src/$(am__dirstamp)
        @rm -f src/vhashify$(EXEEXT)
        src/$(DEPDIR)/$(am__dirstamp)
 src/vhashify$(EXEEXT): $(src_vhashify_OBJECTS) $(src_vhashify_DEPENDENCIES) src/$(am__dirstamp)
        @rm -f src/vhashify$(EXEEXT)
@@ -3984,6 +4137,11 @@ src/vlimit.$(OBJEXT): src/$(am__dirstamp) \
 src/vlimit$(EXEEXT): $(src_vlimit_OBJECTS) $(src_vlimit_DEPENDENCIES) src/$(am__dirstamp)
        @rm -f src/vlimit$(EXEEXT)
        $(src_vlimit_LINK) $(src_vlimit_OBJECTS) $(src_vlimit_LDADD) $(LIBS)
 src/vlimit$(EXEEXT): $(src_vlimit_OBJECTS) $(src_vlimit_DEPENDENCIES) src/$(am__dirstamp)
        @rm -f src/vlimit$(EXEEXT)
        $(src_vlimit_LINK) $(src_vlimit_OBJECTS) $(src_vlimit_LDADD) $(LIBS)
+src/vmemctrl.$(OBJEXT): src/$(am__dirstamp) \
+       src/$(DEPDIR)/$(am__dirstamp)
+src/vmemctrl$(EXEEXT): $(src_vmemctrl_OBJECTS) $(src_vmemctrl_DEPENDENCIES) src/$(am__dirstamp)
+       @rm -f src/vmemctrl$(EXEEXT)
+       $(src_vmemctrl_LINK) $(src_vmemctrl_OBJECTS) $(src_vmemctrl_LDADD) $(LIBS)
 src/vnamespace.$(OBJEXT): src/$(am__dirstamp) \
        src/$(DEPDIR)/$(am__dirstamp)
 src/vnamespace$(EXEEXT): $(src_vnamespace_OBJECTS) $(src_vnamespace_DEPENDENCIES) src/$(am__dirstamp)
 src/vnamespace.$(OBJEXT): src/$(am__dirstamp) \
        src/$(DEPDIR)/$(am__dirstamp)
 src/vnamespace$(EXEEXT): $(src_vnamespace_OBJECTS) $(src_vnamespace_DEPENDENCIES) src/$(am__dirstamp)
@@ -4023,6 +4181,11 @@ src/vshelper-sync.$(OBJEXT): src/$(am__dirstamp) \
 src/vshelper-sync$(EXEEXT): $(src_vshelper_sync_OBJECTS) $(src_vshelper_sync_DEPENDENCIES) src/$(am__dirstamp)
        @rm -f src/vshelper-sync$(EXEEXT)
        $(LINK) $(src_vshelper_sync_OBJECTS) $(src_vshelper_sync_LDADD) $(LIBS)
 src/vshelper-sync$(EXEEXT): $(src_vshelper_sync_OBJECTS) $(src_vshelper_sync_DEPENDENCIES) src/$(am__dirstamp)
        @rm -f src/vshelper-sync$(EXEEXT)
        $(LINK) $(src_vshelper_sync_OBJECTS) $(src_vshelper_sync_LDADD) $(LIBS)
+src/vspace.$(OBJEXT): src/$(am__dirstamp) \
+       src/$(DEPDIR)/$(am__dirstamp)
+src/vspace$(EXEEXT): $(src_vspace_OBJECTS) $(src_vspace_DEPENDENCIES) src/$(am__dirstamp)
+       @rm -f src/vspace$(EXEEXT)
+       $(src_vspace_LINK) $(src_vspace_OBJECTS) $(src_vspace_LDADD) $(LIBS)
 src/vsysctl.$(OBJEXT): src/$(am__dirstamp) \
        src/$(DEPDIR)/$(am__dirstamp)
 src/vsysctl$(EXEEXT): $(src_vsysctl_OBJECTS) $(src_vsysctl_DEPENDENCIES) src/$(am__dirstamp)
 src/vsysctl.$(OBJEXT): src/$(am__dirstamp) \
        src/$(DEPDIR)/$(am__dirstamp)
 src/vsysctl$(EXEEXT): $(src_vsysctl_OBJECTS) $(src_vsysctl_DEPENDENCIES) src/$(am__dirstamp)
@@ -4379,6 +4542,7 @@ mostlyclean-compile:
        -rm -f lib/lib_libvserver_a-syscall_enternamespace.$(OBJEXT)
        -rm -f lib/lib_libvserver_a-syscall_fgetiattr.$(OBJEXT)
        -rm -f lib/lib_libvserver_a-syscall_fsetiattr.$(OBJEXT)
        -rm -f lib/lib_libvserver_a-syscall_enternamespace.$(OBJEXT)
        -rm -f lib/lib_libvserver_a-syscall_fgetiattr.$(OBJEXT)
        -rm -f lib/lib_libvserver_a-syscall_fsetiattr.$(OBJEXT)
+       -rm -f lib/lib_libvserver_a-syscall_getbadness.$(OBJEXT)
        -rm -f lib/lib_libvserver_a-syscall_getccaps.$(OBJEXT)
        -rm -f lib/lib_libvserver_a-syscall_getcflags.$(OBJEXT)
        -rm -f lib/lib_libvserver_a-syscall_getdlimit.$(OBJEXT)
        -rm -f lib/lib_libvserver_a-syscall_getccaps.$(OBJEXT)
        -rm -f lib/lib_libvserver_a-syscall_getcflags.$(OBJEXT)
        -rm -f lib/lib_libvserver_a-syscall_getdlimit.$(OBJEXT)
@@ -4403,6 +4567,7 @@ mostlyclean-compile:
        -rm -f lib/lib_libvserver_a-syscall_rlimit.$(OBJEXT)
        -rm -f lib/lib_libvserver_a-syscall_rlimitstat.$(OBJEXT)
        -rm -f lib/lib_libvserver_a-syscall_schedinfo.$(OBJEXT)
        -rm -f lib/lib_libvserver_a-syscall_rlimit.$(OBJEXT)
        -rm -f lib/lib_libvserver_a-syscall_rlimitstat.$(OBJEXT)
        -rm -f lib/lib_libvserver_a-syscall_schedinfo.$(OBJEXT)
+       -rm -f lib/lib_libvserver_a-syscall_setbadness.$(OBJEXT)
        -rm -f lib/lib_libvserver_a-syscall_setccaps.$(OBJEXT)
        -rm -f lib/lib_libvserver_a-syscall_setcflags.$(OBJEXT)
        -rm -f lib/lib_libvserver_a-syscall_setdlimit.$(OBJEXT)
        -rm -f lib/lib_libvserver_a-syscall_setccaps.$(OBJEXT)
        -rm -f lib/lib_libvserver_a-syscall_setcflags.$(OBJEXT)
        -rm -f lib/lib_libvserver_a-syscall_setdlimit.$(OBJEXT)
@@ -4416,6 +4581,7 @@ mostlyclean-compile:
        -rm -f lib/lib_libvserver_a-syscall_tagcreate.$(OBJEXT)
        -rm -f lib/lib_libvserver_a-syscall_tagmigrate.$(OBJEXT)
        -rm -f lib/lib_libvserver_a-syscall_tasktag.$(OBJEXT)
        -rm -f lib/lib_libvserver_a-syscall_tagcreate.$(OBJEXT)
        -rm -f lib/lib_libvserver_a-syscall_tagmigrate.$(OBJEXT)
        -rm -f lib/lib_libvserver_a-syscall_tasktag.$(OBJEXT)
+       -rm -f lib/lib_libvserver_a-syscall_unsetmapping.$(OBJEXT)
        -rm -f lib/lib_libvserver_a-syscall_virtstat.$(OBJEXT)
        -rm -f lib/lib_libvserver_a-syscall_waitexit.$(OBJEXT)
        -rm -f lib/lib_libvserver_a-tagopt2tag.$(OBJEXT)
        -rm -f lib/lib_libvserver_a-syscall_virtstat.$(OBJEXT)
        -rm -f lib/lib_libvserver_a-syscall_waitexit.$(OBJEXT)
        -rm -f lib/lib_libvserver_a-tagopt2tag.$(OBJEXT)
@@ -4530,6 +4696,8 @@ mostlyclean-compile:
        -rm -f lib/lib_libvserver_la-syscall_fgetiattr.lo
        -rm -f lib/lib_libvserver_la-syscall_fsetiattr.$(OBJEXT)
        -rm -f lib/lib_libvserver_la-syscall_fsetiattr.lo
        -rm -f lib/lib_libvserver_la-syscall_fgetiattr.lo
        -rm -f lib/lib_libvserver_la-syscall_fsetiattr.$(OBJEXT)
        -rm -f lib/lib_libvserver_la-syscall_fsetiattr.lo
+       -rm -f lib/lib_libvserver_la-syscall_getbadness.$(OBJEXT)
+       -rm -f lib/lib_libvserver_la-syscall_getbadness.lo
        -rm -f lib/lib_libvserver_la-syscall_getccaps.$(OBJEXT)
        -rm -f lib/lib_libvserver_la-syscall_getccaps.lo
        -rm -f lib/lib_libvserver_la-syscall_getcflags.$(OBJEXT)
        -rm -f lib/lib_libvserver_la-syscall_getccaps.$(OBJEXT)
        -rm -f lib/lib_libvserver_la-syscall_getccaps.lo
        -rm -f lib/lib_libvserver_la-syscall_getcflags.$(OBJEXT)
@@ -4578,6 +4746,8 @@ mostlyclean-compile:
        -rm -f lib/lib_libvserver_la-syscall_rlimitstat.lo
        -rm -f lib/lib_libvserver_la-syscall_schedinfo.$(OBJEXT)
        -rm -f lib/lib_libvserver_la-syscall_schedinfo.lo
        -rm -f lib/lib_libvserver_la-syscall_rlimitstat.lo
        -rm -f lib/lib_libvserver_la-syscall_schedinfo.$(OBJEXT)
        -rm -f lib/lib_libvserver_la-syscall_schedinfo.lo
+       -rm -f lib/lib_libvserver_la-syscall_setbadness.$(OBJEXT)
+       -rm -f lib/lib_libvserver_la-syscall_setbadness.lo
        -rm -f lib/lib_libvserver_la-syscall_setccaps.$(OBJEXT)
        -rm -f lib/lib_libvserver_la-syscall_setccaps.lo
        -rm -f lib/lib_libvserver_la-syscall_setcflags.$(OBJEXT)
        -rm -f lib/lib_libvserver_la-syscall_setccaps.$(OBJEXT)
        -rm -f lib/lib_libvserver_la-syscall_setccaps.lo
        -rm -f lib/lib_libvserver_la-syscall_setcflags.$(OBJEXT)
@@ -4604,6 +4774,8 @@ mostlyclean-compile:
        -rm -f lib/lib_libvserver_la-syscall_tagmigrate.lo
        -rm -f lib/lib_libvserver_la-syscall_tasktag.$(OBJEXT)
        -rm -f lib/lib_libvserver_la-syscall_tasktag.lo
        -rm -f lib/lib_libvserver_la-syscall_tagmigrate.lo
        -rm -f lib/lib_libvserver_la-syscall_tasktag.$(OBJEXT)
        -rm -f lib/lib_libvserver_la-syscall_tasktag.lo
+       -rm -f lib/lib_libvserver_la-syscall_unsetmapping.$(OBJEXT)
+       -rm -f lib/lib_libvserver_la-syscall_unsetmapping.lo
        -rm -f lib/lib_libvserver_la-syscall_virtstat.$(OBJEXT)
        -rm -f lib/lib_libvserver_la-syscall_virtstat.lo
        -rm -f lib/lib_libvserver_la-syscall_waitexit.$(OBJEXT)
        -rm -f lib/lib_libvserver_la-syscall_virtstat.$(OBJEXT)
        -rm -f lib/lib_libvserver_la-syscall_virtstat.lo
        -rm -f lib/lib_libvserver_la-syscall_waitexit.$(OBJEXT)
@@ -4701,6 +4873,8 @@ mostlyclean-compile:
        -rm -f lib_internal/testsuite/command.$(OBJEXT)
        -rm -f lib_internal/testsuite/copy.$(OBJEXT)
        -rm -f lib_internal/testsuite/filecfg-ml.$(OBJEXT)
        -rm -f lib_internal/testsuite/command.$(OBJEXT)
        -rm -f lib_internal/testsuite/copy.$(OBJEXT)
        -rm -f lib_internal/testsuite/filecfg-ml.$(OBJEXT)
+       -rm -f lib_internal/testsuite/lib_internal_testsuite_crypto-crypto.$(OBJEXT)
+       -rm -f lib_internal/testsuite/lib_internal_testsuite_crypto_speed-crypto-speed.$(OBJEXT)
        -rm -f lib_internal/testsuite/lib_internal_testsuite_isnumber-isnumber.$(OBJEXT)
        -rm -f lib_internal/testsuite/lib_internal_testsuite_isnumber_gnu-isnumber.$(OBJEXT)
        -rm -f lib_internal/testsuite/lib_internal_testsuite_matchlist-matchlist.$(OBJEXT)
        -rm -f lib_internal/testsuite/lib_internal_testsuite_isnumber-isnumber.$(OBJEXT)
        -rm -f lib_internal/testsuite/lib_internal_testsuite_isnumber_gnu-isnumber.$(OBJEXT)
        -rm -f lib_internal/testsuite/lib_internal_testsuite_matchlist-matchlist.$(OBJEXT)
@@ -4742,13 +4916,15 @@ mostlyclean-compile:
        -rm -f src/sigexec.$(OBJEXT)
        -rm -f src/src_rpm_fake_la-rpm-fake.$(OBJEXT)
        -rm -f src/src_rpm_fake_la-rpm-fake.lo
        -rm -f src/sigexec.$(OBJEXT)
        -rm -f src/src_rpm_fake_la-rpm-fake.$(OBJEXT)
        -rm -f src/src_rpm_fake_la-rpm-fake.lo
+       -rm -f src/src_vhashify-vhashify.$(OBJEXT)
        -rm -f src/src_vkill-vkill.$(OBJEXT)
        -rm -f src/testsuite/chbind-test.$(OBJEXT)
        -rm -f src/testsuite/chcontext-test.$(OBJEXT)
        -rm -f src/src_vkill-vkill.$(OBJEXT)
        -rm -f src/testsuite/chbind-test.$(OBJEXT)
        -rm -f src/testsuite/chcontext-test.$(OBJEXT)
-       -rm -f src/testsuite/hashcalc-plain.$(OBJEXT)
-       -rm -f src/testsuite/hashcalc.$(OBJEXT)
        -rm -f src/testsuite/rpm-fake-test.$(OBJEXT)
        -rm -f src/testsuite/rpm-fake-test.$(OBJEXT)
+       -rm -f src/testsuite/src_testsuite_hashcalc-hashcalc.$(OBJEXT)
+       -rm -f src/testsuite/src_testsuite_hashcalc_plain-hashcalc-plain.$(OBJEXT)
        -rm -f src/testsuite/src_testsuite_vunify_functest-vunify-functest.$(OBJEXT)
        -rm -f src/testsuite/src_testsuite_vunify_functest-vunify-functest.$(OBJEXT)
+       -rm -f src/tunctl.$(OBJEXT)
        -rm -f src/vattribute.$(OBJEXT)
        -rm -f src/vclone.$(OBJEXT)
        -rm -f src/vcontext.$(OBJEXT)
        -rm -f src/vattribute.$(OBJEXT)
        -rm -f src/vclone.$(OBJEXT)
        -rm -f src/vcontext.$(OBJEXT)
@@ -4756,9 +4932,9 @@ mostlyclean-compile:
        -rm -f src/vdevmap.$(OBJEXT)
        -rm -f src/vdlimit.$(OBJEXT)
        -rm -f src/vdu.$(OBJEXT)
        -rm -f src/vdevmap.$(OBJEXT)
        -rm -f src/vdlimit.$(OBJEXT)
        -rm -f src/vdu.$(OBJEXT)
-       -rm -f src/vhashify.$(OBJEXT)
        -rm -f src/vlimit.$(OBJEXT)
        -rm -f src/vlogin.$(OBJEXT)
        -rm -f src/vlimit.$(OBJEXT)
        -rm -f src/vlogin.$(OBJEXT)
+       -rm -f src/vmemctrl.$(OBJEXT)
        -rm -f src/vnamespace.$(OBJEXT)
        -rm -f src/vps.$(OBJEXT)
        -rm -f src/vreboot.$(OBJEXT)
        -rm -f src/vnamespace.$(OBJEXT)
        -rm -f src/vps.$(OBJEXT)
        -rm -f src/vreboot.$(OBJEXT)
@@ -4767,6 +4943,7 @@ mostlyclean-compile:
        -rm -f src/vserver-info.$(OBJEXT)
        -rm -f src/vserver-stat.$(OBJEXT)
        -rm -f src/vshelper-sync.$(OBJEXT)
        -rm -f src/vserver-info.$(OBJEXT)
        -rm -f src/vserver-stat.$(OBJEXT)
        -rm -f src/vshelper-sync.$(OBJEXT)
+       -rm -f src/vspace.$(OBJEXT)
        -rm -f src/vsysctl.$(OBJEXT)
        -rm -f src/vtag.$(OBJEXT)
        -rm -f src/vuname.$(OBJEXT)
        -rm -f src/vsysctl.$(OBJEXT)
        -rm -f src/vtag.$(OBJEXT)
        -rm -f src/vuname.$(OBJEXT)
@@ -4904,6 +5081,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_a-syscall_enternamespace.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_a-syscall_fgetiattr.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_a-syscall_fsetiattr.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_a-syscall_enternamespace.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_a-syscall_fgetiattr.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_a-syscall_fsetiattr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_a-syscall_getbadness.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_a-syscall_getccaps.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_a-syscall_getcflags.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_a-syscall_getdlimit.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_a-syscall_getccaps.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_a-syscall_getcflags.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_a-syscall_getdlimit.Po@am__quote@
@@ -4928,6 +5106,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_a-syscall_rlimit.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_a-syscall_rlimitstat.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_a-syscall_schedinfo.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_a-syscall_rlimit.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_a-syscall_rlimitstat.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_a-syscall_schedinfo.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_a-syscall_setbadness.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_a-syscall_setccaps.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_a-syscall_setcflags.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_a-syscall_setdlimit.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_a-syscall_setccaps.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_a-syscall_setcflags.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_a-syscall_setdlimit.Po@am__quote@
@@ -4941,6 +5120,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_a-syscall_tagcreate.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_a-syscall_tagmigrate.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_a-syscall_tasktag.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_a-syscall_tagcreate.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_a-syscall_tagmigrate.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_a-syscall_tasktag.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_a-syscall_unsetmapping.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_a-syscall_virtstat.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_a-syscall_waitexit.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_a-tagopt2tag.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_a-syscall_virtstat.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_a-syscall_waitexit.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_a-tagopt2tag.Po@am__quote@
@@ -5002,6 +5182,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_la-syscall_enternamespace.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_la-syscall_fgetiattr.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_la-syscall_fsetiattr.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_la-syscall_enternamespace.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_la-syscall_fgetiattr.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_la-syscall_fsetiattr.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_la-syscall_getbadness.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_la-syscall_getccaps.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_la-syscall_getcflags.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_la-syscall_getdlimit.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_la-syscall_getccaps.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_la-syscall_getcflags.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_la-syscall_getdlimit.Plo@am__quote@
@@ -5026,6 +5207,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_la-syscall_rlimit.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_la-syscall_rlimitstat.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_la-syscall_schedinfo.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_la-syscall_rlimit.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_la-syscall_rlimitstat.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_la-syscall_schedinfo.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_la-syscall_setbadness.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_la-syscall_setccaps.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_la-syscall_setcflags.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_la-syscall_setdlimit.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_la-syscall_setccaps.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_la-syscall_setcflags.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_la-syscall_setdlimit.Plo@am__quote@
@@ -5039,6 +5221,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_la-syscall_tagcreate.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_la-syscall_tagmigrate.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_la-syscall_tasktag.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_la-syscall_tagcreate.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_la-syscall_tagmigrate.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_la-syscall_tasktag.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_la-syscall_unsetmapping.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_la-syscall_virtstat.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_la-syscall_waitexit.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_la-tagopt2tag.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_la-syscall_virtstat.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_la-syscall_waitexit.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_la-tagopt2tag.Plo@am__quote@
@@ -5128,6 +5311,8 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@lib_internal/testsuite/$(DEPDIR)/command.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib_internal/testsuite/$(DEPDIR)/copy.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib_internal/testsuite/$(DEPDIR)/filecfg-ml.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib_internal/testsuite/$(DEPDIR)/command.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib_internal/testsuite/$(DEPDIR)/copy.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib_internal/testsuite/$(DEPDIR)/filecfg-ml.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib_internal/testsuite/$(DEPDIR)/lib_internal_testsuite_crypto-crypto.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib_internal/testsuite/$(DEPDIR)/lib_internal_testsuite_crypto_speed-crypto-speed.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib_internal/testsuite/$(DEPDIR)/lib_internal_testsuite_isnumber-isnumber.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib_internal/testsuite/$(DEPDIR)/lib_internal_testsuite_isnumber_gnu-isnumber.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib_internal/testsuite/$(DEPDIR)/lib_internal_testsuite_matchlist-matchlist.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib_internal/testsuite/$(DEPDIR)/lib_internal_testsuite_isnumber-isnumber.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib_internal/testsuite/$(DEPDIR)/lib_internal_testsuite_isnumber_gnu-isnumber.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib_internal/testsuite/$(DEPDIR)/lib_internal_testsuite_matchlist-matchlist.Po@am__quote@
@@ -5168,7 +5353,9 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/showperm.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sigexec.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/src_rpm_fake_la-rpm-fake.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/showperm.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sigexec.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/src_rpm_fake_la-rpm-fake.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/src_vhashify-vhashify.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/src_vkill-vkill.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/src_vkill-vkill.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/tunctl.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vattribute.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vclone.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vcontext.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vattribute.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vclone.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vcontext.Po@am__quote@
@@ -5176,9 +5363,9 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vdevmap.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vdlimit.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vdu.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vdevmap.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vdlimit.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vdu.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vhashify.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vlimit.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vlogin.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vlimit.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vlogin.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vmemctrl.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vnamespace.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vps.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vreboot.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vnamespace.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vps.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vreboot.Po@am__quote@
@@ -5187,6 +5374,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vserver-info.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vserver-stat.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vshelper-sync.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vserver-info.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vserver-stat.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vshelper-sync.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vspace.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vsysctl.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vtag.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vuname.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vsysctl.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vtag.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vuname.Po@am__quote@
@@ -5194,9 +5382,9 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vwait.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/testsuite/$(DEPDIR)/chbind-test.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/testsuite/$(DEPDIR)/chcontext-test.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vwait.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/testsuite/$(DEPDIR)/chbind-test.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/testsuite/$(DEPDIR)/chcontext-test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/testsuite/$(DEPDIR)/hashcalc-plain.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/testsuite/$(DEPDIR)/hashcalc.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/testsuite/$(DEPDIR)/rpm-fake-test.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/testsuite/$(DEPDIR)/rpm-fake-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/testsuite/$(DEPDIR)/src_testsuite_hashcalc-hashcalc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/testsuite/$(DEPDIR)/src_testsuite_hashcalc_plain-hashcalc-plain.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/testsuite/$(DEPDIR)/src_testsuite_vunify_functest-vunify-functest.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/escaperoot.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/forkbomb.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/testsuite/$(DEPDIR)/src_testsuite_vunify_functest-vunify-functest.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/escaperoot.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/forkbomb.Po@am__quote@
@@ -6518,6 +6706,20 @@ lib/lib_libvserver_a-syscall_setmapping.obj: lib/syscall_setmapping.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/lib_libvserver_a-syscall_setmapping.obj `if test -f 'lib/syscall_setmapping.c'; then $(CYGPATH_W) 'lib/syscall_setmapping.c'; else $(CYGPATH_W) '$(srcdir)/lib/syscall_setmapping.c'; fi`
 
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/lib_libvserver_a-syscall_setmapping.obj `if test -f 'lib/syscall_setmapping.c'; then $(CYGPATH_W) 'lib/syscall_setmapping.c'; else $(CYGPATH_W) '$(srcdir)/lib/syscall_setmapping.c'; fi`
 
+lib/lib_libvserver_a-syscall_unsetmapping.o: lib/syscall_unsetmapping.c
+@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/lib_libvserver_a-syscall_unsetmapping.o -MD -MP -MF lib/$(DEPDIR)/lib_libvserver_a-syscall_unsetmapping.Tpo -c -o lib/lib_libvserver_a-syscall_unsetmapping.o `test -f 'lib/syscall_unsetmapping.c' || echo '$(srcdir)/'`lib/syscall_unsetmapping.c
+@am__fastdepCC_TRUE@   mv -f lib/$(DEPDIR)/lib_libvserver_a-syscall_unsetmapping.Tpo lib/$(DEPDIR)/lib_libvserver_a-syscall_unsetmapping.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lib/syscall_unsetmapping.c' object='lib/lib_libvserver_a-syscall_unsetmapping.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/lib_libvserver_a-syscall_unsetmapping.o `test -f 'lib/syscall_unsetmapping.c' || echo '$(srcdir)/'`lib/syscall_unsetmapping.c
+
+lib/lib_libvserver_a-syscall_unsetmapping.obj: lib/syscall_unsetmapping.c
+@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/lib_libvserver_a-syscall_unsetmapping.obj -MD -MP -MF lib/$(DEPDIR)/lib_libvserver_a-syscall_unsetmapping.Tpo -c -o lib/lib_libvserver_a-syscall_unsetmapping.obj `if test -f 'lib/syscall_unsetmapping.c'; then $(CYGPATH_W) 'lib/syscall_unsetmapping.c'; else $(CYGPATH_W) '$(srcdir)/lib/syscall_unsetmapping.c'; fi`
+@am__fastdepCC_TRUE@   mv -f lib/$(DEPDIR)/lib_libvserver_a-syscall_unsetmapping.Tpo lib/$(DEPDIR)/lib_libvserver_a-syscall_unsetmapping.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lib/syscall_unsetmapping.c' object='lib/lib_libvserver_a-syscall_unsetmapping.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/lib_libvserver_a-syscall_unsetmapping.obj `if test -f 'lib/syscall_unsetmapping.c'; then $(CYGPATH_W) 'lib/syscall_unsetmapping.c'; else $(CYGPATH_W) '$(srcdir)/lib/syscall_unsetmapping.c'; fi`
+
 lib/lib_libvserver_a-syscall_schedinfo.o: lib/syscall_schedinfo.c
 @am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/lib_libvserver_a-syscall_schedinfo.o -MD -MP -MF lib/$(DEPDIR)/lib_libvserver_a-syscall_schedinfo.Tpo -c -o lib/lib_libvserver_a-syscall_schedinfo.o `test -f 'lib/syscall_schedinfo.c' || echo '$(srcdir)/'`lib/syscall_schedinfo.c
 @am__fastdepCC_TRUE@   mv -f lib/$(DEPDIR)/lib_libvserver_a-syscall_schedinfo.Tpo lib/$(DEPDIR)/lib_libvserver_a-syscall_schedinfo.Po
 lib/lib_libvserver_a-syscall_schedinfo.o: lib/syscall_schedinfo.c
 @am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/lib_libvserver_a-syscall_schedinfo.o -MD -MP -MF lib/$(DEPDIR)/lib_libvserver_a-syscall_schedinfo.Tpo -c -o lib/lib_libvserver_a-syscall_schedinfo.o `test -f 'lib/syscall_schedinfo.c' || echo '$(srcdir)/'`lib/syscall_schedinfo.c
 @am__fastdepCC_TRUE@   mv -f lib/$(DEPDIR)/lib_libvserver_a-syscall_schedinfo.Tpo lib/$(DEPDIR)/lib_libvserver_a-syscall_schedinfo.Po
@@ -6616,6 +6818,34 @@ lib/lib_libvserver_a-syscall_tasktag.obj: lib/syscall_tasktag.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/lib_libvserver_a-syscall_tasktag.obj `if test -f 'lib/syscall_tasktag.c'; then $(CYGPATH_W) 'lib/syscall_tasktag.c'; else $(CYGPATH_W) '$(srcdir)/lib/syscall_tasktag.c'; fi`
 
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/lib_libvserver_a-syscall_tasktag.obj `if test -f 'lib/syscall_tasktag.c'; then $(CYGPATH_W) 'lib/syscall_tasktag.c'; else $(CYGPATH_W) '$(srcdir)/lib/syscall_tasktag.c'; fi`
 
+lib/lib_libvserver_a-syscall_getbadness.o: lib/syscall_getbadness.c
+@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/lib_libvserver_a-syscall_getbadness.o -MD -MP -MF lib/$(DEPDIR)/lib_libvserver_a-syscall_getbadness.Tpo -c -o lib/lib_libvserver_a-syscall_getbadness.o `test -f 'lib/syscall_getbadness.c' || echo '$(srcdir)/'`lib/syscall_getbadness.c
+@am__fastdepCC_TRUE@   mv -f lib/$(DEPDIR)/lib_libvserver_a-syscall_getbadness.Tpo lib/$(DEPDIR)/lib_libvserver_a-syscall_getbadness.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lib/syscall_getbadness.c' object='lib/lib_libvserver_a-syscall_getbadness.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/lib_libvserver_a-syscall_getbadness.o `test -f 'lib/syscall_getbadness.c' || echo '$(srcdir)/'`lib/syscall_getbadness.c
+
+lib/lib_libvserver_a-syscall_getbadness.obj: lib/syscall_getbadness.c
+@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/lib_libvserver_a-syscall_getbadness.obj -MD -MP -MF lib/$(DEPDIR)/lib_libvserver_a-syscall_getbadness.Tpo -c -o lib/lib_libvserver_a-syscall_getbadness.obj `if test -f 'lib/syscall_getbadness.c'; then $(CYGPATH_W) 'lib/syscall_getbadness.c'; else $(CYGPATH_W) '$(srcdir)/lib/syscall_getbadness.c'; fi`
+@am__fastdepCC_TRUE@   mv -f lib/$(DEPDIR)/lib_libvserver_a-syscall_getbadness.Tpo lib/$(DEPDIR)/lib_libvserver_a-syscall_getbadness.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lib/syscall_getbadness.c' object='lib/lib_libvserver_a-syscall_getbadness.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/lib_libvserver_a-syscall_getbadness.obj `if test -f 'lib/syscall_getbadness.c'; then $(CYGPATH_W) 'lib/syscall_getbadness.c'; else $(CYGPATH_W) '$(srcdir)/lib/syscall_getbadness.c'; fi`
+
+lib/lib_libvserver_a-syscall_setbadness.o: lib/syscall_setbadness.c
+@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/lib_libvserver_a-syscall_setbadness.o -MD -MP -MF lib/$(DEPDIR)/lib_libvserver_a-syscall_setbadness.Tpo -c -o lib/lib_libvserver_a-syscall_setbadness.o `test -f 'lib/syscall_setbadness.c' || echo '$(srcdir)/'`lib/syscall_setbadness.c
+@am__fastdepCC_TRUE@   mv -f lib/$(DEPDIR)/lib_libvserver_a-syscall_setbadness.Tpo lib/$(DEPDIR)/lib_libvserver_a-syscall_setbadness.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lib/syscall_setbadness.c' object='lib/lib_libvserver_a-syscall_setbadness.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/lib_libvserver_a-syscall_setbadness.o `test -f 'lib/syscall_setbadness.c' || echo '$(srcdir)/'`lib/syscall_setbadness.c
+
+lib/lib_libvserver_a-syscall_setbadness.obj: lib/syscall_setbadness.c
+@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/lib_libvserver_a-syscall_setbadness.obj -MD -MP -MF lib/$(DEPDIR)/lib_libvserver_a-syscall_setbadness.Tpo -c -o lib/lib_libvserver_a-syscall_setbadness.obj `if test -f 'lib/syscall_setbadness.c'; then $(CYGPATH_W) 'lib/syscall_setbadness.c'; else $(CYGPATH_W) '$(srcdir)/lib/syscall_setbadness.c'; fi`
+@am__fastdepCC_TRUE@   mv -f lib/$(DEPDIR)/lib_libvserver_a-syscall_setbadness.Tpo lib/$(DEPDIR)/lib_libvserver_a-syscall_setbadness.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lib/syscall_setbadness.c' object='lib/lib_libvserver_a-syscall_setbadness.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/lib_libvserver_a-syscall_setbadness.obj `if test -f 'lib/syscall_setbadness.c'; then $(CYGPATH_W) 'lib/syscall_setbadness.c'; else $(CYGPATH_W) '$(srcdir)/lib/syscall_setbadness.c'; fi`
+
 ensc_fmt/lib_libvserver_a-fmt-32.o: ensc_fmt/fmt-32.c
 @am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ensc_fmt/lib_libvserver_a-fmt-32.o -MD -MP -MF ensc_fmt/$(DEPDIR)/lib_libvserver_a-fmt-32.Tpo -c -o ensc_fmt/lib_libvserver_a-fmt-32.o `test -f 'ensc_fmt/fmt-32.c' || echo '$(srcdir)/'`ensc_fmt/fmt-32.c
 @am__fastdepCC_TRUE@   mv -f ensc_fmt/$(DEPDIR)/lib_libvserver_a-fmt-32.Tpo ensc_fmt/$(DEPDIR)/lib_libvserver_a-fmt-32.Po
 ensc_fmt/lib_libvserver_a-fmt-32.o: ensc_fmt/fmt-32.c
 @am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ensc_fmt/lib_libvserver_a-fmt-32.o -MD -MP -MF ensc_fmt/$(DEPDIR)/lib_libvserver_a-fmt-32.Tpo -c -o ensc_fmt/lib_libvserver_a-fmt-32.o `test -f 'ensc_fmt/fmt-32.c' || echo '$(srcdir)/'`ensc_fmt/fmt-32.c
 @am__fastdepCC_TRUE@   mv -f ensc_fmt/$(DEPDIR)/lib_libvserver_a-fmt-32.Tpo ensc_fmt/$(DEPDIR)/lib_libvserver_a-fmt-32.Po
@@ -8919,6 +9149,13 @@ lib/lib_libvserver_la-syscall_setmapping.lo: lib/syscall_setmapping.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/lib_libvserver_la-syscall_setmapping.lo `test -f 'lib/syscall_setmapping.c' || echo '$(srcdir)/'`lib/syscall_setmapping.c
 
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/lib_libvserver_la-syscall_setmapping.lo `test -f 'lib/syscall_setmapping.c' || echo '$(srcdir)/'`lib/syscall_setmapping.c
 
+lib/lib_libvserver_la-syscall_unsetmapping.lo: lib/syscall_unsetmapping.c
+@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/lib_libvserver_la-syscall_unsetmapping.lo -MD -MP -MF lib/$(DEPDIR)/lib_libvserver_la-syscall_unsetmapping.Tpo -c -o lib/lib_libvserver_la-syscall_unsetmapping.lo `test -f 'lib/syscall_unsetmapping.c' || echo '$(srcdir)/'`lib/syscall_unsetmapping.c
+@am__fastdepCC_TRUE@   mv -f lib/$(DEPDIR)/lib_libvserver_la-syscall_unsetmapping.Tpo lib/$(DEPDIR)/lib_libvserver_la-syscall_unsetmapping.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lib/syscall_unsetmapping.c' object='lib/lib_libvserver_la-syscall_unsetmapping.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/lib_libvserver_la-syscall_unsetmapping.lo `test -f 'lib/syscall_unsetmapping.c' || echo '$(srcdir)/'`lib/syscall_unsetmapping.c
+
 lib/lib_libvserver_la-syscall_schedinfo.lo: lib/syscall_schedinfo.c
 @am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/lib_libvserver_la-syscall_schedinfo.lo -MD -MP -MF lib/$(DEPDIR)/lib_libvserver_la-syscall_schedinfo.Tpo -c -o lib/lib_libvserver_la-syscall_schedinfo.lo `test -f 'lib/syscall_schedinfo.c' || echo '$(srcdir)/'`lib/syscall_schedinfo.c
 @am__fastdepCC_TRUE@   mv -f lib/$(DEPDIR)/lib_libvserver_la-syscall_schedinfo.Tpo lib/$(DEPDIR)/lib_libvserver_la-syscall_schedinfo.Plo
 lib/lib_libvserver_la-syscall_schedinfo.lo: lib/syscall_schedinfo.c
 @am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/lib_libvserver_la-syscall_schedinfo.lo -MD -MP -MF lib/$(DEPDIR)/lib_libvserver_la-syscall_schedinfo.Tpo -c -o lib/lib_libvserver_la-syscall_schedinfo.lo `test -f 'lib/syscall_schedinfo.c' || echo '$(srcdir)/'`lib/syscall_schedinfo.c
 @am__fastdepCC_TRUE@   mv -f lib/$(DEPDIR)/lib_libvserver_la-syscall_schedinfo.Tpo lib/$(DEPDIR)/lib_libvserver_la-syscall_schedinfo.Plo
@@ -8968,6 +9205,20 @@ lib/lib_libvserver_la-syscall_tasktag.lo: lib/syscall_tasktag.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/lib_libvserver_la-syscall_tasktag.lo `test -f 'lib/syscall_tasktag.c' || echo '$(srcdir)/'`lib/syscall_tasktag.c
 
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/lib_libvserver_la-syscall_tasktag.lo `test -f 'lib/syscall_tasktag.c' || echo '$(srcdir)/'`lib/syscall_tasktag.c
 
+lib/lib_libvserver_la-syscall_getbadness.lo: lib/syscall_getbadness.c
+@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/lib_libvserver_la-syscall_getbadness.lo -MD -MP -MF lib/$(DEPDIR)/lib_libvserver_la-syscall_getbadness.Tpo -c -o lib/lib_libvserver_la-syscall_getbadness.lo `test -f 'lib/syscall_getbadness.c' || echo '$(srcdir)/'`lib/syscall_getbadness.c
+@am__fastdepCC_TRUE@   mv -f lib/$(DEPDIR)/lib_libvserver_la-syscall_getbadness.Tpo lib/$(DEPDIR)/lib_libvserver_la-syscall_getbadness.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lib/syscall_getbadness.c' object='lib/lib_libvserver_la-syscall_getbadness.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/lib_libvserver_la-syscall_getbadness.lo `test -f 'lib/syscall_getbadness.c' || echo '$(srcdir)/'`lib/syscall_getbadness.c
+
+lib/lib_libvserver_la-syscall_setbadness.lo: lib/syscall_setbadness.c
+@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/lib_libvserver_la-syscall_setbadness.lo -MD -MP -MF lib/$(DEPDIR)/lib_libvserver_la-syscall_setbadness.Tpo -c -o lib/lib_libvserver_la-syscall_setbadness.lo `test -f 'lib/syscall_setbadness.c' || echo '$(srcdir)/'`lib/syscall_setbadness.c
+@am__fastdepCC_TRUE@   mv -f lib/$(DEPDIR)/lib_libvserver_la-syscall_setbadness.Tpo lib/$(DEPDIR)/lib_libvserver_la-syscall_setbadness.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lib/syscall_setbadness.c' object='lib/lib_libvserver_la-syscall_setbadness.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/lib_libvserver_la-syscall_setbadness.lo `test -f 'lib/syscall_setbadness.c' || echo '$(srcdir)/'`lib/syscall_setbadness.c
+
 ensc_fmt/lib_libvserver_la-fmt-32.lo: ensc_fmt/fmt-32.c
 @am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ensc_fmt/lib_libvserver_la-fmt-32.lo -MD -MP -MF ensc_fmt/$(DEPDIR)/lib_libvserver_la-fmt-32.Tpo -c -o ensc_fmt/lib_libvserver_la-fmt-32.lo `test -f 'ensc_fmt/fmt-32.c' || echo '$(srcdir)/'`ensc_fmt/fmt-32.c
 @am__fastdepCC_TRUE@   mv -f ensc_fmt/$(DEPDIR)/lib_libvserver_la-fmt-32.Tpo ensc_fmt/$(DEPDIR)/lib_libvserver_la-fmt-32.Plo
 ensc_fmt/lib_libvserver_la-fmt-32.lo: ensc_fmt/fmt-32.c
 @am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ensc_fmt/lib_libvserver_la-fmt-32.lo -MD -MP -MF ensc_fmt/$(DEPDIR)/lib_libvserver_la-fmt-32.Tpo -c -o ensc_fmt/lib_libvserver_la-fmt-32.lo `test -f 'ensc_fmt/fmt-32.c' || echo '$(srcdir)/'`ensc_fmt/fmt-32.c
 @am__fastdepCC_TRUE@   mv -f ensc_fmt/$(DEPDIR)/lib_libvserver_la-fmt-32.Tpo ensc_fmt/$(DEPDIR)/lib_libvserver_la-fmt-32.Plo
@@ -9066,6 +9317,34 @@ lib/testsuite/lib_testsuite_personality-personality.obj: lib/testsuite/personali
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_testsuite_personality_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/testsuite/lib_testsuite_personality-personality.obj `if test -f 'lib/testsuite/personality.c'; then $(CYGPATH_W) 'lib/testsuite/personality.c'; else $(CYGPATH_W) '$(srcdir)/lib/testsuite/personality.c'; fi`
 
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_testsuite_personality_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/testsuite/lib_testsuite_personality-personality.obj `if test -f 'lib/testsuite/personality.c'; then $(CYGPATH_W) 'lib/testsuite/personality.c'; else $(CYGPATH_W) '$(srcdir)/lib/testsuite/personality.c'; fi`
 
+lib_internal/testsuite/lib_internal_testsuite_crypto-crypto.o: lib_internal/testsuite/crypto.c
+@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_internal_testsuite_crypto_CFLAGS) $(CFLAGS) -MT lib_internal/testsuite/lib_internal_testsuite_crypto-crypto.o -MD -MP -MF lib_internal/testsuite/$(DEPDIR)/lib_internal_testsuite_crypto-crypto.Tpo -c -o lib_internal/testsuite/lib_internal_testsuite_crypto-crypto.o `test -f 'lib_internal/testsuite/crypto.c' || echo '$(srcdir)/'`lib_internal/testsuite/crypto.c
+@am__fastdepCC_TRUE@   mv -f lib_internal/testsuite/$(DEPDIR)/lib_internal_testsuite_crypto-crypto.Tpo lib_internal/testsuite/$(DEPDIR)/lib_internal_testsuite_crypto-crypto.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lib_internal/testsuite/crypto.c' object='lib_internal/testsuite/lib_internal_testsuite_crypto-crypto.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_internal_testsuite_crypto_CFLAGS) $(CFLAGS) -c -o lib_internal/testsuite/lib_internal_testsuite_crypto-crypto.o `test -f 'lib_internal/testsuite/crypto.c' || echo '$(srcdir)/'`lib_internal/testsuite/crypto.c
+
+lib_internal/testsuite/lib_internal_testsuite_crypto-crypto.obj: lib_internal/testsuite/crypto.c
+@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_internal_testsuite_crypto_CFLAGS) $(CFLAGS) -MT lib_internal/testsuite/lib_internal_testsuite_crypto-crypto.obj -MD -MP -MF lib_internal/testsuite/$(DEPDIR)/lib_internal_testsuite_crypto-crypto.Tpo -c -o lib_internal/testsuite/lib_internal_testsuite_crypto-crypto.obj `if test -f 'lib_internal/testsuite/crypto.c'; then $(CYGPATH_W) 'lib_internal/testsuite/crypto.c'; else $(CYGPATH_W) '$(srcdir)/lib_internal/testsuite/crypto.c'; fi`
+@am__fastdepCC_TRUE@   mv -f lib_internal/testsuite/$(DEPDIR)/lib_internal_testsuite_crypto-crypto.Tpo lib_internal/testsuite/$(DEPDIR)/lib_internal_testsuite_crypto-crypto.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lib_internal/testsuite/crypto.c' object='lib_internal/testsuite/lib_internal_testsuite_crypto-crypto.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_internal_testsuite_crypto_CFLAGS) $(CFLAGS) -c -o lib_internal/testsuite/lib_internal_testsuite_crypto-crypto.obj `if test -f 'lib_internal/testsuite/crypto.c'; then $(CYGPATH_W) 'lib_internal/testsuite/crypto.c'; else $(CYGPATH_W) '$(srcdir)/lib_internal/testsuite/crypto.c'; fi`
+
+lib_internal/testsuite/lib_internal_testsuite_crypto_speed-crypto-speed.o: lib_internal/testsuite/crypto-speed.c
+@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_internal_testsuite_crypto_speed_CFLAGS) $(CFLAGS) -MT lib_internal/testsuite/lib_internal_testsuite_crypto_speed-crypto-speed.o -MD -MP -MF lib_internal/testsuite/$(DEPDIR)/lib_internal_testsuite_crypto_speed-crypto-speed.Tpo -c -o lib_internal/testsuite/lib_internal_testsuite_crypto_speed-crypto-speed.o `test -f 'lib_internal/testsuite/crypto-speed.c' || echo '$(srcdir)/'`lib_internal/testsuite/crypto-speed.c
+@am__fastdepCC_TRUE@   mv -f lib_internal/testsuite/$(DEPDIR)/lib_internal_testsuite_crypto_speed-crypto-speed.Tpo lib_internal/testsuite/$(DEPDIR)/lib_internal_testsuite_crypto_speed-crypto-speed.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lib_internal/testsuite/crypto-speed.c' object='lib_internal/testsuite/lib_internal_testsuite_crypto_speed-crypto-speed.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_internal_testsuite_crypto_speed_CFLAGS) $(CFLAGS) -c -o lib_internal/testsuite/lib_internal_testsuite_crypto_speed-crypto-speed.o `test -f 'lib_internal/testsuite/crypto-speed.c' || echo '$(srcdir)/'`lib_internal/testsuite/crypto-speed.c
+
+lib_internal/testsuite/lib_internal_testsuite_crypto_speed-crypto-speed.obj: lib_internal/testsuite/crypto-speed.c
+@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_internal_testsuite_crypto_speed_CFLAGS) $(CFLAGS) -MT lib_internal/testsuite/lib_internal_testsuite_crypto_speed-crypto-speed.obj -MD -MP -MF lib_internal/testsuite/$(DEPDIR)/lib_internal_testsuite_crypto_speed-crypto-speed.Tpo -c -o lib_internal/testsuite/lib_internal_testsuite_crypto_speed-crypto-speed.obj `if test -f 'lib_internal/testsuite/crypto-speed.c'; then $(CYGPATH_W) 'lib_internal/testsuite/crypto-speed.c'; else $(CYGPATH_W) '$(srcdir)/lib_internal/testsuite/crypto-speed.c'; fi`
+@am__fastdepCC_TRUE@   mv -f lib_internal/testsuite/$(DEPDIR)/lib_internal_testsuite_crypto_speed-crypto-speed.Tpo lib_internal/testsuite/$(DEPDIR)/lib_internal_testsuite_crypto_speed-crypto-speed.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lib_internal/testsuite/crypto-speed.c' object='lib_internal/testsuite/lib_internal_testsuite_crypto_speed-crypto-speed.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_internal_testsuite_crypto_speed_CFLAGS) $(CFLAGS) -c -o lib_internal/testsuite/lib_internal_testsuite_crypto_speed-crypto-speed.obj `if test -f 'lib_internal/testsuite/crypto-speed.c'; then $(CYGPATH_W) 'lib_internal/testsuite/crypto-speed.c'; else $(CYGPATH_W) '$(srcdir)/lib_internal/testsuite/crypto-speed.c'; fi`
+
 lib_internal/testsuite/lib_internal_testsuite_isnumber-isnumber.o: lib_internal/testsuite/isnumber.c
 @am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_internal_testsuite_isnumber_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_internal/testsuite/lib_internal_testsuite_isnumber-isnumber.o -MD -MP -MF lib_internal/testsuite/$(DEPDIR)/lib_internal_testsuite_isnumber-isnumber.Tpo -c -o lib_internal/testsuite/lib_internal_testsuite_isnumber-isnumber.o `test -f 'lib_internal/testsuite/isnumber.c' || echo '$(srcdir)/'`lib_internal/testsuite/isnumber.c
 @am__fastdepCC_TRUE@   mv -f lib_internal/testsuite/$(DEPDIR)/lib_internal_testsuite_isnumber-isnumber.Tpo lib_internal/testsuite/$(DEPDIR)/lib_internal_testsuite_isnumber-isnumber.Po
 lib_internal/testsuite/lib_internal_testsuite_isnumber-isnumber.o: lib_internal/testsuite/isnumber.c
 @am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_internal_testsuite_isnumber_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib_internal/testsuite/lib_internal_testsuite_isnumber-isnumber.o -MD -MP -MF lib_internal/testsuite/$(DEPDIR)/lib_internal_testsuite_isnumber-isnumber.Tpo -c -o lib_internal/testsuite/lib_internal_testsuite_isnumber-isnumber.o `test -f 'lib_internal/testsuite/isnumber.c' || echo '$(srcdir)/'`lib_internal/testsuite/isnumber.c
 @am__fastdepCC_TRUE@   mv -f lib_internal/testsuite/$(DEPDIR)/lib_internal_testsuite_isnumber-isnumber.Tpo lib_internal/testsuite/$(DEPDIR)/lib_internal_testsuite_isnumber-isnumber.Po
@@ -9150,6 +9429,34 @@ lib_internal/testsuite/lib_internal_testsuite_sigbus_gnu-sigbus.obj: lib_interna
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_internal_testsuite_sigbus_gnu_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_internal/testsuite/lib_internal_testsuite_sigbus_gnu-sigbus.obj `if test -f 'lib_internal/testsuite/sigbus.c'; then $(CYGPATH_W) 'lib_internal/testsuite/sigbus.c'; else $(CYGPATH_W) '$(srcdir)/lib_internal/testsuite/sigbus.c'; fi`
 
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_internal_testsuite_sigbus_gnu_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib_internal/testsuite/lib_internal_testsuite_sigbus_gnu-sigbus.obj `if test -f 'lib_internal/testsuite/sigbus.c'; then $(CYGPATH_W) 'lib_internal/testsuite/sigbus.c'; else $(CYGPATH_W) '$(srcdir)/lib_internal/testsuite/sigbus.c'; fi`
 
+src/testsuite/src_testsuite_hashcalc-hashcalc.o: src/testsuite/hashcalc.c
+@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_testsuite_hashcalc_CFLAGS) $(CFLAGS) -MT src/testsuite/src_testsuite_hashcalc-hashcalc.o -MD -MP -MF src/testsuite/$(DEPDIR)/src_testsuite_hashcalc-hashcalc.Tpo -c -o src/testsuite/src_testsuite_hashcalc-hashcalc.o `test -f 'src/testsuite/hashcalc.c' || echo '$(srcdir)/'`src/testsuite/hashcalc.c
+@am__fastdepCC_TRUE@   mv -f src/testsuite/$(DEPDIR)/src_testsuite_hashcalc-hashcalc.Tpo src/testsuite/$(DEPDIR)/src_testsuite_hashcalc-hashcalc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='src/testsuite/hashcalc.c' object='src/testsuite/src_testsuite_hashcalc-hashcalc.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_testsuite_hashcalc_CFLAGS) $(CFLAGS) -c -o src/testsuite/src_testsuite_hashcalc-hashcalc.o `test -f 'src/testsuite/hashcalc.c' || echo '$(srcdir)/'`src/testsuite/hashcalc.c
+
+src/testsuite/src_testsuite_hashcalc-hashcalc.obj: src/testsuite/hashcalc.c
+@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_testsuite_hashcalc_CFLAGS) $(CFLAGS) -MT src/testsuite/src_testsuite_hashcalc-hashcalc.obj -MD -MP -MF src/testsuite/$(DEPDIR)/src_testsuite_hashcalc-hashcalc.Tpo -c -o src/testsuite/src_testsuite_hashcalc-hashcalc.obj `if test -f 'src/testsuite/hashcalc.c'; then $(CYGPATH_W) 'src/testsuite/hashcalc.c'; else $(CYGPATH_W) '$(srcdir)/src/testsuite/hashcalc.c'; fi`
+@am__fastdepCC_TRUE@   mv -f src/testsuite/$(DEPDIR)/src_testsuite_hashcalc-hashcalc.Tpo src/testsuite/$(DEPDIR)/src_testsuite_hashcalc-hashcalc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='src/testsuite/hashcalc.c' object='src/testsuite/src_testsuite_hashcalc-hashcalc.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_testsuite_hashcalc_CFLAGS) $(CFLAGS) -c -o src/testsuite/src_testsuite_hashcalc-hashcalc.obj `if test -f 'src/testsuite/hashcalc.c'; then $(CYGPATH_W) 'src/testsuite/hashcalc.c'; else $(CYGPATH_W) '$(srcdir)/src/testsuite/hashcalc.c'; fi`
+
+src/testsuite/src_testsuite_hashcalc_plain-hashcalc-plain.o: src/testsuite/hashcalc-plain.c
+@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_testsuite_hashcalc_plain_CFLAGS) $(CFLAGS) -MT src/testsuite/src_testsuite_hashcalc_plain-hashcalc-plain.o -MD -MP -MF src/testsuite/$(DEPDIR)/src_testsuite_hashcalc_plain-hashcalc-plain.Tpo -c -o src/testsuite/src_testsuite_hashcalc_plain-hashcalc-plain.o `test -f 'src/testsuite/hashcalc-plain.c' || echo '$(srcdir)/'`src/testsuite/hashcalc-plain.c
+@am__fastdepCC_TRUE@   mv -f src/testsuite/$(DEPDIR)/src_testsuite_hashcalc_plain-hashcalc-plain.Tpo src/testsuite/$(DEPDIR)/src_testsuite_hashcalc_plain-hashcalc-plain.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='src/testsuite/hashcalc-plain.c' object='src/testsuite/src_testsuite_hashcalc_plain-hashcalc-plain.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_testsuite_hashcalc_plain_CFLAGS) $(CFLAGS) -c -o src/testsuite/src_testsuite_hashcalc_plain-hashcalc-plain.o `test -f 'src/testsuite/hashcalc-plain.c' || echo '$(srcdir)/'`src/testsuite/hashcalc-plain.c
+
+src/testsuite/src_testsuite_hashcalc_plain-hashcalc-plain.obj: src/testsuite/hashcalc-plain.c
+@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_testsuite_hashcalc_plain_CFLAGS) $(CFLAGS) -MT src/testsuite/src_testsuite_hashcalc_plain-hashcalc-plain.obj -MD -MP -MF src/testsuite/$(DEPDIR)/src_testsuite_hashcalc_plain-hashcalc-plain.Tpo -c -o src/testsuite/src_testsuite_hashcalc_plain-hashcalc-plain.obj `if test -f 'src/testsuite/hashcalc-plain.c'; then $(CYGPATH_W) 'src/testsuite/hashcalc-plain.c'; else $(CYGPATH_W) '$(srcdir)/src/testsuite/hashcalc-plain.c'; fi`
+@am__fastdepCC_TRUE@   mv -f src/testsuite/$(DEPDIR)/src_testsuite_hashcalc_plain-hashcalc-plain.Tpo src/testsuite/$(DEPDIR)/src_testsuite_hashcalc_plain-hashcalc-plain.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='src/testsuite/hashcalc-plain.c' object='src/testsuite/src_testsuite_hashcalc_plain-hashcalc-plain.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_testsuite_hashcalc_plain_CFLAGS) $(CFLAGS) -c -o src/testsuite/src_testsuite_hashcalc_plain-hashcalc-plain.obj `if test -f 'src/testsuite/hashcalc-plain.c'; then $(CYGPATH_W) 'src/testsuite/hashcalc-plain.c'; else $(CYGPATH_W) '$(srcdir)/src/testsuite/hashcalc-plain.c'; fi`
+
 src/testsuite/src_testsuite_vunify_functest-vunify-functest.o: src/testsuite/vunify-functest.c
 @am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_testsuite_vunify_functest_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/testsuite/src_testsuite_vunify_functest-vunify-functest.o -MD -MP -MF src/testsuite/$(DEPDIR)/src_testsuite_vunify_functest-vunify-functest.Tpo -c -o src/testsuite/src_testsuite_vunify_functest-vunify-functest.o `test -f 'src/testsuite/vunify-functest.c' || echo '$(srcdir)/'`src/testsuite/vunify-functest.c
 @am__fastdepCC_TRUE@   mv -f src/testsuite/$(DEPDIR)/src_testsuite_vunify_functest-vunify-functest.Tpo src/testsuite/$(DEPDIR)/src_testsuite_vunify_functest-vunify-functest.Po
 src/testsuite/src_testsuite_vunify_functest-vunify-functest.o: src/testsuite/vunify-functest.c
 @am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_testsuite_vunify_functest_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/testsuite/src_testsuite_vunify_functest-vunify-functest.o -MD -MP -MF src/testsuite/$(DEPDIR)/src_testsuite_vunify_functest-vunify-functest.Tpo -c -o src/testsuite/src_testsuite_vunify_functest-vunify-functest.o `test -f 'src/testsuite/vunify-functest.c' || echo '$(srcdir)/'`src/testsuite/vunify-functest.c
 @am__fastdepCC_TRUE@   mv -f src/testsuite/$(DEPDIR)/src_testsuite_vunify_functest-vunify-functest.Tpo src/testsuite/$(DEPDIR)/src_testsuite_vunify_functest-vunify-functest.Po
@@ -9164,6 +9471,20 @@ src/testsuite/src_testsuite_vunify_functest-vunify-functest.obj: src/testsuite/v
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_testsuite_vunify_functest_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/testsuite/src_testsuite_vunify_functest-vunify-functest.obj `if test -f 'src/testsuite/vunify-functest.c'; then $(CYGPATH_W) 'src/testsuite/vunify-functest.c'; else $(CYGPATH_W) '$(srcdir)/src/testsuite/vunify-functest.c'; fi`
 
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_testsuite_vunify_functest_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/testsuite/src_testsuite_vunify_functest-vunify-functest.obj `if test -f 'src/testsuite/vunify-functest.c'; then $(CYGPATH_W) 'src/testsuite/vunify-functest.c'; else $(CYGPATH_W) '$(srcdir)/src/testsuite/vunify-functest.c'; fi`
 
+src/src_vhashify-vhashify.o: src/vhashify.c
+@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_vhashify_CFLAGS) $(CFLAGS) -MT src/src_vhashify-vhashify.o -MD -MP -MF src/$(DEPDIR)/src_vhashify-vhashify.Tpo -c -o src/src_vhashify-vhashify.o `test -f 'src/vhashify.c' || echo '$(srcdir)/'`src/vhashify.c
+@am__fastdepCC_TRUE@   mv -f src/$(DEPDIR)/src_vhashify-vhashify.Tpo src/$(DEPDIR)/src_vhashify-vhashify.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='src/vhashify.c' object='src/src_vhashify-vhashify.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_vhashify_CFLAGS) $(CFLAGS) -c -o src/src_vhashify-vhashify.o `test -f 'src/vhashify.c' || echo '$(srcdir)/'`src/vhashify.c
+
+src/src_vhashify-vhashify.obj: src/vhashify.c
+@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_vhashify_CFLAGS) $(CFLAGS) -MT src/src_vhashify-vhashify.obj -MD -MP -MF src/$(DEPDIR)/src_vhashify-vhashify.Tpo -c -o src/src_vhashify-vhashify.obj `if test -f 'src/vhashify.c'; then $(CYGPATH_W) 'src/vhashify.c'; else $(CYGPATH_W) '$(srcdir)/src/vhashify.c'; fi`
+@am__fastdepCC_TRUE@   mv -f src/$(DEPDIR)/src_vhashify-vhashify.Tpo src/$(DEPDIR)/src_vhashify-vhashify.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='src/vhashify.c' object='src/src_vhashify-vhashify.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(src_vhashify_CFLAGS) $(CFLAGS) -c -o src/src_vhashify-vhashify.obj `if test -f 'src/vhashify.c'; then $(CYGPATH_W) 'src/vhashify.c'; else $(CYGPATH_W) '$(srcdir)/src/vhashify.c'; fi`
+
 src/src_vkill-vkill.o: src/vkill.c
 @am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_vkill_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/src_vkill-vkill.o -MD -MP -MF src/$(DEPDIR)/src_vkill-vkill.Tpo -c -o src/src_vkill-vkill.o `test -f 'src/vkill.c' || echo '$(srcdir)/'`src/vkill.c
 @am__fastdepCC_TRUE@   mv -f src/$(DEPDIR)/src_vkill-vkill.Tpo src/$(DEPDIR)/src_vkill-vkill.Po
 src/src_vkill-vkill.o: src/vkill.c
 @am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_vkill_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/src_vkill-vkill.o -MD -MP -MF src/$(DEPDIR)/src_vkill-vkill.Tpo -c -o src/src_vkill-vkill.o `test -f 'src/vkill.c' || echo '$(srcdir)/'`src/vkill.c
 @am__fastdepCC_TRUE@   mv -f src/$(DEPDIR)/src_vkill-vkill.Tpo src/$(DEPDIR)/src_vkill-vkill.Po
@@ -9949,6 +10270,8 @@ doc_doc:                 $(doc_gen_DOCS)
 @HAVE_XSLTPROC_TRUE@@HAVE_XSLTP_FALSE@                         $(XSLTPROC) $(XSLT_FLAGS) $(XSLT_AMFLAGS) -o '$@.tmp' "$(STYLESHEET)" "$<"
 @HAVE_XSLTPROC_TRUE@@HAVE_XSLTP_FALSE@                         @mv -f '$@.tmp' '$@'
 
 @HAVE_XSLTPROC_TRUE@@HAVE_XSLTP_FALSE@                         $(XSLTPROC) $(XSLT_FLAGS) $(XSLT_AMFLAGS) -o '$@.tmp' "$(STYLESHEET)" "$<"
 @HAVE_XSLTPROC_TRUE@@HAVE_XSLTP_FALSE@                         @mv -f '$@.tmp' '$@'
 
+man/vserver-build.8:   man/.vserver-build.8.pathsubst.stamp
+
 scripts/util-vserver-vars:     scripts/.util-vserver-vars.pathsubst.stamp
 scripts/legacy/vps:            scripts/legacy/.vps.pathsubst.stamp
 
 scripts/util-vserver-vars:     scripts/.util-vserver-vars.pathsubst.stamp
 scripts/legacy/vps:            scripts/legacy/.vps.pathsubst.stamp
 
diff --git a/NEWS b/NEWS
index 84caa2e..84c73b5 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,51 @@
+version 0.30.215
+================
+
+       - added support for using libnss instead of beecrypt for
+       vhashify's hash calculation.  libnss has bad SHA1 performance on
+       i386, but is a) maintained and b) gives better performance with
+       all other hashes and on x86_64.
+
+       - added tunctl, a small program to setup tun/tap interfaces, with
+       support in the configuration.
+
+       - vattribute and nattribute now support a --get operation, which
+       parses the flags and capabilities into a human-readable form.
+
+       - vspace supports all the spaces currently available.
+
+       - vmemctrl controls the OOM bias of context.
+
+       - dynamic contexts are unbroken.
+
+       - hopefully all rpm-fake races have been fixed.
+
+       - flock has been replaced by lockf, which works on NFS.
+
+       - the clone build method now supports exclude lists.
+
+       - vmount handles mounting into a guest.
+
+       - various fixes for the Gentoo-scripts, thanks to Benedikt Böhm.
+
+       - support for yum's persistdir has been added.
+
+       - per-guest device maps are now supported.
+
+       - vserver ... build now sets the barrier on the parent directory.
+
+       - fsck is now supported for the guest's fstab.
+
+       - symlinks are now handled on all levels in namespace cleanup.
+
+       - the debootstrap build method now supports debootstrap 1.0.8.
+
+       - a documentation update, thanks to Micah Anderson.
+
+       - use numeric uids/gids for the template build method.
+
+       - add support for the alpine and f8 distributions.
+       
 version 0.30.214
 ================
        - patches for yum-3.2.
 version 0.30.214
 ================
        - patches for yum-3.2.
index 14188a7..6130037 100644 (file)
@@ -6412,6 +6412,164 @@ AC_SUBST([SED])
 AC_MSG_RESULT([$SED])
 ])
 
 AC_MSG_RESULT([$SED])
 ])
 
+# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
+# 
+# Copyright Â© 2004 Scott James Remnant <scott@netsplit.com>.
+#
+# 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 of the License, 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.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
+# ----------------------------------
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+       AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+if test -n "$PKG_CONFIG"; then
+       _pkg_min_version=m4_default([$1], [0.9.0])
+       AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+       if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+               AC_MSG_RESULT([yes])
+       else
+               AC_MSG_RESULT([no])
+               PKG_CONFIG=""
+       fi
+               
+fi[]dnl
+])# PKG_PROG_PKG_CONFIG
+
+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+#
+# Check to see whether a particular set of modules exists.  Similar
+# to PKG_CHECK_MODULES(), but does not set variables or print errors.
+#
+#
+# Similar to PKG_CHECK_MODULES, make sure that the first instance of
+# this or PKG_CHECK_MODULES is called, or make sure to call
+# PKG_CHECK_EXISTS manually
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+  m4_ifval([$2], [$2], [:])
+m4_ifvaln([$3], [else
+  $3])dnl
+fi])
+
+
+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+# ---------------------------------------------
+m4_define([_PKG_CONFIG],
+[if test -n "$PKG_CONFIG"; then
+    if test -n "$$1"; then
+        pkg_cv_[]$1="$$1"
+    else
+        PKG_CHECK_EXISTS([$3],
+                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
+                        [pkg_failed=yes])
+    fi
+else
+       pkg_failed=untried
+fi[]dnl
+])# _PKG_CONFIG
+
+# _PKG_SHORT_ERRORS_SUPPORTED
+# -----------------------------
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi[]dnl
+])# _PKG_SHORT_ERRORS_SUPPORTED
+
+
+# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
+#
+#
+# Note that if there is a possibility the first call to
+# PKG_CHECK_MODULES might not happen, you should be sure to include an
+# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+#
+#
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+
+pkg_failed=no
+AC_MSG_CHECKING([for $1])
+
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
+
+if test $pkg_failed = yes; then
+        _PKG_SHORT_ERRORS_SUPPORTED
+        if test $_pkg_short_errors_supported = yes; then
+               $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
+        else 
+               $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+
+       ifelse([$4], , [AC_MSG_ERROR(dnl
+[Package requirements ($2) were not met:
+
+$$1_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+_PKG_TEXT
+])],
+               [AC_MSG_RESULT([no])
+                $4])
+elif test $pkg_failed = untried; then
+       ifelse([$4], , [AC_MSG_FAILURE(dnl
+[The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+_PKG_TEXT
+
+To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
+               [$4])
+else
+       $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+       $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+        AC_MSG_RESULT([yes])
+       ifelse([$3], , :, [$3])
+fi[]dnl
+])# PKG_CHECK_MODULES
+
 # Copyright (C) 2002, 2003, 2005, 2006  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # Copyright (C) 2002, 2003, 2005, 2006  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
index 5839832..ad2998d 100644 (file)
@@ -1,5 +1,8 @@
 /* config.h.in.  Generated from configure.ac by autoheader.  */
 
 /* config.h.in.  Generated from configure.ac by autoheader.  */
 
+/* Used crypto API */
+#undef ENSC_CRYPTO_API
+
 /* Define to 1 if dietlibc supports C99 */
 #undef ENSC_DIETLIBC_C99
 
 /* Define to 1 if dietlibc supports C99 */
 #undef ENSC_DIETLIBC_C99
 
index eaf02e1..762be17 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for util-vserver 0.30.214.
+# Generated by GNU Autoconf 2.61 for util-vserver 0.30.215.
 #
 # Report bugs to <vserver@list.linux-vserver.org>.
 #
 #
 # Report bugs to <vserver@list.linux-vserver.org>.
 #
@@ -728,8 +728,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
 # Identity of this package.
 PACKAGE_NAME='util-vserver'
 PACKAGE_TARNAME='util-vserver'
 # Identity of this package.
 PACKAGE_NAME='util-vserver'
 PACKAGE_TARNAME='util-vserver'
-PACKAGE_VERSION='0.30.214'
-PACKAGE_STRING='util-vserver 0.30.214'
+PACKAGE_VERSION='0.30.215'
+PACKAGE_STRING='util-vserver 0.30.215'
 PACKAGE_BUGREPORT='vserver@list.linux-vserver.org'
 
 ac_unique_file="src/capchroot.c"
 PACKAGE_BUGREPORT='vserver@list.linux-vserver.org'
 
 ac_unique_file="src/capchroot.c"
@@ -863,6 +863,7 @@ CCDEPMODE
 am__fastdepCC_TRUE
 am__fastdepCC_FALSE
 LN_S
 am__fastdepCC_TRUE
 am__fastdepCC_FALSE
 LN_S
+PKG_CONFIG
 ENSC_HAVE_CXX_COMPILER_TRUE
 ENSC_HAVE_CXX_COMPILER_FALSE
 ENSC_HAVE_C99_COMPILER_TRUE
 ENSC_HAVE_CXX_COMPILER_TRUE
 ENSC_HAVE_CXX_COMPILER_FALSE
 ENSC_HAVE_C99_COMPILER_TRUE
@@ -909,6 +910,7 @@ CPIO
 RESTORE
 RSYNC
 STRACE
 RESTORE
 RSYNC
 STRACE
+FSCK
 DOXYGEN
 XSLTP
 XSLTPROC
 DOXYGEN
 XSLTP
 XSLTPROC
@@ -949,6 +951,14 @@ ENSC_HAVE_BEECRYPT_TRUE
 ENSC_HAVE_BEECRYPT_FALSE
 ENSC_CAN_BEECRYPT_WITH_DIETLIBC_TRUE
 ENSC_CAN_BEECRYPT_WITH_DIETLIBC_FALSE
 ENSC_HAVE_BEECRYPT_FALSE
 ENSC_CAN_BEECRYPT_WITH_DIETLIBC_TRUE
 ENSC_CAN_BEECRYPT_WITH_DIETLIBC_FALSE
+NSS_CFLAGS
+NSS_LIBS
+ENSC_HAVE_CRYPTO_TRUE
+ENSC_HAVE_CRYPTO_FALSE
+ENSC_CAN_CRYPTO_WITH_DIETLIBC_TRUE
+ENSC_CAN_CRYPTO_WITH_DIETLIBC_FALSE
+ENSC_CRYPTO_CFLAGS
+ENSC_CRYPTO_LIB
 HAVE_GENTOO_INIT_TRUE
 HAVE_GENTOO_INIT_FALSE
 HAVE_SYSV_INIT_TRUE
 HAVE_GENTOO_INIT_TRUE
 HAVE_GENTOO_INIT_FALSE
 HAVE_SYSV_INIT_TRUE
@@ -967,12 +977,15 @@ CPPFLAGS
 CCC
 CC
 CFLAGS
 CCC
 CC
 CFLAGS
+PKG_CONFIG
 CPP
 DIET
 DIETFLAGS
 CXXCPP
 F77
 CPP
 DIET
 DIETFLAGS
 CXXCPP
 F77
-FFLAGS'
+FFLAGS
+NSS_CFLAGS
+NSS_LIBS'
 
 
 # Initialize some variables set by options.
 
 
 # Initialize some variables set by options.
@@ -1475,7 +1488,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures util-vserver 0.30.214 to adapt to many kinds of systems.
+\`configure' configures util-vserver 0.30.215 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1545,7 +1558,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of util-vserver 0.30.214:";;
+     short | recursive ) echo "Configuration of util-vserver 0.30.215:";;
    esac
   cat <<\_ACEOF
 
    esac
   cat <<\_ACEOF
 
@@ -1595,6 +1608,8 @@ Optional Packages:
                           both]
   --with-tags[=TAGS]      include additional configurations [automatic]
   --with-vrootdir=DIR     place vservers under DIR (default: /vservers)
                           both]
   --with-tags[=TAGS]      include additional configurations [automatic]
   --with-vrootdir=DIR     place vservers under DIR (default: /vservers)
+  --with-crypto-api=API   select crypto api to be used; possible values are
+                          `none', `nss', `beecrypt', `auto' (default:auto)
   --with-initscripts=TYPE force host initscripts; valid values are 'gentoo'
                           and 'sysv' (default: guess)
 
   --with-initscripts=TYPE force host initscripts; valid values are 'gentoo'
                           and 'sysv' (default: guess)
 
@@ -1608,12 +1623,15 @@ Some influential environment variables:
               you have headers in a nonstandard directory <include dir>
   CC          C compiler command
   CFLAGS      C compiler flags
               you have headers in a nonstandard directory <include dir>
   CC          C compiler command
   CFLAGS      C compiler flags
+  PKG_CONFIG  path to pkg-config utility
   CPP         C preprocessor
   DIET        The 'diet' wrapper (default: diet)
   DIETFLAGS   Flags passed to the 'diet' wrapper (default: -O)
   CXXCPP      C++ preprocessor
   F77         Fortran 77 compiler command
   FFLAGS      Fortran 77 compiler flags
   CPP         C preprocessor
   DIET        The 'diet' wrapper (default: diet)
   DIETFLAGS   Flags passed to the 'diet' wrapper (default: -O)
   CXXCPP      C++ preprocessor
   F77         Fortran 77 compiler command
   FFLAGS      Fortran 77 compiler flags
+  NSS_CFLAGS  C compiler flags for NSS, overriding pkg-config
+  NSS_LIBS    linker flags for NSS, overriding pkg-config
 
 Use these variables to override the choices made by `configure' or to help
 it to find libraries and programs with nonstandard names/locations.
 
 Use these variables to override the choices made by `configure' or to help
 it to find libraries and programs with nonstandard names/locations.
@@ -1679,7 +1697,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-util-vserver configure 0.30.214
+util-vserver configure 0.30.215
 generated by GNU Autoconf 2.61
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
 generated by GNU Autoconf 2.61
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1693,7 +1711,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by util-vserver $as_me 0.30.214, which was
+It was created by util-vserver $as_me 0.30.215, which was
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   $ $0 $@
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   $ $0 $@
@@ -2387,7 +2405,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='util-vserver'
 
 # Define the identity of the package.
  PACKAGE='util-vserver'
- VERSION='0.30.214'
+ VERSION='0.30.215'
 
 
 cat >>confdefs.h <<_ACEOF
 
 
 cat >>confdefs.h <<_ACEOF
@@ -4424,6 +4442,126 @@ fi
 
 
 
 
 
 
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+       if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PKG_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+  { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
+echo "${ECHO_T}$PKG_CONFIG" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_PKG_CONFIG"; then
+  ac_pt_PKG_CONFIG=$PKG_CONFIG
+  # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $ac_pt_PKG_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+if test -n "$ac_pt_PKG_CONFIG"; then
+  { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
+echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+  if test "x$ac_pt_PKG_CONFIG" = x; then
+    PKG_CONFIG=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    PKG_CONFIG=$ac_pt_PKG_CONFIG
+  fi
+else
+  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+fi
+
+fi
+if test -n "$PKG_CONFIG"; then
+       _pkg_min_version=0.9.0
+       { echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5
+echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6; }
+       if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+               { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+       else
+               { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+               PKG_CONFIG=""
+       fi
+
+fi
+
+
 
 
        { echo "$as_me:$LINENO: checking whether $CXX is a C++ compiler" >&5
 
 
        { echo "$as_me:$LINENO: checking whether $CXX is a C++ compiler" >&5
@@ -8197,6 +8335,92 @@ Can not find the 'strace' tool within '${ensc_searchpath:-$PATH}'.
 
 
 
 
 
 
+       if test -z ""; then
+               rq=true
+       else
+               rq=false
+       fi
+
+       if $rq; then
+               ensc_dflt=
+       else
+               ensc_dflt=""
+       fi
+
+       for ac_prog in fsck
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_FSCK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $FSCK in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_FSCK="$FSCK" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $ensc_searchpath
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_FSCK="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+FSCK=$ac_cv_path_FSCK
+if test -n "$FSCK"; then
+  { echo "$as_me:$LINENO: result: $FSCK" >&5
+echo "${ECHO_T}$FSCK" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  test -n "$FSCK" && break
+done
+test -n "$FSCK" || FSCK="$ensc_dflt"
+
+
+       if test -z "${FSCK}" && $rq; then
+               if test -z ""; then
+                       { { echo "$as_me:$LINENO: error: Can not find the 'fsck' tool within '${ensc_searchpath:-$PATH}'." >&5
+echo "$as_me: error: Can not find the 'fsck' tool within '${ensc_searchpath:-$PATH}'." >&2;}
+   { (exit 1); exit 1; }; }
+               else
+                       { { echo "$as_me:$LINENO: error:
+Can not find the 'fsck' tool within '${ensc_searchpath:-$PATH}'.
+" >&5
+echo "$as_me: error:
+Can not find the 'fsck' tool within '${ensc_searchpath:-$PATH}'.
+" >&2;}
+   { (exit 1); exit 1; }; }
+               fi
+       fi
+
+       if test -e "${FSCK}"; then
+               FSCK=`readlink -f "${FSCK}"`
+       fi
+
+       test "${FSCK}" && ENSC_PATHPROG_SED="${ENSC_PATHPROG_SED}s!@'FSCK'@!${FSCK}!g;"
+
+       test "${FSCK}"
+
+
+
+
 
        if test -z ":"; then
                rq=true
 
        if test -z ":"; then
                rq=true
@@ -12332,7 +12556,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 12335 "configure"' > conftest.$ac_ext
+  echo '#line 12559 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -14360,11 +14584,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:14363: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:14587: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:14367: \$? = $ac_status" >&5
+   echo "$as_me:14591: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -14628,11 +14852,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:14631: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:14855: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:14635: \$? = $ac_status" >&5
+   echo "$as_me:14859: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -14732,11 +14956,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:14735: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:14959: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:14739: \$? = $ac_status" >&5
+   echo "$as_me:14963: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -16197,7 +16421,7 @@ linux*)
   libsuff=
   case "$host_cpu" in
   x86_64*|s390x*|powerpc64*)
   libsuff=
   case "$host_cpu" in
   x86_64*|s390x*|powerpc64*)
-    echo '#line 16200 "configure"' > conftest.$ac_ext
+    echo '#line 16424 "configure"' > conftest.$ac_ext
     if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
     if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -17061,7 +17285,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 17064 "configure"
+#line 17288 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -17161,7 +17385,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 17164 "configure"
+#line 17388 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -19497,11 +19721,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:19500: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:19724: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:19504: \$? = $ac_status" >&5
+   echo "$as_me:19728: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -19601,11 +19825,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:19604: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:19828: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:19608: \$? = $ac_status" >&5
+   echo "$as_me:19832: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -20137,7 +20361,7 @@ linux*)
   libsuff=
   case "$host_cpu" in
   x86_64*|s390x*|powerpc64*)
   libsuff=
   case "$host_cpu" in
   x86_64*|s390x*|powerpc64*)
-    echo '#line 20140 "configure"' > conftest.$ac_ext
+    echo '#line 20364 "configure"' > conftest.$ac_ext
     if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
     if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -21192,11 +21416,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:21195: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:21419: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:21199: \$? = $ac_status" >&5
+   echo "$as_me:21423: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -21296,11 +21520,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:21299: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:21523: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:21303: \$? = $ac_status" >&5
+   echo "$as_me:21527: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -22741,7 +22965,7 @@ linux*)
   libsuff=
   case "$host_cpu" in
   x86_64*|s390x*|powerpc64*)
   libsuff=
   case "$host_cpu" in
   x86_64*|s390x*|powerpc64*)
-    echo '#line 22744 "configure"' > conftest.$ac_ext
+    echo '#line 22968 "configure"' > conftest.$ac_ext
     if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
     if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -23515,11 +23739,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:23518: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:23742: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:23522: \$? = $ac_status" >&5
+   echo "$as_me:23746: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -23783,11 +24007,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:23786: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:24010: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:23790: \$? = $ac_status" >&5
+   echo "$as_me:24014: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -23887,11 +24111,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:23890: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:24114: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:23894: \$? = $ac_status" >&5
+   echo "$as_me:24118: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -25352,7 +25576,7 @@ linux*)
   libsuff=
   case "$host_cpu" in
   x86_64*|s390x*|powerpc64*)
   libsuff=
   case "$host_cpu" in
   x86_64*|s390x*|powerpc64*)
-    echo '#line 25355 "configure"' > conftest.$ac_ext
+    echo '#line 25579 "configure"' > conftest.$ac_ext
     if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
     if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
 fi
 
 
 fi
 
 
+{ echo "$as_me:$LINENO: checking for used crypto API" >&5
+echo $ECHO_N "checking for used crypto API... $ECHO_C" >&6; }
+
+# Check whether --with-crypto-api was given.
+if test "${with_crypto_api+set}" = set; then
+  withval=$with_crypto_api; case $withval in
+               (none|nss|beecrypt|auto)        ensc_crypto_api=$withval;;
+               (*)     { { echo "$as_me:$LINENO: error: invalid initscripts value, only gentoo and sysv are supported" >&5
+echo "$as_me: error: invalid initscripts value, only gentoo and sysv are supported" >&2;}
+   { (exit 1); exit 1; }; };;
+            esac
+else
+  ensc_crypto_api=auto
+fi
+
+{ echo "$as_me:$LINENO: result: $ensc_crypto_api" >&5
+echo "${ECHO_T}$ensc_crypto_api" >&6; }
+
+
+
+case $ensc_crypto_api in
+(auto|beecrypt)
 if test x"$ensc_cv_c99_c99compiler" = xyes; then
        ensc_have_beecrypt=yes
 
 if test x"$ensc_cv_c99_c99compiler" = xyes; then
        ensc_have_beecrypt=yes
 
@@ -28138,22 +28384,23 @@ else
 fi
 
        fi
 fi
 
        fi
-
-       if test x"$ensc_have_beecrypt" != xyes; then
-               { echo "$as_me:$LINENO: WARNING:
-****
-**** 'beecrypt' could not be found;
-**** this will disable the build of 'vhashify'
-****" >&5
-echo "$as_me: WARNING:
-****
-**** 'beecrypt' could not be found;
-**** this will disable the build of 'vhashify'
-****" >&2;}
-       fi
 else
        ensc_have_beecrypt=no
 else
        ensc_have_beecrypt=no
-fi
+fi;;
+esac
+
+case $ensc_crypto_api in
+(auto)         if test x"$ensc_have_beecrypt"  = xyes; then
+                       { echo "$as_me:$LINENO: using beecrypt as crypto api" >&5
+echo "$as_me: using beecrypt as crypto api" >&6;}
+                       ensc_crypto_api=beecrypt
+               fi;;
+(beecrypt)     if test x"$ensc_have_beecrypt" != xyes; then
+                       { { echo "$as_me:$LINENO: error: beecrypt crypto api not found" >&5
+echo "$as_me: error: beecrypt crypto api not found" >&2;}
+   { (exit 1); exit 1; }; }
+               fi;;
+esac
 
  if test x"$ensc_have_beecrypt" = xyes; then
   ENSC_HAVE_BEECRYPT_TRUE=
 
  if test x"$ensc_have_beecrypt" = xyes; then
   ENSC_HAVE_BEECRYPT_TRUE=
 
 
 
 
 
 
+
+case $ensc_crypto_api in
+(nss)
+pkg_failed=no
+{ echo "$as_me:$LINENO: checking for NSS" >&5
+echo $ECHO_N "checking for NSS... $ECHO_C" >&6; }
+
+if test -n "$PKG_CONFIG"; then
+    if test -n "$NSS_CFLAGS"; then
+        pkg_cv_NSS_CFLAGS="$NSS_CFLAGS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"nss\"") >&5
+  ($PKG_CONFIG --exists --print-errors "nss") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_NSS_CFLAGS=`$PKG_CONFIG --cflags "nss" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+    fi
+else
+       pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+    if test -n "$NSS_LIBS"; then
+        pkg_cv_NSS_LIBS="$NSS_LIBS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"nss\"") >&5
+  ($PKG_CONFIG --exists --print-errors "nss") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_NSS_LIBS=`$PKG_CONFIG --libs "nss" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+    fi
+else
+       pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+               NSS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "nss"`
+        else
+               NSS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "nss"`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$NSS_PKG_ERRORS" >&5
+
+       { { echo "$as_me:$LINENO: error: Package requirements (nss) were not met:
+
+$NSS_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables NSS_CFLAGS
+and NSS_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&5
+echo "$as_me: error: Package requirements (nss) were not met:
+
+$NSS_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables NSS_CFLAGS
+and NSS_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&2;}
+   { (exit 1); exit 1; }; }
+elif test $pkg_failed = untried; then
+       { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables NSS_CFLAGS
+and NSS_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
+See \`config.log' for more details." >&5
+echo "$as_me: error: The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables NSS_CFLAGS
+and NSS_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+else
+       NSS_CFLAGS=$pkg_cv_NSS_CFLAGS
+       NSS_LIBS=$pkg_cv_NSS_LIBS
+        { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+       :
+fi;;
+(auto)
+pkg_failed=no
+{ echo "$as_me:$LINENO: checking for NSS" >&5
+echo $ECHO_N "checking for NSS... $ECHO_C" >&6; }
+
+if test -n "$PKG_CONFIG"; then
+    if test -n "$NSS_CFLAGS"; then
+        pkg_cv_NSS_CFLAGS="$NSS_CFLAGS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"nss\"") >&5
+  ($PKG_CONFIG --exists --print-errors "nss") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_NSS_CFLAGS=`$PKG_CONFIG --cflags "nss" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+    fi
+else
+       pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+    if test -n "$NSS_LIBS"; then
+        pkg_cv_NSS_LIBS="$NSS_LIBS"
+    else
+        if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"nss\"") >&5
+  ($PKG_CONFIG --exists --print-errors "nss") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_NSS_LIBS=`$PKG_CONFIG --libs "nss" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+    fi
+else
+       pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+               NSS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "nss"`
+        else
+               NSS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "nss"`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$NSS_PKG_ERRORS" >&5
+
+       { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+                { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+elif test $pkg_failed = untried; then
+       { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+else
+       NSS_CFLAGS=$pkg_cv_NSS_CFLAGS
+       NSS_LIBS=$pkg_cv_NSS_LIBS
+        { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+               { echo "$as_me:$LINENO: using NSS as crypto api" >&5
+echo "$as_me: using NSS as crypto api" >&6;}
+               ensc_crypto_api=nss
+fi;;
+esac
+
+
+case $ensc_crypto_api in
+(beecrypt)
+       ENSC_HAVE_CRYPTO=true
+       ENSC_CRYPTO_API=ENSC_CRYPTO_API_BEECRYPT
+       ENSC_CRYPTO_CFLAGS=
+       ENSC_CRYPTO_LIB=-lbeecrypt
+       ENSC_CAN_CRYPTO_WITH_DIETLIBC=false
+       ;;
+
+(nss)
+       ENSC_HAVE_CRYPTO=true
+       ENSC_CRYPTO_API=ENSC_CRYPTO_API_NSS
+       ENSC_CRYPTO_CFLAGS=$NSS_CFLAGS
+       ENSC_CRYPTO_LIB=$NSS_LIBS
+       ENSC_CAN_CRYPTO_WITH_DIETLIBC=false
+       ;;
+
+(none)
+       ENSC_HAVE_CRYPTO=false
+       ENSC_CRYPTO_API=ENSC_CRYPTO_API_NONE
+       ENSC_CRYPTO_CFLAGS=
+       ENSC_CRYPTO_LIB=
+       ENSC_CAN_CRYPTO_WITH_DIETLIBC=false
+
+       { echo "$as_me:$LINENO: WARNING: No crypto api found/select. This will disable the build of \`vhashify'" >&5
+echo "$as_me: WARNING: No crypto api found/select. This will disable the build of \`vhashify'" >&2;}
+       ;;
+
+(*)    { { echo "$as_me:$LINENO: error: internal error" >&5
+echo "$as_me: error: internal error" >&2;}
+   { (exit 1); exit 1; }; }
+esac
+
+ if $ENSC_HAVE_CRYPTO; then
+  ENSC_HAVE_CRYPTO_TRUE=
+  ENSC_HAVE_CRYPTO_FALSE='#'
+else
+  ENSC_HAVE_CRYPTO_TRUE='#'
+  ENSC_HAVE_CRYPTO_FALSE=
+fi
+
+ if $ENSC_CAN_CRYPTO_WITH_DIETLIBC; then
+  ENSC_CAN_CRYPTO_WITH_DIETLIBC_TRUE=
+  ENSC_CAN_CRYPTO_WITH_DIETLIBC_FALSE='#'
+else
+  ENSC_CAN_CRYPTO_WITH_DIETLIBC_TRUE='#'
+  ENSC_CAN_CRYPTO_WITH_DIETLIBC_FALSE=
+fi
+
+ENSC_CRYPTO_CFLAGS=$ENSC_CRYPTO_CFLAGS
+
+ENSC_CRYPTO_LIB=$ENSC_CRYPTO_LIB
+
+
+cat >>confdefs.h <<_ACEOF
+#define ENSC_CRYPTO_API $ENSC_CRYPTO_API
+_ACEOF
+
+
+
+
 { echo "$as_me:$LINENO: checking for host initscripts" >&5
 echo $ECHO_N "checking for host initscripts... $ECHO_C" >&6; }
 
 { echo "$as_me:$LINENO: checking for host initscripts" >&5
 echo $ECHO_N "checking for host initscripts... $ECHO_C" >&6; }
 
@@ -28497,6 +28997,20 @@ echo "$as_me: error: conditional \"ENSC_CAN_BEECRYPT_WITH_DIETLIBC\" was never d
 Usually this means the macro was only invoked conditionally." >&2;}
    { (exit 1); exit 1; }; }
 fi
 Usually this means the macro was only invoked conditionally." >&2;}
    { (exit 1); exit 1; }; }
 fi
+if test -z "${ENSC_HAVE_CRYPTO_TRUE}" && test -z "${ENSC_HAVE_CRYPTO_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"ENSC_HAVE_CRYPTO\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"ENSC_HAVE_CRYPTO\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${ENSC_CAN_CRYPTO_WITH_DIETLIBC_TRUE}" && test -z "${ENSC_CAN_CRYPTO_WITH_DIETLIBC_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"ENSC_CAN_CRYPTO_WITH_DIETLIBC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"ENSC_CAN_CRYPTO_WITH_DIETLIBC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
 if test -z "${HAVE_GENTOO_INIT_TRUE}" && test -z "${HAVE_GENTOO_INIT_FALSE}"; then
   { { echo "$as_me:$LINENO: error: conditional \"HAVE_GENTOO_INIT\" was never defined.
 Usually this means the macro was only invoked conditionally." >&5
 if test -z "${HAVE_GENTOO_INIT_TRUE}" && test -z "${HAVE_GENTOO_INIT_FALSE}"; then
   { { echo "$as_me:$LINENO: error: conditional \"HAVE_GENTOO_INIT\" was never defined.
 Usually this means the macro was only invoked conditionally." >&5
@@ -28527,6 +29041,7 @@ Features:
             ext2fs Source: $ensc_cv_test_ext2fs_header
     syscall(2) invocation: $with_syscall
       vserver(2) syscall#: $ensc_cv_value_syscall_vserver
             ext2fs Source: $ensc_cv_test_ext2fs_header
     syscall(2) invocation: $with_syscall
       vserver(2) syscall#: $ensc_cv_value_syscall_vserver
+               crypto api: $ensc_crypto_api
 
 Paths:
                    prefix: $prefix
 
 Paths:
                    prefix: $prefix
@@ -28838,7 +29353,7 @@ exec 6>&1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by util-vserver $as_me 0.30.214, which was
+This file was extended by util-vserver $as_me 0.30.215, which was
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -28891,7 +29406,7 @@ Report bugs to <bug-autoconf@gnu.org>."
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
-util-vserver config.status 0.30.214
+util-vserver config.status 0.30.215
 configured by $0, generated by GNU Autoconf 2.61,
   with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
 configured by $0, generated by GNU Autoconf 2.61,
   with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
@@ -29167,9 +29682,9 @@ CCDEPMODE!$CCDEPMODE$ac_delim
 am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim
 am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim
 LN_S!$LN_S$ac_delim
 am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim
 am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim
 LN_S!$LN_S$ac_delim
+PKG_CONFIG!$PKG_CONFIG$ac_delim
 ENSC_HAVE_CXX_COMPILER_TRUE!$ENSC_HAVE_CXX_COMPILER_TRUE$ac_delim
 ENSC_HAVE_CXX_COMPILER_FALSE!$ENSC_HAVE_CXX_COMPILER_FALSE$ac_delim
 ENSC_HAVE_CXX_COMPILER_TRUE!$ENSC_HAVE_CXX_COMPILER_TRUE$ac_delim
 ENSC_HAVE_CXX_COMPILER_FALSE!$ENSC_HAVE_CXX_COMPILER_FALSE$ac_delim
-ENSC_HAVE_C99_COMPILER_TRUE!$ENSC_HAVE_C99_COMPILER_TRUE$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -29211,6 +29726,7 @@ _ACEOF
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
+ENSC_HAVE_C99_COMPILER_TRUE!$ENSC_HAVE_C99_COMPILER_TRUE$ac_delim
 ENSC_HAVE_C99_COMPILER_FALSE!$ENSC_HAVE_C99_COMPILER_FALSE$ac_delim
 ENSC_PATHPROG_SED!$ENSC_PATHPROG_SED$ac_delim
 CAT!$CAT$ac_delim
 ENSC_HAVE_C99_COMPILER_FALSE!$ENSC_HAVE_C99_COMPILER_FALSE$ac_delim
 ENSC_PATHPROG_SED!$ENSC_PATHPROG_SED$ac_delim
 CAT!$CAT$ac_delim
@@ -29254,6 +29770,7 @@ CPIO!$CPIO$ac_delim
 RESTORE!$RESTORE$ac_delim
 RSYNC!$RSYNC$ac_delim
 STRACE!$STRACE$ac_delim
 RESTORE!$RESTORE$ac_delim
 RSYNC!$RSYNC$ac_delim
 STRACE!$STRACE$ac_delim
+FSCK!$FSCK$ac_delim
 DOXYGEN!$DOXYGEN$ac_delim
 XSLTP!$XSLTP$ac_delim
 XSLTPROC!$XSLTPROC$ac_delim
 DOXYGEN!$DOXYGEN$ac_delim
 XSLTP!$XSLTP$ac_delim
 XSLTPROC!$XSLTPROC$ac_delim
@@ -29294,15 +29811,64 @@ ENSC_HAVE_BEECRYPT_TRUE!$ENSC_HAVE_BEECRYPT_TRUE$ac_delim
 ENSC_HAVE_BEECRYPT_FALSE!$ENSC_HAVE_BEECRYPT_FALSE$ac_delim
 ENSC_CAN_BEECRYPT_WITH_DIETLIBC_TRUE!$ENSC_CAN_BEECRYPT_WITH_DIETLIBC_TRUE$ac_delim
 ENSC_CAN_BEECRYPT_WITH_DIETLIBC_FALSE!$ENSC_CAN_BEECRYPT_WITH_DIETLIBC_FALSE$ac_delim
 ENSC_HAVE_BEECRYPT_FALSE!$ENSC_HAVE_BEECRYPT_FALSE$ac_delim
 ENSC_CAN_BEECRYPT_WITH_DIETLIBC_TRUE!$ENSC_CAN_BEECRYPT_WITH_DIETLIBC_TRUE$ac_delim
 ENSC_CAN_BEECRYPT_WITH_DIETLIBC_FALSE!$ENSC_CAN_BEECRYPT_WITH_DIETLIBC_FALSE$ac_delim
+NSS_CFLAGS!$NSS_CFLAGS$ac_delim
+NSS_LIBS!$NSS_LIBS$ac_delim
+ENSC_HAVE_CRYPTO_TRUE!$ENSC_HAVE_CRYPTO_TRUE$ac_delim
+ENSC_HAVE_CRYPTO_FALSE!$ENSC_HAVE_CRYPTO_FALSE$ac_delim
+ENSC_CAN_CRYPTO_WITH_DIETLIBC_TRUE!$ENSC_CAN_CRYPTO_WITH_DIETLIBC_TRUE$ac_delim
+ENSC_CAN_CRYPTO_WITH_DIETLIBC_FALSE!$ENSC_CAN_CRYPTO_WITH_DIETLIBC_FALSE$ac_delim
+ENSC_CRYPTO_CFLAGS!$ENSC_CRYPTO_CFLAGS$ac_delim
+ENSC_CRYPTO_LIB!$ENSC_CRYPTO_LIB$ac_delim
 HAVE_GENTOO_INIT_TRUE!$HAVE_GENTOO_INIT_TRUE$ac_delim
 HAVE_GENTOO_INIT_FALSE!$HAVE_GENTOO_INIT_FALSE$ac_delim
 HAVE_SYSV_INIT_TRUE!$HAVE_SYSV_INIT_TRUE$ac_delim
 HAVE_SYSV_INIT_FALSE!$HAVE_SYSV_INIT_FALSE$ac_delim
 HAVE_GENTOO_INIT_TRUE!$HAVE_GENTOO_INIT_TRUE$ac_delim
 HAVE_GENTOO_INIT_FALSE!$HAVE_GENTOO_INIT_FALSE$ac_delim
 HAVE_SYSV_INIT_TRUE!$HAVE_SYSV_INIT_TRUE$ac_delim
 HAVE_SYSV_INIT_FALSE!$HAVE_SYSV_INIT_FALSE$ac_delim
+_ACEOF
+
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
+    break
+  elif $ac_last_try; then
+    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+   { (exit 1); exit 1; }; }
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+
+ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
+if test -n "$ac_eof"; then
+  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
+  ac_eof=`expr $ac_eof + 1`
+fi
+
+cat >>$CONFIG_STATUS <<_ACEOF
+cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+_ACEOF
+sed '
+s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
+s/^/s,@/; s/!/@,|#_!!_#|/
+:n
+t n
+s/'"$ac_delim"'$/,g/; t
+s/$/\\/; p
+N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
+' >>$CONFIG_STATUS <conf$$subs.sed
+rm -f conf$$subs.sed
+cat >>$CONFIG_STATUS <<_ACEOF
+CEOF$ac_eof
+_ACEOF
+
+
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+  cat >conf$$subs.sed <<_ACEOF
 LIBOBJS!$LIBOBJS$ac_delim
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
 LIBOBJS!$LIBOBJS$ac_delim
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 89; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 2; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
@@ -29320,7 +29886,7 @@ if test -n "$ac_eof"; then
 fi
 
 cat >>$CONFIG_STATUS <<_ACEOF
 fi
 
 cat >>$CONFIG_STATUS <<_ACEOF
-cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
+cat >"\$tmp/subs-3.sed" <<\CEOF$ac_eof
 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
 _ACEOF
 sed '
 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
 _ACEOF
 sed '
@@ -29589,7 +30155,7 @@ s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
 s&@INSTALL@&$ac_INSTALL&;t t
 s&@MKDIR_P@&$ac_MKDIR_P&;t t
 $ac_datarootdir_hack
 s&@INSTALL@&$ac_INSTALL&;t t
 s&@MKDIR_P@&$ac_MKDIR_P&;t t
 $ac_datarootdir_hack
-" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
+" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" | sed -f "$tmp/subs-3.sed" >$tmp/out
 
 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
 
 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
index b265532..ec01b2f 100644 (file)
@@ -1,4 +1,4 @@
-dnl $Id: configure.ac 2604 2007-09-02 20:03:17Z dhozac $
+dnl $Id: configure.ac 2706 2008-03-17 08:59:37Z dhozac $
 
 dnl Copyright (C) 2003,2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 dnl  
 
 dnl Copyright (C) 2003,2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 dnl  
@@ -24,7 +24,7 @@ dnl distribution terms that you use for the rest of that program.
 dnl  
 
 AC_PREREQ(2.57)
 dnl  
 
 AC_PREREQ(2.57)
-AC_INIT(util-vserver, 0.30.214, vserver@list.linux-vserver.org)
+AC_INIT(util-vserver, 0.30.215, vserver@list.linux-vserver.org)
 AC_CONFIG_SRCDIR([src/capchroot.c])
 AC_CONFIG_HEADER([config.h])
 
 AC_CONFIG_SRCDIR([src/capchroot.c])
 AC_CONFIG_HEADER([config.h])
 
@@ -42,6 +42,7 @@ AC_PROG_CC
 AC_PROG_INSTALL
 AC_PROG_LN_S
 AM_PROG_CC_C_O
 AC_PROG_INSTALL
 AC_PROG_LN_S
 AM_PROG_CC_C_O
+PKG_PROG_PKG_CONFIG
 ENSC_CXXCOMPILER
 ENSC_C99COMPILER
 
 ENSC_CXXCOMPILER
 ENSC_C99COMPILER
 
@@ -63,6 +64,7 @@ ENSC_PATHPROG(CPIO,      cpio,    [cpio])
 ENSC_PATHPROG(RESTORE,   restore, [restore])
 ENSC_PATHPROG(RSYNC,     rsync,   [rsync])
 ENSC_PATHPROG(STRACE,    strace,  [strace])
 ENSC_PATHPROG(RESTORE,   restore, [restore])
 ENSC_PATHPROG(RSYNC,     rsync,   [rsync])
 ENSC_PATHPROG(STRACE,    strace,  [strace])
+ENSC_PATHPROG(FSCK,      fsck)
 
 ENSC_PATHPROG(DOXYGEN,   doxygen,  [:])
 ENSC_PATHPROG(XSLTP,     xsltp,    [:])
 
 ENSC_PATHPROG(DOXYGEN,   doxygen,  [:])
 ENSC_PATHPROG(XSLTP,     xsltp,    [:])
@@ -308,10 +310,30 @@ if test x"$ensc_have_dietlibc" = xno; then
 fi
 
 
 fi
 
 
+dnl ########################
+dnl
+dnl {crypto stuff
+dnl
+AC_MSG_CHECKING([for used crypto API])
+AC_ARG_WITH(crypto-api,
+            AC_HELP_STRING([--with-crypto-api=API],
+                           [select crypto api to be used; possible values are `none', `nss', `beecrypt', `auto' (default:auto)]),
+           [case $withval in
+               (none|nss|beecrypt|auto)        ensc_crypto_api=$withval;;
+               (*)     AC_MSG_ERROR([invalid initscripts value, only gentoo and sysv are supported]);;
+            esac],[ensc_crypto_api=auto])
+AC_MSG_RESULT($ensc_crypto_api)
+
+
+dnl Now, check for matching crypto api. When selected 'auto', the
+dnl first matching one wins
+
 dnl ########################
 dnl
 dnl {check for beecrypt
 dnl
 dnl ########################
 dnl
 dnl {check for beecrypt
 dnl
+case $ensc_crypto_api in
+(auto|beecrypt)
 if test x"$ensc_cv_c99_c99compiler" = xyes; then
        ensc_have_beecrypt=yes
 
 if test x"$ensc_cv_c99_c99compiler" = xyes; then
        ensc_have_beecrypt=yes
 
@@ -324,17 +346,20 @@ if test x"$ensc_cv_c99_c99compiler" = xyes; then
                AC_CHECK_LIB(beecrypt, hashFunctionContextInit, [ : ],
                             [ ensc_have_beecrypt=no ])
        fi
                AC_CHECK_LIB(beecrypt, hashFunctionContextInit, [ : ],
                             [ ensc_have_beecrypt=no ])
        fi
-
-       if test x"$ensc_have_beecrypt" != xyes; then
-               AC_MSG_WARN([
-****
-**** 'beecrypt' could not be found;
-**** this will disable the build of 'vhashify'
-****])
-       fi
 else
        ensc_have_beecrypt=no
 else
        ensc_have_beecrypt=no
-fi
+fi;;
+esac
+
+case $ensc_crypto_api in
+(auto)         if test x"$ensc_have_beecrypt"  = xyes; then
+                       AC_MSG_NOTICE([using beecrypt as crypto api])
+                       ensc_crypto_api=beecrypt
+               fi;;
+(beecrypt)     if test x"$ensc_have_beecrypt" != xyes; then
+                       AC_MSG_ERROR([beecrypt crypto api not found])
+               fi;;
+esac
 
 AM_CONDITIONAL(ENSC_HAVE_BEECRYPT, test x"$ensc_have_beecrypt" = xyes)
 AM_CONDITIONAL(ENSC_CAN_BEECRYPT_WITH_DIETLIBC, false)
 
 AM_CONDITIONAL(ENSC_HAVE_BEECRYPT, test x"$ensc_have_beecrypt" = xyes)
 AM_CONDITIONAL(ENSC_CAN_BEECRYPT_WITH_DIETLIBC, false)
@@ -344,6 +369,66 @@ dnl
 dnl ########################
 
 
 dnl ########################
 
 
+dnl ########################
+dnl
+dnl {check for nss
+dnl
+
+case $ensc_crypto_api in
+(nss)  PKG_CHECK_MODULES(NSS, nss);;
+(auto) PKG_CHECK_MODULES(NSS, nss, [
+               AC_MSG_NOTICE([using NSS as crypto api])
+               ensc_crypto_api=nss],
+                AC_MSG_RESULT(no));;
+esac
+
+dnl
+dnl nss stuff ends here}
+dnl
+dnl ########################
+
+case $ensc_crypto_api in
+(beecrypt)
+       ENSC_HAVE_CRYPTO=true
+       ENSC_CRYPTO_API=ENSC_CRYPTO_API_BEECRYPT
+       ENSC_CRYPTO_CFLAGS=
+       ENSC_CRYPTO_LIB=-lbeecrypt
+       ENSC_CAN_CRYPTO_WITH_DIETLIBC=false
+       ;;
+
+(nss)
+       ENSC_HAVE_CRYPTO=true
+       ENSC_CRYPTO_API=ENSC_CRYPTO_API_NSS
+       ENSC_CRYPTO_CFLAGS=$NSS_CFLAGS
+       ENSC_CRYPTO_LIB=$NSS_LIBS
+       ENSC_CAN_CRYPTO_WITH_DIETLIBC=false
+       ;;
+
+(none)
+       ENSC_HAVE_CRYPTO=false
+       ENSC_CRYPTO_API=ENSC_CRYPTO_API_NONE
+       ENSC_CRYPTO_CFLAGS=
+       ENSC_CRYPTO_LIB=
+       ENSC_CAN_CRYPTO_WITH_DIETLIBC=false
+
+       AC_MSG_WARN([No crypto api found/select. This will disable the build of `vhashify'])
+       ;;
+
+(*)    AC_MSG_ERROR([internal error])
+esac
+
+AM_CONDITIONAL(ENSC_HAVE_CRYPTO, $ENSC_HAVE_CRYPTO)
+AM_CONDITIONAL(ENSC_CAN_CRYPTO_WITH_DIETLIBC, $ENSC_CAN_CRYPTO_WITH_DIETLIBC)
+AC_SUBST(ENSC_CRYPTO_CFLAGS, $ENSC_CRYPTO_CFLAGS)
+AC_SUBST(ENSC_CRYPTO_LIB,    $ENSC_CRYPTO_LIB)
+AC_DEFINE_UNQUOTED(ENSC_CRYPTO_API, $ENSC_CRYPTO_API, [Used crypto API])
+
+dnl
+dnl crypto stuff ends here}
+dnl
+dnl ########################
+
+
 dnl Check what distro this is, use Gentoo initscripts if appropriate
 AC_MSG_CHECKING([for host initscripts])
 AC_ARG_WITH(initscripts, AC_HELP_STRING([--with-initscripts=TYPE], [force host initscripts; valid values are 'gentoo' and 'sysv' (default: guess)]), [
 dnl Check what distro this is, use Gentoo initscripts if appropriate
 AC_MSG_CHECKING([for host initscripts])
 AC_ARG_WITH(initscripts, AC_HELP_STRING([--with-initscripts=TYPE], [force host initscripts; valid values are 'gentoo' and 'sysv' (default: guess)]), [
@@ -406,6 +491,7 @@ Features:
             ext2fs Source: $ensc_cv_test_ext2fs_header
     syscall(2) invocation: $with_syscall
       vserver(2) syscall#: $ensc_cv_value_syscall_vserver
             ext2fs Source: $ensc_cv_test_ext2fs_header
     syscall(2) invocation: $with_syscall
       vserver(2) syscall#: $ensc_cv_value_syscall_vserver
+               crypto api: $ensc_crypto_api
    
 Paths:
                    prefix: $prefix
    
 Paths:
                    prefix: $prefix
index e755bb4..01f3eac 100644 (file)
@@ -1,4 +1,4 @@
-## $Id: Makefile-files 2556 2007-07-07 15:24:07Z ensc $  -*- makefile -*-
+## $Id: Makefile-files 2609 2007-09-06 07:53:46Z ensc $  -*- makefile -*-
 
 ## Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 ##  
 
 ## Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 ##  
@@ -36,6 +36,7 @@ EXTRA_DIST +=                         $(contrib_subst_SRCS) \
                                        contrib/yum-3.0.5-chroot.patch \
                                        contrib/yum-3.2.0-chroot.patch \
                                        contrib/yum-3.2.1-chroot.patch \
                                        contrib/yum-3.0.5-chroot.patch \
                                        contrib/yum-3.2.0-chroot.patch \
                                        contrib/yum-3.2.1-chroot.patch \
+                                       contrib/yum-3.2.4-chroot.patch \
                                        contrib/make-manifest
 
 contrib/manifest.dat:                  contrib/.manifest.dat.pathsubst.stamp
                                        contrib/make-manifest
 
 contrib/manifest.dat:                  contrib/.manifest.dat.pathsubst.stamp
index ab8e256..cf49623 100644 (file)
@@ -69,6 +69,7 @@ base   @PKGLIBDIR@/save_ctxinfo
 base   @PKGLIBDIR@/secure-mount
 base   @PKGLIBDIR@/sigexec
 base   @PKGLIBDIR@/start-vservers
 base   @PKGLIBDIR@/secure-mount
 base   @PKGLIBDIR@/sigexec
 base   @PKGLIBDIR@/start-vservers
+base   @PKGLIBDIR@/tunctl
 build  @PKGLIBDIR@/vapt-get-worker
 build  @PKGLIBDIR@/vyum-worker
 build  @PKGLIBDIR@/vpkg
 build  @PKGLIBDIR@/vapt-get-worker
 build  @PKGLIBDIR@/vyum-worker
 build  @PKGLIBDIR@/vpkg
@@ -110,6 +111,8 @@ build  @SBINDIR@/vemerge
 build  @SBINDIR@/vesync
 core   @SBINDIR@/vkill
 core   @SBINDIR@/vlimit
 build  @SBINDIR@/vesync
 core   @SBINDIR@/vkill
 core   @SBINDIR@/vlimit
+core   @SBINDIR@/vmemctrl
+core   @SBINDIR@/vmount
 core   @SBINDIR@/vnamespace
 base   @SBINDIR@/vps
 base   @SBINDIR@/vpstree
 core   @SBINDIR@/vnamespace
 base   @SBINDIR@/vps
 base   @SBINDIR@/vpstree
@@ -121,6 +124,7 @@ legacy @SBINDIR@/vserver-copy
 core   @SBINDIR@/vserver-info
 base   @SBINDIR@/vserver-stat
 base   @SBINDIR@/vsomething
 core   @SBINDIR@/vserver-info
 base   @SBINDIR@/vserver-stat
 base   @SBINDIR@/vsomething
+core   @SBINDIR@/vspace
 core   @SBINDIR@/vtag
 base   @SBINDIR@/vtop
 core   @SBINDIR@/vuname
 core   @SBINDIR@/vtag
 base   @SBINDIR@/vtop
 core   @SBINDIR@/vuname
@@ -134,11 +138,12 @@ core   @MANDIR@/*/reducecap*
 legacy @MANDIR@/*/distrib-info*
 legacy @MANDIR@/*/vserver-copy*
 legacy @MANDIR@/*/rebootmgr*
 legacy @MANDIR@/*/distrib-info*
 legacy @MANDIR@/*/vserver-copy*
 legacy @MANDIR@/*/rebootmgr*
-legacy @MANDIR@/*/vps.*
+base   @MANDIR@/*/vps.*
 base   @MANDIR@/*/vpstree.*
 base   @MANDIR@/*/vserver-stat*
 base   @MANDIR@/*/vserver.*
 base   @MANDIR@/*/vtop*
 base   @MANDIR@/*/vpstree.*
 base   @MANDIR@/*/vserver-stat*
 base   @MANDIR@/*/vserver.*
 base   @MANDIR@/*/vtop*
+build  @MANDIR@/*/vserver-build*
 legacy @CONFIG@ @INITRDDIR@/v_gated
 legacy @CONFIG@ @INITRDDIR@/v_httpd
 legacy @CONFIG@ @INITRDDIR@/v_named
 legacy @CONFIG@ @INITRDDIR@/v_gated
 legacy @CONFIG@ @INITRDDIR@/v_httpd
 legacy @CONFIG@ @INITRDDIR@/v_named
diff --git a/contrib/yum-3.2.4-chroot.patch b/contrib/yum-3.2.4-chroot.patch
new file mode 100644 (file)
index 0000000..fd6c023
--- /dev/null
@@ -0,0 +1,158 @@
+--- yum-3.2.4/yum/__init__.py.chroot
++++ yum-3.2.4/yum/__init__.py
+@@ -214,8 +214,7 @@ class YumBase(depsolve.Depsolve):
+         repo_config_age = self.conf.config_file_age
+         
+         for reposdir in self.conf.reposdir:
+-            if os.path.exists(self.conf.installroot+'/'+reposdir):
+-                reposdir = self.conf.installroot + '/' + reposdir
++            reposdir  = self.conf.getRootedPath(reposdir)
+             if os.path.isdir(reposdir):
+                 for repofn in glob.glob('%s/*.repo' % reposdir):
+@@ -664,11 +663,9 @@ class YumBase(depsolve.Depsolve):
+         # if we're not root then we don't lock - just return nicely
+         if self.conf.uid != 0:
+             return
+-            
+-        root = self.conf.installroot
+-        lockfile = root + '/' + lockfile # lock in the chroot
+-        lockfile = os.path.normpath(lockfile) # get rid of silly preceding extra /
+-        
++
++        lockfile = self.conf.lockfile
++
+         mypid=str(os.getpid())    
+         while not self._lock(lockfile, mypid, 0644):
+             fd = open(lockfile, 'r')
+@@ -700,9 +697,8 @@ class YumBase(depsolve.Depsolve):
+         if self.conf.uid != 0:
+             return
+         
+-        root = self.conf.installroot
+-        lockfile = root + '/' + lockfile # lock in the chroot
+-        
++        lockfile=self.conf.lockfile
++
+         self._unlock(lockfile)
+         
+     def _lock(self, filename, contents='', mode=0777):
+--- yum-3.2.4/yum/config.py.chroot
++++ yum-3.2.4/yum/config.py
+@@ -469,6 +469,26 @@ class StartupConf(BaseConfig):
+     pluginpath = ListOption(['/usr/share/yum-plugins', '/usr/lib/yum-plugins'])
+     pluginconfpath = ListOption(['/etc/yum/pluginconf.d'])
++    def getRootedPath(self, path, enforce_default=False, defaults_to_host=False):
++        instroot = getattr(self, 'installroot', None)
++        if instroot==None:
++            return path
++
++        if   path.startswith('hostfs://'):   res = path[9:]
++        elif path.startswith('chrootfs://'): res = instroot + '/' + path[11:]
++        else:
++            tmp = instroot + '/' + path
++
++            if enforce_default:
++                if defaults_to_host:    res = path
++                else:                   res = tmp
++            else:
++                if os.path.exists(tmp): res = tmp
++                elif defaults_to_host:  res = path
++                else:                   res = tmp
++
++        return res
++
+ class YumConf(StartupConf):
+     '''
+     Configuration option definitions for yum.conf\'s [main] section.
+@@ -482,6 +502,7 @@ class YumConf(StartupConf):
+     persistdir = Option('/var/lib/yum')
+     keepcache = BoolOption(True)
+     logfile = Option('/var/log/yum.log')
++    lockfile = Option('/var/run/yum.pid')
+     reposdir = ListOption(['/etc/yum/repos.d', '/etc/yum.repos.d'])
+     syslog_ident = Option()
+     syslog_facility = Option('LOG_DAEMON')
+@@ -615,9 +636,9 @@ def readMainConfig(startupconf):
+     yumconf.populate(startupconf._parser, 'main')
+     # Apply the installroot to directory options
+-    for option in ('cachedir', 'logfile', 'persistdir'):
++    for option in ('cachedir', 'logfile', 'persistdir', 'lockfile'):
+         path = getattr(yumconf, option)
+-        setattr(yumconf, option, yumconf.installroot + path)
++        setattr(yumconf, option, yumconf.getRootedPath(path))
+     
+     # Add in some extra attributes which aren't actually configuration values 
+     yumconf.yumvar = yumvars
+--- yum-3.2.4/docs/yum.conf.5.chroot
++++ yum-3.2.4/docs/yum.conf.5
+@@ -23,8 +23,10 @@ The [main] section must exist for yum to
+ following options:
+ .IP \fBcachedir\fR
+-Directory where yum should store its cache and db files. The default is
+-`/var/cache/yum'.
++Directory where yum should store its cache and db files. The default
++is `/var/cache/yum'. Unless the prefixes `hostfs://' or `chrootfs://'
++are used, some magic will be applied to determine the real path in
++combination with `--installroot'.
+ .IP \fBpersistdir\fR
+ Directory where yum should store information that should persist over multiple
+@@ -44,6 +46,10 @@ documented in \fB[repository] options\fR
+ repositories defined in /etc/yum/yum.conf to form the complete set of
+ repositories that yum will use.
++Unless the prefixes `hostfs://' or `chrootfs://' are used, some magic
++will be applied to determine the real path in combination with
++`--installroot'.
++
+ .IP \fBdebuglevel\fR
+ Debug message output level. Practical range is 0\-10. Default is `2'.
+@@ -51,7 +57,10 @@ Debug message output level. Practical ra
+ Error message output level. Practical range is 0\-10. Default is `2'.
+ .IP \fBlogfile\fR
+-Full directory and file name for where yum should write its log file.
++Full directory and file name for where yum should write its log
++file. Unless the prefixes `hostfs://' or `chrootfs://' are used,
++some magic will be applied to determine the real path in combination
++with `--installroot'.
+ .IP \fBgpgcheck\fR
+ Either `1' or `0'. This tells yum whether or not it should perform a GPG
+--- yum-3.2.4/cli.py.chroot
++++ yum-3.2.4/cli.py
+@@ -1204,13 +1204,14 @@ class YumOptionParser(OptionParser):
+     def getRoot(self,opts):
+         # If the conf file is inside the  installroot - use that.
+         # otherwise look for it in the normal root
++        if opts.conffile==None:
++            opts.conffile = '/etc/yum/yum.conf'
++            if opts.installroot:
++                if os.access(opts.installroot+opts.conffile, os.R_OK):
++                    opts.conffile = opts.installroot+opts.conffile
++                elif os.access(opts.installroot+'/etc/yum.conf', os.R_OK):
++                    opts.conffile = opts.installroot+'/etc/yum.conf'
+         if opts.installroot:
+-            if os.access(opts.installroot+'/'+opts.conffile, os.R_OK):
+-                opts.conffile = opts.installroot+'/'+opts.conffile
+-            elif opts.conffile == '/etc/yum/yum.conf':
+-                # check if /installroot/etc/yum.conf exists.
+-                if os.access(opts.installroot+'/etc/yum.conf', os.R_OK):
+-                    opts.conffile = opts.installroot+'/etc/yum.conf'         
+             root=opts.installroot
+         else:
+             root = '/'
+@@ -1231,7 +1232,7 @@ class YumOptionParser(OptionParser):
+                 help="be tolerant of errors")
+         self.add_option("-C", dest="cacheonly", action="store_true",
+                 help="run entirely from cache, don't update cache")
+-        self.add_option("-c", dest="conffile", default='/etc/yum/yum.conf',
++        self.add_option("-c", dest="conffile", default=None,
+                 help="config file location", metavar=' [config file]')
+         self.add_option("-R", dest="sleeptime", type='int', default=None,
+                 help="maximum command wait time", metavar=' [minutes]')
index c0dbda7..dae0145 100644 (file)
@@ -331,9 +331,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir
              exit 1;; \
          esac; \
        done; \
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  distrib/Makefile'; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits  distrib/Makefile'; \
        cd $(top_srcdir) && \
        cd $(top_srcdir) && \
-         $(AUTOMAKE) --gnu  distrib/Makefile
+         $(AUTOMAKE) --gnits  distrib/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
@@ -377,6 +377,22 @@ uninstall-nobase_distribSCRIPTS:
          rm -f "$(DESTDIR)$(distribdir)/$$f"; \
        done
 
          rm -f "$(DESTDIR)$(distribdir)/$$f"; \
        done
 
+installcheck-nobase_distribSCRIPTS: $(nobase_distrib_SCRIPTS)
+       bad=0; pid=$$$$; list="$(nobase_distrib_SCRIPTS)"; for p in $$list; do \
+         case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \
+          *" $$p "* | *" $(srcdir)/$$p "*) continue;; \
+         esac; \
+         f=`echo "$$p" | sed 's,^.*/,,;$(transform)'`; \
+         f=`echo "$$p" | sed 's|[^/]*$$||'`"$$f"; \
+         for opt in --help --version; do \
+           if "$(DESTDIR)$(distribdir)/$$f" $$opt >c$${pid}_.out \
+                2>c$${pid}_.err </dev/null \
+                && test -n "`cat c$${pid}_.out`" \
+                && test -z "`cat c$${pid}_.err`"; then :; \
+           else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \
+         done; \
+       done; rm -f c$${pid}_.???; exit $$bad
+
 mostlyclean-libtool:
        -rm -f *.lo
 
 mostlyclean-libtool:
        -rm -f *.lo
 
@@ -540,7 +556,7 @@ install-pdf: install-pdf-am
 
 install-ps: install-ps-am
 
 
 install-ps: install-ps-am
 
-installcheck-am:
+installcheck-am: installcheck-nobase_distribSCRIPTS
 
 maintainer-clean: maintainer-clean-am
        -rm -f Makefile
 
 maintainer-clean: maintainer-clean-am
        -rm -f Makefile
@@ -573,11 +589,12 @@ uninstall-am: uninstall-defaultsDATA uninstall-nobase_confdistribDATA \
        install-nobase_confdistribDATA install-nobase_distribDATA \
        install-nobase_distribSCRIPTS install-pdf install-pdf-am \
        install-ps install-ps-am install-strip installcheck \
        install-nobase_confdistribDATA install-nobase_distribDATA \
        install-nobase_distribSCRIPTS install-pdf install-pdf-am \
        install-ps install-ps-am install-strip installcheck \
-       installcheck-am installdirs maintainer-clean \
-       maintainer-clean-generic mostlyclean mostlyclean-generic \
-       mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
-       uninstall-defaultsDATA uninstall-nobase_confdistribDATA \
-       uninstall-nobase_distribDATA uninstall-nobase_distribSCRIPTS
+       installcheck-am installcheck-nobase_distribSCRIPTS installdirs \
+       maintainer-clean maintainer-clean-generic mostlyclean \
+       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+       uninstall uninstall-am uninstall-defaultsDATA \
+       uninstall-nobase_confdistribDATA uninstall-nobase_distribDATA \
+       uninstall-nobase_distribSCRIPTS
 
 
 AM_INSTALLCHECK_STD_OPTIONS_EXEMPT \
 
 
 AM_INSTALLCHECK_STD_OPTIONS_EXEMPT \
index af89200..a61ab1b 100755 (executable)
@@ -51,6 +51,11 @@ $_CHROOT_SH mkdir /usr/portage 2>/dev/null || :
 $_CHROOT_SH mkdir /usr/portage/distfiles 2>/dev/null || :
 
 
 $_CHROOT_SH mkdir /usr/portage/distfiles 2>/dev/null || :
 
 
+# check if we have openrc
+have_openrc=0
+$_CHROOT_SH testfile /lib/rc/bin/is_older_than && have_openrc=1
+
+
 # gentoo initstyle magic
 initstyle=sysv
 test -e "$cfgdir"/apps/init/style && initstyle=$(<"$cfgdir"/apps/init/style)
 # gentoo initstyle magic
 initstyle=sysv
 test -e "$cfgdir"/apps/init/style && initstyle=$(<"$cfgdir"/apps/init/style)
@@ -59,8 +64,8 @@ if test "$initstyle" == "gentoo"; then
        echo ">>> Installing special init-style magic ... "
 
        $_CAT "$__DISTRIBDIR"/gentoo/init-vserver.sh | \
        echo ">>> Installing special init-style magic ... "
 
        $_CAT "$__DISTRIBDIR"/gentoo/init-vserver.sh | \
-       $_CHROOT_SH truncate   /lib/rcscripts/sh/init-vserver.sh
-       $_CHROOT_SH chmod 0755 /lib/rcscripts/sh/init-vserver.sh
+       $_CHROOT_SH truncate   /lib/rc/sh/init-vserver.sh
+       $_CHROOT_SH chmod 0755 /lib/rc/sh/init-vserver.sh
 
        $_CAT "$__DISTRIBDIR"/gentoo/reboot.sh | \
        $_CHROOT_SH truncate   /etc/init.d/reboot.sh
 
        $_CAT "$__DISTRIBDIR"/gentoo/reboot.sh | \
        $_CHROOT_SH truncate   /etc/init.d/reboot.sh
@@ -78,23 +83,29 @@ if test "$initstyle" == "gentoo"; then
        echo "!!! Consult the Gentoo Handbook on how to chroot and install"
        echo "!!! packages into the guest environment."
        echo "!!!"
        echo "!!! Consult the Gentoo Handbook on how to chroot and install"
        echo "!!! packages into the guest environment."
        echo "!!!"
+else
+       # fix gettys in inittab
+       if $_CHROOT_SH testfile /etc/inittab; then
+               echo ">>> Fixing inittab ... "
+               chrootsed /etc/inittab \
+                       -e 's/\(^[^#].*getty.*$\)/#\1/'
+       fi
 fi
 
 fi
 
-
 # unneeded runlevel scripts
 # unneeded runlevel scripts
-echo ">>> Fixing default runlevel scripts ... "
-$_CHROOT_SH rm /etc/runlevels/boot/{clock,consolefont,keymaps,modules,net.lo} 2>/dev/null || :
-$_CHROOT_SH rm /etc/runlevels/default/{hdparm,netmount} 2>/dev/null || :
-
+if test $have_openrc -ne 1; then
+       echo ">>> Fixing default runlevel scripts ... "
+       $_CHROOT_SH rm /etc/runlevels/boot/{clock,consolefont,keymaps,modules,net.lo} 2>/dev/null || :
+       $_CHROOT_SH rm /etc/runlevels/default/{hdparm,netmount} 2>/dev/null || :
+fi
 
 # setting hostname
 if test -r "$cfgdir"/uts/nodename && $_CHROOT_SH testfile /etc/conf.d/hostname; then
        echo ">>> Setting hostname ... "
        chrootsed /etc/conf.d/hostname \
 
 # setting hostname
 if test -r "$cfgdir"/uts/nodename && $_CHROOT_SH testfile /etc/conf.d/hostname; then
        echo ">>> Setting hostname ... "
        chrootsed /etc/conf.d/hostname \
-               -e "s:HOSTNAME=\"\(.*\)\":HOSTNAME=\"$(< "$cfgdir"/uts/nodename)\":"
+               -e "s:\(HOSTNAME\)=\"\(.*\)\":\1=\"$(< "$cfgdir"/uts/nodename)\":i"
 fi
 
 fi
 
-
 # fix syslog-ng.conf
 if $_CHROOT_SH testfile /etc/syslog-ng/syslog-ng.conf; then
        echo ">>> Fixing syslog-ng.conf ... "
 # fix syslog-ng.conf
 if $_CHROOT_SH testfile /etc/syslog-ng/syslog-ng.conf; then
        echo ">>> Fixing syslog-ng.conf ... "
@@ -103,27 +114,21 @@ if $_CHROOT_SH testfile /etc/syslog-ng/syslog-ng.conf; then
                -e 's:\(.*console_all.*\):#\1:g'
 fi
 
                -e 's:\(.*console_all.*\):#\1:g'
 fi
 
-
-# fix gettys in inittab
-if $_CHROOT_SH testfile /etc/inittab; then
-       echo ">>> Fixing inittab ... "
-       chrootsed /etc/inittab \
-               -e 's/\(^[^#].*getty.*$\)/#\1/'
-fi
-
-
 # fix fstab for checkfs/localmount in baselayout-2
 # (does not affect any previous versions)
 # fix fstab for checkfs/localmount in baselayout-2
 # (does not affect any previous versions)
-echo ">>> Fixing fstab ... "
-echo "/dev/hdv1 / ufs defaults 0 0" | $_CHROOT_SH truncate /etc/fstab
-
+if test $have_openrc -ne 1; then
+       echo ">>> Fixing fstab ... "
+       echo "/dev/hdv1 / ufs defaults 0 0" | $_CHROOT_SH truncate /etc/fstab
+fi
 
 # always satisfy net dependency in baselayout-2
 # (does not affect any previous versions)
 
 # always satisfy net dependency in baselayout-2
 # (does not affect any previous versions)
-echo ">>> Providing dummy net dependency ... "
-$_CAT "$__DISTRIBDIR"/gentoo/net.vserver | \
-$_CHROOT_SH truncate /etc/init.d/net.vserver
-$_CHROOT_SH chmod 0755 /etc/init.d/net.vserver
-$_CHROOT_SH link /etc/init.d/net.vserver /etc/runlevels/boot/net.vserver
+if test $have_openrc -ne 1; then
+       echo ">>> Providing dummy net dependency ... "
+       $_CAT "$__DISTRIBDIR"/gentoo/net.vserver | \
+       $_CHROOT_SH truncate /etc/init.d/net.vserver
+       $_CHROOT_SH chmod 0755 /etc/init.d/net.vserver
+       $_CHROOT_SH link /etc/init.d/net.vserver /etc/runlevels/boot/net.vserver
+fi
 
 popd &>/dev/null
 
 popd &>/dev/null
index 793cd14..7e2f605 100644 (file)
@@ -566,6 +566,13 @@ The master yum configuration file. It supports the @YUMETCDIR@,
 The configuration directory for the vserver vserver-name.
     </div>
         <ul>
 The configuration directory for the vserver vserver-name.
     </div>
         <ul>
+          <li>
+            <span class="file" title="/etc/vservers/$vserver-name/badness">badness</span>
+            <br />
+            <div class="description">
+Contains the bias to be applied to processes in this guest when the OOM-killer strikes.
+      </div>
+          </li>
           <li id="bcapabilities">
             <span class="list" title="/etc/vservers/$vserver-name/bcapabilities">bcapabilities</span>
             <br />
           <li id="bcapabilities">
             <span class="list" title="/etc/vservers/$vserver-name/bcapabilities">bcapabilities</span>
             <br />
@@ -899,6 +906,52 @@ from/to at startup via initscript.
                   </li>
                 </ul>
               </li>
                   </li>
                 </ul>
               </li>
+              <li>
+                <span class="directory">/etc/vservers/<span class="symbolic">vserver-name</span>/<span class="">apps</span>/<span class="">vdevmap</span></span>
+                <br />
+                <ul>
+                  <li>
+                    <span class="directory">/etc/vservers/<span class="symbolic">vserver-name</span>/<span class="">apps</span>/<span class="">vdevmap</span>/<span class="sybmolic">x</span></span>
+                    <br />
+                    <div class="description">'x' is an arbitrary name, replace it with e.g. device names</div>
+                    <ul>
+                      <li>
+                        <span class="boolean" title="/etc/vservers/$vserver-name/apps/vdevmap/x/create">create</span>
+                        <br />
+                        <div class="description">When this file exists, the device can be created (if the guest has <a class="optionref" href="#bcapabilities">CAP_MKNOD</a>)</div>
+                      </li>
+                      <li>
+                        <span class="file" title="/etc/vservers/$vserver-name/apps/vdevmap/x/device">device</span>
+                        <br />
+                        <div class="description">Contains the name of a device node</div>
+                      </li>
+                      <li>
+                        <span class="file" title="/etc/vservers/$vserver-name/apps/vdevmap/x/flags">flags</span>
+                        <br />
+                        <div class="description">This file will let you specify unimplemented flags manually</div>
+                      </li>
+                      <li>
+                        <span class="boolean" title="/etc/vservers/$vserver-name/apps/vdevmap/x/open">open</span>
+                        <br />
+                        <div class="description">When this file exists, the device can be opened</div>
+                      </li>
+                      <li id="guest-vdevmap-remap">
+                        <span class="boolean" title="/etc/vservers/$vserver-name/apps/vdevmap/x/remap">remap</span>
+                        <br />
+                        <div class="description">
+When this file exists, <a class="optionref" href="#guest-vdevmap-target">target</a> will
+have to exist as well and opening the device will in fact open the target device
+            </div>
+                      </li>
+                      <li id="guest-vdevmap-target">
+                        <span class="file" title="/etc/vservers/$vserver-name/apps/vdevmap/x/target">target</span>
+                        <br />
+                        <div class="description">Contains the device node of the target node to open instead of the device when <a class="optionref" href="#guest-vdevmap-remap">remap</a> is set</div>
+                      </li>
+                    </ul>
+                  </li>
+                </ul>
+              </li>
               <li>
                 <span class="directory">/etc/vservers/<span class="symbolic">vserver-name</span>/<span class="">apps</span>/<span class="">vshelper</span></span>
                 <br />
               <li>
                 <span class="directory">/etc/vservers/<span class="symbolic">vserver-name</span>/<span class="">apps</span>/<span class="">vshelper</span></span>
                 <br />
@@ -1051,6 +1104,9 @@ filesystem.
           <li>
             <span class="directory">/etc/vservers/<span class="symbolic">vserver-name</span>/<span class="">cpuset</span></span>
             <br />
           <li>
             <span class="directory">/etc/vservers/<span class="symbolic">vserver-name</span>/<span class="">cpuset</span></span>
             <br />
+            <div class="description">
+Puts the guest in a cpuset. Required entries are name, cpus and mems.
+      </div>
             <ul>
               <li>
                 <span class="file" title="/etc/vservers/$vserver-name/cpuset/cpu_exclusive">cpu_exclusive</span>
             <ul>
               <li>
                 <span class="file" title="/etc/vservers/$vserver-name/cpuset/cpu_exclusive">cpu_exclusive</span>
@@ -1087,28 +1143,32 @@ filesystem.
           <li>
             <span class="directory">/etc/vservers/<span class="symbolic">vserver-name</span>/<span class="">dlimits</span></span>
             <br />
           <li>
             <span class="directory">/etc/vservers/<span class="symbolic">vserver-name</span>/<span class="">dlimits</span></span>
             <br />
+            <div class="description">
+Note that all entries are required for the disk limit to be applied.
+      </div>
             <ul>
               <li>
             <ul>
               <li>
-                <span class="directory">/etc/vservers/<span class="symbolic">vserver-name</span>/<span class="">dlimits</span>/<span class="symbolic">dlimit</span></span>
+                <span class="directory">/etc/vservers/<span class="symbolic">vserver-name</span>/<span class="">dlimits</span>/<span class="symbolic">x</span></span>
                 <br />
                 <br />
+                <div class="description">'x' is an arbitrary name, replace it with e.g. integers</div>
                 <ul>
                   <li>
                 <ul>
                   <li>
-                    <span class="file" title="/etc/vservers/$vserver-name/dlimits/$dlimit/directory">directory</span>
+                    <span class="file" title="/etc/vservers/$vserver-name/dlimits/$x/directory">directory</span>
                     <br />
                     <div class="description">The directory to which the limit should be applied</div>
                   </li>
                   <li>
                     <br />
                     <div class="description">The directory to which the limit should be applied</div>
                   </li>
                   <li>
-                    <span class="file" title="/etc/vservers/$vserver-name/dlimits/$dlimit/inodes_total">inodes_total</span>
+                    <span class="file" title="/etc/vservers/$vserver-name/dlimits/$x/inodes_total">inodes_total</span>
                     <br />
                     <div class="description">The amount of inodes this vserver should be limited to</div>
                   </li>
                   <li>
                     <br />
                     <div class="description">The amount of inodes this vserver should be limited to</div>
                   </li>
                   <li>
-                    <span class="file" title="/etc/vservers/$vserver-name/dlimits/$dlimit/reserved">reserved</span>
+                    <span class="file" title="/etc/vservers/$vserver-name/dlimits/$x/reserved">reserved</span>
                     <br />
                     <div class="description">How much space (percentage-wise) should be reserved for the root user</div>
                   </li>
                   <li>
                     <br />
                     <div class="description">How much space (percentage-wise) should be reserved for the root user</div>
                   </li>
                   <li>
-                    <span class="file" title="/etc/vservers/$vserver-name/dlimits/$dlimit/space_total">space_total</span>
+                    <span class="file" title="/etc/vservers/$vserver-name/dlimits/$x/space_total">space_total</span>
                     <br />
                     <div class="description">The amount of space this vserver should be limited to (measured in blocks of 1024 bytes)</div>
                   </li>
                     <br />
                     <div class="description">The amount of space this vserver should be limited to (measured in blocks of 1024 bytes)</div>
                   </li>
@@ -1188,11 +1248,26 @@ numbers like '00' are good names for these directories.
                     <br />
                     <div class="description">When this file exists, this interface will be ignored.</div>
                   </li>
                     <br />
                     <div class="description">When this file exists, this interface will be ignored.</div>
                   </li>
+                  <li>
+                    <span class="file" title="/etc/vservers/$vserver-name/interfaces/$iface/gid">gid</span>
+                    <br />
+                    <div class="description">
+Sets the group ownership of tun/tap interfaces. Requires a group id,
+not a group name.
+         </div>
+                  </li>
                   <li>
                     <span class="file" title="/etc/vservers/$vserver-name/interfaces/$iface/ip">ip</span>
                     <br />
                     <div class="description">The IP address which will be assigned to this interface.</div>
                   </li>
                   <li>
                     <span class="file" title="/etc/vservers/$vserver-name/interfaces/$iface/ip">ip</span>
                     <br />
                     <div class="description">The IP address which will be assigned to this interface.</div>
                   </li>
+                  <li>
+                    <span class="file" title="/etc/vservers/$vserver-name/interfaces/$iface/linktype">linktype</span>
+                    <br />
+                    <div class="description">
+Sets the link type of tun/tap interfaces.
+         </div>
+                  </li>
                   <li>
                     <span class="file" title="/etc/vservers/$vserver-name/interfaces/$iface/mask">mask</span>
                     <br />
                   <li>
                     <span class="file" title="/etc/vservers/$vserver-name/interfaces/$iface/mask">mask</span>
                     <br />
@@ -1207,6 +1282,14 @@ this file. Without such an entry, the IP will not be shown by
 <code class="tool">ifconfig</code> but by <code class="command">ip addr ls</code> only.  Such
 a labeled interface is known as an "alias" also (e.g. 'eth0:foo').
           </div>
 <code class="tool">ifconfig</code> but by <code class="command">ip addr ls</code> only.  Such
 a labeled interface is known as an "alias" also (e.g. 'eth0:foo').
           </div>
+                  </li>
+                  <li>
+                    <span class="boolean" title="/etc/vservers/$vserver-name/interfaces/$iface/nocsum">nocsum</span>
+                    <br />
+                    <div class="description">
+If a tun or tap interface is created, the presence of this file will
+disable checksumming on it.
+         </div>
                   </li>
                   <li>
                     <span class="boolean" title="/etc/vservers/$vserver-name/interfaces/$iface/nodev">nodev</span>
                   </li>
                   <li>
                     <span class="boolean" title="/etc/vservers/$vserver-name/interfaces/$iface/nodev">nodev</span>
@@ -1237,6 +1320,38 @@ interface will be skipped. This will override the global
                     <br />
                     <div class="description">The scope of the network interface.</div>
                   </li>
                     <br />
                     <div class="description">The scope of the network interface.</div>
                   </li>
+                  <li>
+                    <span class="boolean" title="/etc/vservers/$vserver-name/interfaces/$iface/shared">shared</span>
+                    <br />
+                    <div class="description">
+When this file exists, the tun/tap interface created will not be
+owned by this particular guest.
+         </div>
+                  </li>
+                  <li>
+                    <span class="boolean" title="/etc/vservers/$vserver-name/interfaces/$iface/tap">tap</span>
+                    <br />
+                    <div class="description">
+When this file exists, a tap interface will be created when the guest
+starts, and removed when the guest stops.
+         </div>
+                  </li>
+                  <li>
+                    <span class="boolean" title="/etc/vservers/$vserver-name/interfaces/$iface/tun">tun</span>
+                    <br />
+                    <div class="description">
+When this file exists, a tun interface will be created when the guest
+starts, and removed when the guest stops.
+         </div>
+                  </li>
+                  <li>
+                    <span class="file" title="/etc/vservers/$vserver-name/interfaces/$iface/uid">uid</span>
+                    <br />
+                    <div class="description">
+Sets the ownership of tun/tap interfaces. Requires a user id, not a
+username.
+         </div>
+                  </li>
                   <li>
                     <span class="boolean" title="/etc/vservers/$vserver-name/interfaces/$iface/vlandev">vlandev</span>
                     <br />
                   <li>
                     <span class="boolean" title="/etc/vservers/$vserver-name/interfaces/$iface/vlandev">vlandev</span>
                     <br />
@@ -1589,6 +1704,27 @@ the configuration directory will be made the working directory.
               </li>
             </ul>
           </li>
               </li>
             </ul>
           </li>
+          <li>
+            <span class="directory">/etc/vservers/<span class="symbolic">vserver-name</span>/<span class="">spaces</span></span>
+            <br />
+            <ul>
+              <li>
+                <span class="file" title="/etc/vservers/$vserver-name/spaces/mask">mask</span>
+                <br />
+                <div class="description">Contains a mask of spaces to clone/enter</div>
+              </li>
+              <li>
+                <span class="boolean" title="/etc/vservers/$vserver-name/spaces/net">net</span>
+                <br />
+                <div class="description">Enable network virtualization for this guest</div>
+              </li>
+              <li>
+                <span class="boolean" title="/etc/vservers/$vserver-name/spaces/pid">pid</span>
+                <br />
+                <div class="description">Enables pid virtualization for this guest</div>
+              </li>
+            </ul>
+          </li>
           <li>
             <span class="directory">/etc/vservers/<span class="symbolic">vserver-name</span>/<span class="">sysctl</span></span>
             <br />
           <li>
             <span class="directory">/etc/vservers/<span class="symbolic">vserver-name</span>/<span class="">sysctl</span></span>
             <br />
index 7cfe4ca..4088d35 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE database SYSTEM "configuration.dtd" []>
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE database SYSTEM "configuration.dtd" []>
-<!-- $Id: configuration.xml 2599 2007-08-26 21:30:50Z dhozac $ -->
+<!-- $Id: configuration.xml 2692 2008-03-01 00:22:34Z dhozac $ -->
 
 <database xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:noNamespaceSchemaLocation="file:configuration.xsd">
 
 <database xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:noNamespaceSchemaLocation="file:configuration.xsd">
@@ -666,6 +666,11 @@ called as <command>chbind &lt;options&gt; mount ...</command>. See
 <optionref>fstab</optionref> also.
       </description>
     </data>
 <optionref>fstab</optionref> also.
       </description>
     </data>
+    <scalar name="badness">
+      <description>
+Contains the bias to be applied to processes in this guest when the OOM-killer strikes.
+      </description>
+    </scalar>
     
     <collection name="apps">
       <collection name="init">
     
     <collection name="apps">
       <collection name="init">
@@ -780,7 +785,34 @@ pair per line.
          </description>
        </hash>
       </collection>
          </description>
        </hash>
       </collection>
-      
+
+      <collection name="vdevmap">
+        <collection name="x" type="sybmolic">
+          <description>'x' is an arbitrary name, replace it with e.g. device names</description>
+          <boolean name="open">
+            <description>When this file exists, the device can be opened</description>
+          </boolean>
+          <boolean name="create">
+            <description>When this file exists, the device can be created (if the guest has <optionref ref="bcapabilities">CAP_MKNOD</optionref>)</description>
+          </boolean>
+          <boolean id="guest-vdevmap-remap" name="remap">
+            <description>
+When this file exists, <optionref ref="guest-vdevmap-target">target</optionref> will
+have to exist as well and opening the device will in fact open the target device
+            </description>
+          </boolean>
+          <scalar name="flags">
+            <description>This file will let you specify unimplemented flags manually</description>
+          </scalar>
+          <scalar name="device">
+            <description>Contains the name of a device node</description>
+          </scalar>
+          <scalar id="guest-vdevmap-target" name="target">
+            <description>Contains the device node of the target node to open instead of the device when <optionref ref="guest-vdevmap-remap">remap</optionref> is set</description>
+          </scalar>
+        </collection>
+      </collection>
+  
       <collection name="vshelper">
        <scalar name="sync-timeout">
          <default>30</default>
       <collection name="vshelper">
        <scalar name="sync-timeout">
          <default>30</default>
@@ -1309,6 +1341,47 @@ When this file exists, the steps which setup and destroy a VLAN
 interface will be executed.
          </description>
        </boolean>
 interface will be executed.
          </description>
        </boolean>
+       <boolean name="tun" since="0.30.215">
+         <description>
+When this file exists, a tun interface will be created when the guest
+starts, and removed when the guest stops.
+         </description>
+       </boolean>
+       <boolean name="tap" since="0.30.215">
+         <description>
+When this file exists, a tap interface will be created when the guest
+starts, and removed when the guest stops.
+         </description>
+       </boolean>
+       <boolean name="nocsum" since="0.30.215">
+         <description>
+If a tun or tap interface is created, the presence of this file will
+disable checksumming on it.
+         </description>
+       </boolean>
+       <boolean name="shared" since="0.30.215">
+         <description>
+When this file exists, the tun/tap interface created will not be
+owned by this particular guest.
+         </description>
+       </boolean>
+       <scalar name="uid" since="0.30.215">
+         <description>
+Sets the ownership of tun/tap interfaces. Requires a user id, not a
+username.
+         </description>
+       </scalar>
+       <scalar name="gid" since="0.30.215">
+         <description>
+Sets the group ownership of tun/tap interfaces. Requires a group id,
+not a group name.
+         </description>
+       </scalar>
+       <scalar name="linktype" since="0.30.215">
+         <description>
+Sets the link type of tun/tap interfaces.
+         </description>
+       </scalar>
       </collection>
     </collection>
     
       </collection>
     </collection>
     
@@ -1399,7 +1472,11 @@ tools and can *not* be modified.
     </collection>
 
     <collection name="dlimits" since="0.30.210">
     </collection>
 
     <collection name="dlimits" since="0.30.210">
-      <collection name="dlimit" type="symbolic">
+      <description>
+Note that all entries are required for the disk limit to be applied.
+      </description>
+      <collection name="x" type="symbolic">
+        <description>'x' is an arbitrary name, replace it with e.g. integers</description>
         <scalar name="directory">
           <description>The directory to which the limit should be applied</description>
         </scalar>
         <scalar name="directory">
           <description>The directory to which the limit should be applied</description>
         </scalar>
@@ -1428,6 +1505,9 @@ tools and can *not* be modified.
     </collection>
 
     <collection name="cpuset" since="0.30.211">
     </collection>
 
     <collection name="cpuset" since="0.30.211">
+      <description>
+Puts the guest in a cpuset. Required entries are name, cpus and mems.
+      </description>
       <scalar name="name">
         <description>The name of the cpuset for this vserver</description>
       </scalar>
       <scalar name="name">
         <description>The name of the cpuset for this vserver</description>
       </scalar>
@@ -1513,5 +1593,17 @@ tools and can *not* be modified.
         </scalar>
       </collection>
     </collection>
         </scalar>
       </collection>
     </collection>
+
+    <collection name="spaces" since="0.30.215">
+      <boolean name="pid">
+        <description>Enables pid virtualization for this guest</description>
+      </boolean>
+      <boolean name="net">
+        <description>Enable network virtualization for this guest</description>
+      </boolean>
+      <scalar name="mask">
+        <description>Contains a mask of spaces to clone/enter</description>
+      </scalar>
+    </collection>
   </collection>
   </database>
   </collection>
   </database>
index 33fd1e9..41938e0 100644 (file)
@@ -1,4 +1,4 @@
-// $Id: wrappers-ioctl.hc 814 2004-02-06 14:47:18Z ensc $    --*- c -*--
+// $Id: wrappers-ioctl.hc 2687 2008-02-28 23:28:31Z dhozac $    --*- c -*--
 
 // Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 //  
 
 // Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 //  
@@ -27,3 +27,8 @@ Eioctl(int fd, int request, void *p)
   FatalErrnoError(res<0, "ioctl()");
 }
 
   FatalErrnoError(res<0, "ioctl()");
 }
 
+#define EioctlD(fd, request, p)                                \
+  do {                                                 \
+    int   res = ioctl(fd, request, p);                 \
+    FatalErrnoError(res<0, "ioctl(" #request ")");     \
+  } while (0)
index faf7cbd..b5d5e9a 100644 (file)
@@ -1,4 +1,4 @@
-## $Id$  -*- makefile -*-
+## $Id: Makefile-files 2674 2008-01-27 07:55:13Z dhozac $  -*- makefile -*-
 
 ## Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 ##  
 
 ## Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 ##  
index 80481be..bf241bb 100644 (file)
@@ -1,5 +1,5 @@
 #! /bin/bash
 #! /bin/bash
-# $Id$
+# $Id: bash-wrapper 2674 2008-01-27 07:55:13Z dhozac $
 
 # Copyright (C) 2007 Daniel Hokka Zakrisson
 #  
 
 # Copyright (C) 2007 Daniel Hokka Zakrisson
 #  
index c7ff359..94903cc 100644 (file)
@@ -42,7 +42,7 @@ start() {
        eend $?
 
        ebegin "Loading default device map"
        eend $?
 
        ebegin "Loading default device map"
-       $__PKGLIBDIR/bash-wrapper 'loadDeviceMap 0 "$__CONFDIR/.defaults/apps/vdevmap"'
+       $__PKGLIBDIR/bash-wrapper 'handleDeviceMap --set 0 "$__CONFDIR/.defaults/apps/vdevmap"'
        eend $?
 }
 
        eend $?
 }
 
index 354b29d..d1ec86b 100644 (file)
@@ -79,11 +79,22 @@ struct      vcmd_ctx_caps_v1 {
 /* bcaps commands */
 
 #define VCMD_get_bcaps         VC_CMD(FLAGS, 9, 0)
 /* bcaps commands */
 
 #define VCMD_get_bcaps         VC_CMD(FLAGS, 9, 0)
-#define VCMD_set_bcaps         VC_CMD(FLAGS,10, 0)
+#define VCMD_set_bcaps         VC_CMD(FLAGS, 10, 0)
 
 struct vcmd_bcaps {
        uint64_t bcaps;
        uint64_t bmask;
 };
 
 
 struct vcmd_bcaps {
        uint64_t bcaps;
        uint64_t bmask;
 };
 
+
+
+/* OOM badness */
+
+#define VCMD_get_badness       VC_CMD(MEMCTRL, 5, 0)
+#define VCMD_set_badness       VC_CMD(MEMCTRL, 6, 0)
+
+struct vcmd_badness_v0 {
+       int64_t bias;
+};
+
 #endif /* _VX_CONTEXT_CMD_H */
 #endif /* _VX_CONTEXT_CMD_H */
index 5ebf825..506e21b 100644 (file)
@@ -5,6 +5,7 @@
 /*  device vserver commands */
 
 #define VCMD_set_mapping       VC_CMD(DEVICE, 1, 0)
 /*  device vserver commands */
 
 #define VCMD_set_mapping       VC_CMD(DEVICE, 1, 0)
+#define VCMD_unset_mapping     VC_CMD(DEVICE, 2, 0)
 
 struct vcmd_set_mapping_v0 {
        const char *device;
 
 struct vcmd_set_mapping_v0 {
        const char *device;
index ee6defc..6836c27 100644 (file)
@@ -60,6 +60,8 @@
 
 #define VC_CAT_SCHED           14
 
 
 #define VC_CAT_SCHED           14
 
+#define VC_CAT_MEMCTRL         20
+
 #define VC_CAT_VNET            25
 #define VC_CAT_NETALT          26
 #define VC_CAT_NETMIG          27
 #define VC_CAT_VNET            25
 #define VC_CAT_NETALT          26
 #define VC_CAT_NETMIG          27
index 5ac113d..26f3dde 100644 (file)
@@ -1,4 +1,4 @@
-## $Id: Makefile-files 2589 2007-08-16 03:06:50Z dhozac $  -*- makefile -*-
+## $Id: Makefile-files 2619 2007-10-13 12:13:30Z dhozac $  -*- makefile -*-
 
 ## Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 ##  
 
 ## Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 ##  
@@ -130,6 +130,8 @@ lib_v21_SRCS =                      lib/syscall_setccaps-v21.hc \
                                lib/syscall_ctxmigrate-v21.hc \
                                lib/syscall_setmapping.c \
                                lib/syscall_setmapping-v21.hc \
                                lib/syscall_ctxmigrate-v21.hc \
                                lib/syscall_setmapping.c \
                                lib/syscall_setmapping-v21.hc \
+                               lib/syscall_unsetmapping.c \
+                               lib/syscall_unsetmapping-v21.hc \
                                lib/syscall_schedinfo.c \
                                lib/syscall_schedinfo-v21.hc \
                                lib/syscall_getccaps-v21.hc \
                                lib/syscall_schedinfo.c \
                                lib/syscall_schedinfo-v21.hc \
                                lib/syscall_getccaps-v21.hc \
@@ -150,7 +152,11 @@ lib_v23_SRCS =                     lib/syscall_tagmigrate-v23.hc \
                                lib/syscall_tagmigrate.c \
                                lib/syscall_tagcreate.c \
                                lib/syscall_tasktag-v23.hc \
                                lib/syscall_tagmigrate.c \
                                lib/syscall_tagcreate.c \
                                lib/syscall_tasktag-v23.hc \
-                               lib/syscall_tasktag.c
+                               lib/syscall_tasktag.c \
+                               lib/syscall_getbadness.c \
+                               lib/syscall_getbadness-v23.hc \
+                               lib/syscall_setbadness.c \
+                               lib/syscall_setbadness-v23.hc
 
 if ENSC_HAVE_C99_COMPILER
 lib_v13_SRCS +=                        lib/syscall_adddlimit-v13.hc \
 
 if ENSC_HAVE_C99_COMPILER
 lib_v13_SRCS +=                        lib/syscall_adddlimit-v13.hc \
index 4f38864..0f6d176 100644 (file)
@@ -1,4 +1,4 @@
-// $Id: ccaps-v13.c 2393 2006-11-23 18:30:29Z dhozac $    --*- c -*--
+// $Id: ccaps-v13.c 2643 2007-12-19 02:17:10Z dhozac $    --*- c -*--
 
 // Copyright (C) 2004 Enrico Scholz <ensc@delenn.intern.sigma-chemnitz.de>
 //  
 
 // Copyright (C) 2004 Enrico Scholz <ensc@delenn.intern.sigma-chemnitz.de>
 //  
@@ -41,6 +41,7 @@ static struct Mapping_uint64 const VALUES[] = {
   DECL("quota_ctl",       VC_VXC_QUOTA_CTL),
   DECL("admin_mapper",    VC_VXC_ADMIN_MAPPER),
   DECL("admin_cloop",     VC_VXC_ADMIN_CLOOP),
   DECL("quota_ctl",       VC_VXC_QUOTA_CTL),
   DECL("admin_mapper",    VC_VXC_ADMIN_MAPPER),
   DECL("admin_cloop",     VC_VXC_ADMIN_CLOOP),
+  DECL("kthread",         VC_VXC_KTHREAD),
     // some deprecated values...
   DECL("mount",           VC_VXC_SECURE_MOUNT),
   DECL("remount",         VC_VXC_SECURE_REMOUNT),
     // some deprecated values...
   DECL("mount",           VC_VXC_SECURE_MOUNT),
   DECL("remount",         VC_VXC_SECURE_REMOUNT),
index 344f532..6f69fff 100644 (file)
@@ -1,4 +1,4 @@
-// $Id: ncaps-net.c 2585 2007-08-12 00:13:31Z dhozac $    --*- c -*--
+// $Id: ncaps-net.c 2705 2008-03-17 08:55:11Z dhozac $    --*- c -*--
 
 // Copyright (C) 2004 Enrico Scholz <ensc@delenn.intern.sigma-chemnitz.de>
 //  
 
 // Copyright (C) 2004 Enrico Scholz <ensc@delenn.intern.sigma-chemnitz.de>
 //  
@@ -31,7 +31,8 @@
 #define DECL(STR, VAL) { STR, sizeof(STR)-1, VAL }
 
 static struct Mapping_uint64 const VALUES[] = {
 #define DECL(STR, VAL) { STR, sizeof(STR)-1, VAL }
 
 static struct Mapping_uint64 const VALUES[] = {
-  DECL("raw_icmp", VC_NXC_RAW_ICMP),
+  DECL("tun_create",   VC_NXC_TUN_CREATE),
+  DECL("raw_icmp",     VC_NXC_RAW_ICMP),
 };
 
 inline static char const *
 };
 
 inline static char const *
index 2ab0a3f..a4f6192 100644 (file)
@@ -1,4 +1,4 @@
-// $Id: nflags-net.c 2597 2007-08-26 17:48:26Z dhozac $    --*- c -*--
+// $Id: nflags-net.c 2705 2008-03-17 08:55:11Z dhozac $    --*- c -*--
 
 // Copyright (C) 2004 Enrico Scholz <ensc@delenn.intern.sigma-chemnitz.de>
 //  
 
 // Copyright (C) 2004 Enrico Scholz <ensc@delenn.intern.sigma-chemnitz.de>
 //  
@@ -37,6 +37,7 @@ static struct Mapping_uint64 const VALUES[] = {
   DECL("single_ip",    VC_NXF_SINGLE_IP),
   DECL("lback_remap",  VC_NXF_LBACK_REMAP),
   DECL("remap_lback",  VC_NXF_LBACK_REMAP),
   DECL("single_ip",    VC_NXF_SINGLE_IP),
   DECL("lback_remap",  VC_NXF_LBACK_REMAP),
   DECL("remap_lback",  VC_NXF_LBACK_REMAP),
+  DECL("lback_allow",  VC_NXF_LBACK_ALLOW),
 
   DECL("hide_netif",   VC_NXF_HIDE_NETIF),
   DECL("hide_lback",   VC_NXF_HIDE_LBACK),
 
   DECL("hide_netif",   VC_NXF_HIDE_NETIF),
   DECL("hide_lback",   VC_NXF_HIDE_LBACK),
index 20e7462..a86d748 100644 (file)
@@ -1,4 +1,4 @@
-// $Id$    --*- c -*--
+// $Id: syscall_ctxcreate-v21.hc 2674 2008-01-27 07:55:13Z dhozac $    --*- c -*--
 
 // Copyright (C) 2007 Daniel Hokka Zakrisson
 //  
 
 // Copyright (C) 2007 Daniel Hokka Zakrisson
 //  
index 22d8c2e..01fb789 100644 (file)
@@ -1,4 +1,4 @@
-// $Id$    --*- c++ -*--
+// $Id: syscall_fgetiattr-v22.hc 2674 2008-01-27 07:55:13Z dhozac $    --*- c++ -*--
 
 // Copyright (C) 2007 Daniel Hokka Zakrisson
 //  
 
 // Copyright (C) 2007 Daniel Hokka Zakrisson
 //  
index 6cf14f4..c233a70 100644 (file)
@@ -1,4 +1,4 @@
-// $Id$    --*- c++ -*--
+// $Id: syscall_fgetiattr.c 2674 2008-01-27 07:55:13Z dhozac $    --*- c++ -*--
 
 // Copyright (C) 2007 Daniel Hokka Zakrisson
 //  
 
 // Copyright (C) 2007 Daniel Hokka Zakrisson
 //  
index ba2dfab..1fe3df0 100644 (file)
@@ -1,4 +1,4 @@
-// $Id$    --*- c++ -*--
+// $Id: syscall_fsetiattr-v22.hc 2674 2008-01-27 07:55:13Z dhozac $    --*- c++ -*--
 
 // Copyright (C) 2007 Daniel Hokka Zakrisson
 //  
 
 // Copyright (C) 2007 Daniel Hokka Zakrisson
 //  
index b93a2fd..0513b33 100644 (file)
@@ -1,4 +1,4 @@
-// $Id$    --*- c++ -*--
+// $Id: syscall_fsetiattr.c 2674 2008-01-27 07:55:13Z dhozac $    --*- c++ -*--
 
 // Copyright (C) 2007 Daniel Hokka Zakrisson
 //  
 
 // Copyright (C) 2007 Daniel Hokka Zakrisson
 //  
diff --git a/lib/syscall_getbadness-v23.hc b/lib/syscall_getbadness-v23.hc
new file mode 100644 (file)
index 0000000..5c78939
--- /dev/null
@@ -0,0 +1,33 @@
+// $Id: syscall_getbadness-v23.hc 2674 2008-01-27 07:55:13Z dhozac $    --*- c++ -*--
+
+// Copyright (C) 2007 Daniel Hokka Zakrisson
+//  
+// 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; version 2 of the License.
+//  
+// 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.
+
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+static inline ALWAYSINLINE int
+vc_get_badness_v23(xid_t xid, int64_t *badness)
+{
+  struct vcmd_badness_v0 data;
+  int ret;
+  ret = vserver(VCMD_get_badness, xid, &data);
+  if (ret)
+    return ret;
+  *badness = data.bias;
+  return 0;
+}
diff --git a/lib/syscall_getbadness.c b/lib/syscall_getbadness.c
new file mode 100644 (file)
index 0000000..16c3fed
--- /dev/null
@@ -0,0 +1,39 @@
+// $Id: syscall_getbadness.c 2674 2008-01-27 07:55:13Z dhozac $    --*- c++ -*--
+
+// Copyright (C) 2007 Daniel Hokka Zakrisson
+//  
+// 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; version 2 of the License.
+//  
+// 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.
+
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include "vserver.h"
+#include "virtual.h"
+#include "vserver-internal.h"
+
+#if defined(VC_ENABLE_API_V23)
+#  include "syscall_getbadness-v23.hc"
+#endif
+
+#if defined(VC_ENABLE_API_V23)
+
+int
+vc_get_badness(xid_t xid, int64_t *badness)
+{
+  CALL_VC(CALL_VC_V23(vc_get_badness, xid, badness));
+}
+
+#endif
index b6ba7ec..bd45ffd 100644 (file)
@@ -1,4 +1,4 @@
-// $Id$    --*- c -*--
+// $Id: syscall_getccaps-v21.hc 2674 2008-01-27 07:55:13Z dhozac $    --*- c -*--
 
 // Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 //  
 
 // Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 //  
index c1b9a11..9d3d93a 100644 (file)
@@ -1,4 +1,4 @@
-// $Id$    --*- c -*--
+// $Id: syscall_getsched-v21.hc 2674 2008-01-27 07:55:13Z dhozac $    --*- c -*--
 
 // Copyright (C) 2007 Daniel Hokka Zakrisson
 //  
 
 // Copyright (C) 2007 Daniel Hokka Zakrisson
 //  
index 1b6521b..118fa6c 100644 (file)
@@ -1,4 +1,4 @@
-// $Id$    --*- c -*--
+// $Id: syscall_getsched.c 2674 2008-01-27 07:55:13Z dhozac $    --*- c -*--
 
 // Copyright (C) 2007 Daniel Hokka Zakrisson
 //  
 
 // Copyright (C) 2007 Daniel Hokka Zakrisson
 //  
index d9489bf..0c266d6 100644 (file)
@@ -1,4 +1,4 @@
-// $Id$    --*- c -*--
+// $Id: syscall_netadd-netv2.hc 2674 2008-01-27 07:55:13Z dhozac $    --*- c -*--
 
 // Copyright (C) 2007 Daniel Hokka Zakrisson
 //  
 
 // Copyright (C) 2007 Daniel Hokka Zakrisson
 //  
index 2ca4331..7e133fb 100644 (file)
@@ -1,4 +1,4 @@
-// $Id$    --*- c -*--
+// $Id: syscall_netremove-netv2.hc 2700 2008-03-10 19:59:18Z dhozac $    --*- c -*--
 
 // Copyright (C) 2007 Daniel Hokka Zakrisson
 //  
 
 // Copyright (C) 2007 Daniel Hokka Zakrisson
 //  
@@ -31,10 +31,10 @@ vc_net_remove_netv2(nid_t nid, struct vc_net_addr const *info)
     k_ipv4.type = VC_NXA_TYPE_ANY;
     k_ipv6.type = VC_NXA_TYPE_ANY;
 
     k_ipv4.type = VC_NXA_TYPE_ANY;
     k_ipv6.type = VC_NXA_TYPE_ANY;
 
-    ret = vserver(VCMD_net_remove_ipv4, NID_USER2KERNEL(nid), &k_ipv4);
-    if (ret == -1)
+    ret = vserver(VCMD_net_remove_ipv6, NID_USER2KERNEL(nid), &k_ipv6);
+    if (ret == -1 && errno != ENOSYS)
       return -1;
       return -1;
-    return vserver(VCMD_net_remove_ipv6, NID_USER2KERNEL(nid), &k_ipv6);
+    return vserver(VCMD_net_remove_ipv4, NID_USER2KERNEL(nid), &k_ipv4);
   }
   switch (info->vna_type & (VC_NXA_TYPE_IPV4 | VC_NXA_TYPE_IPV6)) {
     case VC_NXA_TYPE_IPV4: {
   }
   switch (info->vna_type & (VC_NXA_TYPE_IPV4 | VC_NXA_TYPE_IPV6)) {
     case VC_NXA_TYPE_IPV4: {
diff --git a/lib/syscall_setbadness-v23.hc b/lib/syscall_setbadness-v23.hc
new file mode 100644 (file)
index 0000000..1f438bd
--- /dev/null
@@ -0,0 +1,30 @@
+// $Id: syscall_setbadness-v23.hc 2674 2008-01-27 07:55:13Z dhozac $    --*- c++ -*--
+
+// Copyright (C) 2007 Daniel Hokka Zakrisson
+//  
+// 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; version 2 of the License.
+//  
+// 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.
+
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+static inline ALWAYSINLINE int
+vc_set_badness_v23(xid_t xid, int64_t badness)
+{
+  struct vcmd_badness_v0 data = {
+    .bias = badness,
+  };
+  return vserver(VCMD_set_badness, xid, &data);
+}
diff --git a/lib/syscall_setbadness.c b/lib/syscall_setbadness.c
new file mode 100644 (file)
index 0000000..af31a29
--- /dev/null
@@ -0,0 +1,39 @@
+// $Id: syscall_setbadness.c 2674 2008-01-27 07:55:13Z dhozac $    --*- c++ -*--
+
+// Copyright (C) 2007 Daniel Hokka Zakrisson
+//  
+// 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; version 2 of the License.
+//  
+// 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.
+
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include "vserver.h"
+#include "virtual.h"
+#include "vserver-internal.h"
+
+#if defined(VC_ENABLE_API_V23)
+#  include "syscall_setbadness-v23.hc"
+#endif
+
+#if defined(VC_ENABLE_API_V23)
+
+int
+vc_set_badness(xid_t xid, int64_t badness)
+{
+  CALL_VC(CALL_VC_V23(vc_set_badness, xid, badness));
+}
+
+#endif
index 0af5e92..6b815e2 100644 (file)
@@ -1,4 +1,4 @@
-// $Id$    --*- c -*--
+// $Id: syscall_setsched-v22.hc 2674 2008-01-27 07:55:13Z dhozac $    --*- c -*--
 
 // Copyright (C) 2007 Daniel Hokka Zakrisson
 //  
 
 // Copyright (C) 2007 Daniel Hokka Zakrisson
 //  
index 752731a..39db617 100644 (file)
@@ -1,4 +1,4 @@
-// $Id$    --*- c++ -*--
+// $Id: syscall_tagcreate.c 2674 2008-01-27 07:55:13Z dhozac $    --*- c++ -*--
 
 // Copyright (C) 2007 Daniel Hokka Zakrisson
 //  
 
 // Copyright (C) 2007 Daniel Hokka Zakrisson
 //  
index bb718c8..254ff7e 100644 (file)
@@ -1,4 +1,4 @@
-// $Id$    --*- c++ -*--
+// $Id: syscall_tagmigrate-v23.hc 2674 2008-01-27 07:55:13Z dhozac $    --*- c++ -*--
 
 // Copyright (C) 2007 Daniel Hokka Zakrisson
 //  
 
 // Copyright (C) 2007 Daniel Hokka Zakrisson
 //  
@@ -23,5 +23,6 @@
 static inline ALWAYSINLINE int
 vc_tag_migrate_tag(tag_t tag)
 {
 static inline ALWAYSINLINE int
 vc_tag_migrate_tag(tag_t tag)
 {
-  return vserver(VCMD_tag_migrate, TAG_USER2KERNEL(tag), NULL);
+  tag_t res = vserver(VCMD_tag_migrate, TAG_USER2KERNEL(tag), NULL);
+  return TAG_KERNEL2USER(res);
 }
 }
index d5a9e46..3f03c76 100644 (file)
@@ -1,4 +1,4 @@
-// $Id$    --*- c++ -*--
+// $Id: syscall_tagmigrate.c 2674 2008-01-27 07:55:13Z dhozac $    --*- c++ -*--
 
 // Copyright (C) 2007 Daniel Hokka Zakrisson
 //  
 
 // Copyright (C) 2007 Daniel Hokka Zakrisson
 //  
index e01b35a..a37681d 100644 (file)
@@ -1,4 +1,4 @@
-// $Id$    --*- c++ -*--
+// $Id: syscall_tasktag-v23.hc 2674 2008-01-27 07:55:13Z dhozac $    --*- c++ -*--
 
 // Copyright (C) 2007 Daniel Hokka Zakrisson
 //  
 
 // Copyright (C) 2007 Daniel Hokka Zakrisson
 //  
index f5d6c35..3d36c12 100644 (file)
@@ -1,4 +1,4 @@
-// $Id$    --*- c++ -*--
+// $Id: syscall_tasktag.c 2674 2008-01-27 07:55:13Z dhozac $    --*- c++ -*--
 
 // Copyright (C) 2007 Daniel Hokka Zakrisson
 //  
 
 // Copyright (C) 2007 Daniel Hokka Zakrisson
 //  
diff --git a/lib/syscall_unsetmapping-v21.hc b/lib/syscall_unsetmapping-v21.hc
new file mode 100644 (file)
index 0000000..062e189
--- /dev/null
@@ -0,0 +1,33 @@
+// $Id: syscall_unsetmapping-v21.hc 2674 2008-01-27 07:55:13Z dhozac $    --*- c -*--
+
+// Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
+// Copyright (C) 2006 Daniel Hokka Zakrisson
+//  
+// 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; version 2 of the License.
+//  
+// 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.
+
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+static inline ALWAYSINLINE int
+vc_unset_mapping_v21(xid_t xid, const char *device, const char *target, uint32_t flags)
+{
+  struct vcmd_set_mapping_v0 data = {
+    .device = device,
+    .target = target,
+    .flags = flags
+  };
+  return vserver(VCMD_unset_mapping, xid, &data);
+}
diff --git a/lib/syscall_unsetmapping.c b/lib/syscall_unsetmapping.c
new file mode 100644 (file)
index 0000000..8403b38
--- /dev/null
@@ -0,0 +1,38 @@
+// $Id: syscall_unsetmapping.c 2674 2008-01-27 07:55:13Z dhozac $    --*- c -*--
+
+// Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
+// Copyright (C) 2006 Daniel Hokka Zakrisson
+//  
+// 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; version 2 of the License.
+//  
+// 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.
+
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include "vserver.h"
+#include "vserver-internal.h"
+#include "virtual.h"
+
+#if defined(VC_ENABLE_API_V21)
+#  include "syscall_unsetmapping-v21.hc"
+#endif
+
+#if defined(VC_ENABLE_API_V21)
+int
+vc_unset_mapping(xid_t xid, const char *device, const char *target, uint32_t flags)
+{
+  CALL_VC(CALL_VC_V21(vc_unset_mapping, xid, device, target, flags));
+}
+#endif
index 7f4b6aa..fc23f9f 100644 (file)
@@ -1,4 +1,4 @@
-// $Id$    --*- c -*--
+// $Id: tagopt2tag.c 2674 2008-01-27 07:55:13Z dhozac $    --*- c -*--
 
 // Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 // Copyright (C) 2007 Daniel Hokka Zakrisson
 
 // Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 // Copyright (C) 2007 Daniel Hokka Zakrisson
index d723d6b..5cb2643 100644 (file)
@@ -1,4 +1,4 @@
-// $Id: val2text.hc 1544 2004-05-08 01:27:48Z ensc $    --*- c -*--
+// $Id: val2text.hc 2651 2008-01-03 15:33:01Z dhozac $    --*- c -*--
 
 // Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 //  
 
 // Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 //  
                                                                        \
     if (idx==-1) {                                                     \
       size_t   i;                                                      \
                                                                        \
     if (idx==-1) {                                                     \
       size_t   i;                                                      \
-      for (i=0; i<sizeof(*val)*8 && (*val&(1<<i))==0; ++i) {}          \
-      del_val = (1<<i);                                                        \
+      for (i=0; i<sizeof(*val)*8 && (*val&((TYPE)1<<i))==0; ++i) {}    \
+      del_val = ((TYPE)1<<i);                                          \
       idx     = searchValue(del_val, map, map_len);                    \
     }                                                                  \
       idx     = searchValue(del_val, map, map_len);                    \
     }                                                                  \
-    *val &= ~del_val;                                                  \
+    if (idx!=-1)                                                       \
+      *val &= ~del_val;                                                        \
     return idx;                                                                \
   }
     return idx;                                                                \
   }
index c5bd743..0293ca1 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: vserver.h 2589 2007-08-16 03:06:50Z dhozac $
+/* $Id: vserver.h 2705 2008-03-17 08:55:11Z dhozac $
 
 *  Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 *   
 
 *  Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 *   
 #define VC_VXC_ADMIN_MAPPER            0x00200000ull
 #define VC_VXC_ADMIN_CLOOP             0x00400000ull
 
 #define VC_VXC_ADMIN_MAPPER            0x00200000ull
 #define VC_VXC_ADMIN_CLOOP             0x00400000ull
 
+#define VC_VXC_KTHREAD                 0x01000000ull
+
 
 // the scheduler flags
 #define VC_VXSM_FILL_RATE              0x0001
 
 // the scheduler flags
 #define VC_VXSM_FILL_RATE              0x0001
 
 #define VC_NXF_SINGLE_IP               0x00000100ull
 #define VC_NXF_LBACK_REMAP             0x00000200ull
 
 #define VC_NXF_SINGLE_IP               0x00000100ull
 #define VC_NXF_LBACK_REMAP             0x00000200ull
+#define VC_NXF_LBACK_ALLOW             0x00000400ull
 
 #define VC_NXF_HIDE_NETIF              0x02000000ull
 #define VC_NXF_HIDE_LBACK              0x04000000ull
 
 #define VC_NXF_HIDE_NETIF              0x02000000ull
 #define VC_NXF_HIDE_LBACK              0x04000000ull
 
 
 // the network capabilities
 
 
 // the network capabilities
+#define VC_NXC_TUN_CREATE              0x00000001ull
+
 #define VC_NXC_RAW_ICMP                        0x00000100ull
 
 
 #define VC_NXC_RAW_ICMP                        0x00000100ull
 
 
 #ifndef CLONE_NEWIPC
 #  define CLONE_NEWIPC                 0x08000000
 #endif
 #ifndef CLONE_NEWIPC
 #  define CLONE_NEWIPC                 0x08000000
 #endif
-
+#ifndef CLONE_NEWUSER
+#  define CLONE_NEWUSER                        0x10000000
+#endif
+#ifndef CLONE_NEWPID
+#  define CLONE_NEWPID                 0x20000000
+#endif
+#ifndef CLONE_NEWNET
+#  define CLONE_NEWNET                 0x40000000
+#endif
 
 
 #define VC_BAD_PERSONALITY             ((uint_least32_t)(-1))
 
 
 #define VC_BAD_PERSONALITY             ((uint_least32_t)(-1))
@@ -632,20 +645,26 @@ extern "C" {
       uint16_t                 vna_flags;
       uint16_t                 vna_prefix;
       uint16_t                 vna_parent;
       uint16_t                 vna_flags;
       uint16_t                 vna_prefix;
       uint16_t                 vna_parent;
-      union {
-       struct {
-         struct in_addr        ip;
-         struct in_addr        mask;
-       } ipv4;
-       struct {
-         struct in6_addr       ip;
-         struct in6_addr       mask;
-       } ipv6;
-      } u;
-#define vna_v4_ip      u.ipv4.ip
-#define vna_v4_mask    u.ipv4.mask
-#define vna_v6_ip      u.ipv6.ip
-#define vna_v6_mask    u.ipv6.mask
+      struct {
+       union {
+         struct in_addr        v4;
+         struct in6_addr       v6;
+       } ip;
+       union {
+         struct in_addr        v4;
+         struct in6_addr       v6;
+       } ip2;
+       union {
+         struct in_addr        v4;
+         struct in6_addr       v6;
+       } mask;
+      } s;
+#define vna_v4_ip      s.ip.v4
+#define vna_v4_ip2     s.ip2.v4
+#define vna_v4_mask    s.mask.v4
+#define vna_v6_ip      s.ip.v6
+#define vna_v6_ip2     s.ip2.v6
+#define vna_v6_mask    s.mask.v6
   };
 
   struct vc_net_flags {
   };
 
   struct vc_net_flags {
@@ -813,6 +832,10 @@ extern "C" {
 
     /* misc. syscalls */
   int          vc_set_mapping(xid_t xid, const char *device, const char *target, uint32_t flags);
 
     /* misc. syscalls */
   int          vc_set_mapping(xid_t xid, const char *device, const char *target, uint32_t flags);
+  int          vc_unset_mapping(xid_t xid, const char *device, const char *target, uint32_t flags);
+
+  int          vc_get_badness(xid_t xid, int64_t *badness);
+  int          vc_set_badness(xid_t xid, int64_t badness);
 
 
   /** \brief    Information about parsing errors
 
 
   /** \brief    Information about parsing errors
index c1d44b6..b4dfbbc 100644 (file)
@@ -1,4 +1,4 @@
-## $Id: Makefile-files 2579 2007-08-08 20:47:12Z dhozac $  -*- makefile -*-
+## $Id: Makefile-files 2685 2008-02-21 23:22:23Z ensc $  -*- makefile -*-
 
 ## Copyright (C) 2003,2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 ##  
 
 ## Copyright (C) 2003,2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 ##  
@@ -52,6 +52,9 @@ endif
 
 noinst_HEADERS += \
                                lib_internal/coreassert.h \
 
 noinst_HEADERS += \
                                lib_internal/coreassert.h \
+                               lib_internal/crypto-wrapper.h \
+                               lib_internal/crypto-wrapper-nss.h \
+                               lib_internal/crypto-wrapper-beecrypt.h \
                                lib_internal/errinfo.h \
                                lib_internal/jail.h \
                                lib_internal/matchlist.h \
                                lib_internal/errinfo.h \
                                lib_internal/jail.h \
                                lib_internal/matchlist.h \
diff --git a/lib_internal/crypto-wrapper-beecrypt.h b/lib_internal/crypto-wrapper-beecrypt.h
new file mode 100644 (file)
index 0000000..bfd455a
--- /dev/null
@@ -0,0 +1,130 @@
+/*     --*- c -*--
+ * Copyright (C) 2008 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
+ *
+ * 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; version 2 and/or 3 of the License.
+ *
+ * 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef H_UTIL_VSERVER_LIB_INTERNAL_CRYPTO_WRAPPER_BEECRYPT_H
+#define H_UTIL_VSERVER_LIB_INTERNAL_CRYPTO_WRAPPER_BEECRYPT_H
+
+#include <beecrypt/beecrypt.h>
+#include <ctype.h>
+
+typedef hashFunction                   ensc_hash_method;
+typedef hashFunctionContext            ensc_hash_context;
+
+inline static void
+ensc_crypto_init(void)
+{
+}
+
+inline static ensc_hash_method const *
+ensc_crypto_hash_get_default(void)
+{
+       return hashFunctionDefault();
+}
+
+inline static ensc_hash_method const *
+ensc_crypto_hash_find(char const *id_c)
+{
+       char                    *id = strdupa(id_c);
+       char                    *ptr = id;
+       char const              *name;
+
+       while (*ptr) {
+               *ptr = tolower(*ptr);
+               ++ptr;
+       }
+
+       ptr = id;
+       while ((ptr=strchr(ptr, '-'))!=NULL)
+               memmove(ptr, ptr+1, strlen(ptr));
+       
+       if (strcmp(id, "md2")==0)
+               name = "MD2";
+       else if (strcmp(id, "md5")==0)
+               name = "MD5";
+       else if (strcmp(id, "sha1")==0)
+               name = "SHA-1";
+       else if (strcasecmp(id, "sha256")==0)
+               name = "SHA-256";
+#if 0
+       /* sha-384 in beecrypt seems to be broken; digestsize is reported as
+        * 64 there although 48 is the correct value */
+       else if (strcasecmp(id, "sha384")==0)
+               name = "SHA-384";
+#endif
+       else if (strcasecmp(id, "sha512")==0)
+               name = "SHA-512";
+       else
+               name = NULL;
+               
+       return hashFunctionFind(name);
+}
+
+inline static char const *
+ensc_crypto_hash_get_name(ensc_hash_method const *m)
+{
+       return m->name;
+}
+
+inline static size_t
+ensc_crypto_hash_get_digestsize(ensc_hash_method const *m)
+{
+       return m->digestsize;
+}
+
+
+
+inline static size_t
+ensc_crypto_hashctx_get_digestsize(ensc_hash_context const *ctx)
+{
+       return ensc_crypto_hash_get_digestsize(ctx->algo);
+}
+
+inline static int
+ensc_crypto_hashctx_get_digest(ensc_hash_context *ctx, void *result,
+                              size_t *res_len, size_t UNUSED max_res_len)
+{
+       int     rc = hashFunctionContextDigest(ctx, result);
+       if (res_len)
+               *res_len = ctx->algo->digestsize;
+
+       return rc;
+}
+
+inline static int
+ensc_crypto_hashctx_update(ensc_hash_context *ctx, void const *src, size_t len)
+{
+       return hashFunctionContextUpdate(ctx, src, len);
+}
+
+inline static int
+ensc_crypto_hashctx_init(ensc_hash_context *ctx, ensc_hash_method const *m)
+{
+       return hashFunctionContextInit(ctx, m);
+}
+
+inline static int
+ensc_crypto_hashctx_reset(ensc_hash_context *ctx)
+{
+       return hashFunctionContextReset(ctx);
+}
+
+inline static void
+ensc_crypto_hashctx_free(ensc_hash_context *ctx)
+{
+       hashFunctionContextFree(ctx);
+}
+
+#endif /* H_UTIL_VSERVER_LIB_INTERNAL_CRYPTO_WRAPPER_BEECRYPT_H */
diff --git a/lib_internal/crypto-wrapper-nss.h b/lib_internal/crypto-wrapper-nss.h
new file mode 100644 (file)
index 0000000..ae0128d
--- /dev/null
@@ -0,0 +1,176 @@
+/*     --*- c -*--
+ * Copyright (C) 2008 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
+ *
+ * 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; version 3 of the License.
+ *
+ * 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef H_UTIL_VSERVER_LIB_INTERNAL_CRYPTO_WRAPPER_NSS_H
+#define H_UTIL_VSERVER_LIB_INTERNAL_CRYPTO_WRAPPER_NSS_H
+
+#include <sechash.h>
+#include <secoid.h>
+#include <nss.h>
+
+#include "util-cast.h"
+
+typedef struct SECHashObjectStr                ensc_hash_method;
+typedef struct HASHContextStr          *ensc_hash_context;
+
+inline static int
+ensc_crypto_init(void)
+{
+       NSS_NoDB_Init(NULL);
+       return 0;
+}
+
+inline static ensc_hash_method const *
+ensc_crypto_hash_get_default(void)
+{
+       return HASH_GetHashObject(SEC_OID_SHA1);
+}
+
+inline static ensc_hash_method const *
+ensc_crypto_hash_find(char const *id_c)
+{
+       SECOidTag               oid;
+
+#if 1
+       char                    *id = strdupa(id_c);
+       char                    *ptr = id;
+
+       while (*ptr) {
+               *ptr = tolower(*ptr);
+               ++ptr;
+       }
+
+       ptr = id;
+       while ((ptr=strchr(ptr, '-'))!=NULL)
+               memmove(ptr, ptr+1, strlen(ptr));
+       
+       if (strcmp(id, "md2")==0)
+               oid = SEC_OID_MD2;
+       else if (strcmp(id, "md5")==0)
+               oid = SEC_OID_MD5;
+       else if (strcmp(id, "sha1")==0)
+               oid = SEC_OID_SHA1;
+       else if (strcasecmp(id, "sha256")==0)
+               oid = SEC_OID_SHA256;
+       else if (strcasecmp(id, "sha384")==0)
+               oid = SEC_OID_SHA384;
+       else if (strcasecmp(id, "sha512")==0)
+               oid = SEC_OID_SHA512;
+       else
+               oid = SEC_OID_UNKNOWN;
+               
+#else
+       struct SECItemStr const item = {
+               .type = ???,
+               .data = const_cast(unsigned char *)(static_cast(unsigned char const *)(id)),
+               .len  = strlen(id)
+       };
+       SECOidTag               oid;
+       
+       oid = SECOID_FindOIDTag(&item);
+#endif
+
+       return HASH_GetHashObjectByOidTag(oid);
+}
+
+inline static char const *
+ensc_crypto_hash_get_name(ensc_hash_method const *m)
+{
+       char const * const      NAMES[] = {
+               [HASH_AlgNULL]   = "null",
+               [HASH_AlgMD2]    = "md2",
+               [HASH_AlgMD5]    = "md5",
+               [HASH_AlgSHA1]   = "sha1",
+               [HASH_AlgSHA256] = "sha256",
+               [HASH_AlgSHA384] = "sha384",
+               [HASH_AlgSHA512] = "sha512",
+       };
+       size_t          idx = static_cast(size_t)(m->type);
+       
+       if (idx >= sizeof(NAMES)/sizeof(NAMES[0]))
+               return NULL;
+       
+       return NAMES[idx];
+       /* TODO: use SECOID_FindOIDTagDescription()? */
+}
+
+inline static size_t
+ensc_crypto_hash_get_digestsize(ensc_hash_method const *m)
+{
+       size_t const            SIZES[] = {
+               [HASH_AlgMD2]    = MD2_LENGTH,
+               [HASH_AlgMD5]    = MD5_LENGTH,
+               [HASH_AlgSHA1]   = SHA1_LENGTH,
+               [HASH_AlgSHA256] = SHA256_LENGTH,
+               [HASH_AlgSHA384] = SHA384_LENGTH,
+               [HASH_AlgSHA512] = SHA512_LENGTH,
+       };
+       size_t          idx = static_cast(size_t)(m->type);
+       
+       if (idx >= sizeof(SIZES)/sizeof(SIZES[0]))
+               return 0;
+       
+       return SIZES[idx];
+}
+
+inline static size_t
+ensc_crypto_hashctx_get_digestsize(ensc_hash_context const *ctx)
+{
+       return ensc_crypto_hash_get_digestsize((*ctx)->hashobj);
+}
+
+inline static int
+ensc_crypto_hashctx_get_digest(ensc_hash_context *ctx, void *result,
+                              size_t UNUSED *res_len_a, size_t UNUSED max_res_len)
+{
+       unsigned int    res_len;
+       
+       HASH_End(*ctx, result, &res_len, max_res_len);
+       if (res_len_a)
+               *res_len_a = res_len;
+
+       return 0;
+}
+
+inline static int
+ensc_crypto_hashctx_init(ensc_hash_context *ctx, ensc_hash_method const *m)
+{
+       *ctx = HASH_Create(m->type);
+       return *ctx==NULL ? -1 : 0;
+}
+
+inline static int
+ensc_crypto_hashctx_update(ensc_hash_context *ctx, void const *src, size_t len)
+{
+       HASH_Update(*ctx, src, len);
+       return 0;
+}
+
+inline static int
+ensc_crypto_hashctx_reset(ensc_hash_context *ctx)
+{
+       HASH_Begin(*ctx);
+       return 0;
+}
+
+inline static void
+ensc_crypto_hashctx_free(ensc_hash_context *ctx)
+{
+       HASH_Destroy(*ctx);
+       *ctx = NULL;
+}
+
+#endif /* H_UTIL_VSERVER_LIB_INTERNAL_CRYPTO_WRAPPER_NSS_H */
diff --git a/lib_internal/crypto-wrapper.h b/lib_internal/crypto-wrapper.h
new file mode 100644 (file)
index 0000000..2201bf2
--- /dev/null
@@ -0,0 +1,31 @@
+/*     --*- c -*--
+ * Copyright (C) 2008 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
+ *
+ * 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; version 2 and/or 3 of the License.
+ *
+ * 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef H_UTIL_VSERVER_LIB_INTERNAL_CRYPTO_WRAPPER_H
+#define H_UTIL_VSERVER_LIB_INTERNAL_CRYPTO_WRAPPER_H
+
+#define ENSC_CRYPTO_API_NSS            1
+#define ENSC_CRYPTO_API_BEECRYPT       2
+
+#if ENSC_CRYPTO_API == ENSC_CRYPTO_API_BEECRYPT
+#include "crypto-wrapper-beecrypt.h"
+#elif ENSC_CRYPTO_API == ENSC_CRYPTO_API_NSS
+#include "crypto-wrapper-nss.h"
+#else
+#error undefined crypto API
+#endif
+
+#endif /* H_UTIL_VSERVER_LIB_INTERNAL_CRYPTO_WRAPPER_H */
index d0e20ee..1eef1e1 100644 (file)
@@ -1,16 +1,16 @@
-// $Id: matchlist-appendfiles.c 1423 2004-04-06 08:43:20Z ensc $    --*- c -*--
+// $Id: matchlist-appendfiles.c 2608 2007-09-03 07:42:17Z ensc $    --*- c -*--
 
 // Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 
 // Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
-//  
+//
 // 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; version 2 of the License.
 // 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; version 2 of the License.
-//  
+//
 // 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.
 // 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.
 // 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.
@@ -38,17 +38,17 @@ determineCompareFunc(char const UNUSED *fname)
 
 void
 MatchList_appendFiles(struct MatchList *list, size_t idx,
 
 void
 MatchList_appendFiles(struct MatchList *list, size_t idx,
-                     char **files, size_t count,
+                     char const **files, size_t count,
                      bool auto_type)
 {
   struct MatchItem     *ptr = list->data + idx;
   size_t               i;
                      bool auto_type)
 {
   struct MatchItem     *ptr = list->data + idx;
   size_t               i;
-  
+
   assert(idx+count <= list->count);
 
   if (auto_type) {
     for (i=0; i<count; ++i) {
   assert(idx+count <= list->count);
 
   if (auto_type) {
     for (i=0; i<count; ++i) {
-      char     *file = files[i];
+      char const       *file = files[i];
       switch (file[0]) {
        case '+'        :  ptr->type = stINCLUDE; ++file; break;
        case '~'        :  ptr->type = stSKIP;    ++file; break;
       switch (file[0]) {
        case '+'        :  ptr->type = stINCLUDE; ++file; break;
        case '~'        :  ptr->type = stSKIP;    ++file; break;
index 71ec191..ecc52cb 100644 (file)
@@ -1,16 +1,16 @@
-// $Id: matchlist-initmanually.c 1954 2005-03-22 14:59:46Z ensc $    --*- c -*--
+// $Id: matchlist-initmanually.c 2608 2007-09-03 07:42:17Z ensc $    --*- c -*--
 
 // Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 
 // Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
-//  
+//
 // 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; version 2 of the License.
 // 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; version 2 of the License.
-//  
+//
 // 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.
 // 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.
 // 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.
@@ -42,13 +42,13 @@ extern bool Global_doRenew() PURE CONST;
 
 static void
 readExcludeListFD(int fd,
 
 static void
 readExcludeListFD(int fd,
-                 char ***files,  size_t *size,
+                 char const ***files,  size_t *size,
                  char **buf)
 {
   off_t                len;
   size_t       lines = 0;
   char         *ptr;
                  char **buf)
 {
   off_t                len;
   size_t       lines = 0;
   char         *ptr;
-  
+
   if (fd==-1) return; // todo: message on verbose?
 
   len = Elseek(fd, 0, SEEK_END);
   if (fd==-1) return; // todo: message on verbose?
 
   len = Elseek(fd, 0, SEEK_END);
@@ -80,7 +80,7 @@ readExcludeListFD(int fd,
       do {
        *tmp-- = '\0';
       } while (tmp>ptr && *tmp==' ');
       do {
        *tmp-- = '\0';
       } while (tmp>ptr && *tmp==' ');
-      
+
       if (tmp>ptr) (*files)[(*size)++] = ptr;
     }
 
       if (tmp>ptr) (*files)[(*size)++] = ptr;
     }
 
@@ -90,7 +90,7 @@ readExcludeListFD(int fd,
 
 static void
 readExcludeList(char const *filename,
 
 static void
 readExcludeList(char const *filename,
-               char ***files,  size_t *size,
+               char const ***files,  size_t *size,
                char **buf)
 {
   int          fd = open(filename, O_RDONLY);
                char **buf)
 {
   int          fd = open(filename, O_RDONLY);
@@ -102,10 +102,10 @@ readExcludeList(char const *filename,
 
 static void
 getConfigfileList(char const *vserver,
 
 static void
 getConfigfileList(char const *vserver,
-                 char ***files, size_t *size,
+                 char const ***files, size_t *size,
                  char **buf)
 {
                  char **buf)
 {
-  char                 tmpname[] = "/tmp/vunify.XXXXXX";
+  char         tmpname[] = "/tmp/vunify.XXXXXX";
   pid_t                pid;
   int          fd = Emkstemp(tmpname);
 
   pid_t                pid;
   int          fd = Emkstemp(tmpname);
 
@@ -115,7 +115,7 @@ getConfigfileList(char const *vserver,
   if (pid==0) {
     char       *args[10];
     char const **ptr = (char const **)(args)+0;
   if (pid==0) {
     char       *args[10];
     char const **ptr = (char const **)(args)+0;
-    
+
     Edup2(fd, 1);
     //Eclose(0);
     if (fd!=1) Eclose(fd);
     Edup2(fd, 1);
     //Eclose(0);
     if (fd!=1) Eclose(fd);
@@ -129,7 +129,7 @@ getConfigfileList(char const *vserver,
   }
   else {
     int                status;
   }
   else {
     int                status;
-    
+
     if (TEMP_FAILURE_RETRY(wait4(pid, &status, 0,0))==-1) {
       perror("wait4()");
       exit(1);
     if (TEMP_FAILURE_RETRY(wait4(pid, &status, 0,0))==-1) {
       perror("wait4()");
       exit(1);
@@ -151,11 +151,11 @@ MatchList_initManually(struct MatchList *list,
                       char const *vdir, char const *exclude_file)
 {
   char                 *buf[2] = { 0,0 };
                       char const *vdir, char const *exclude_file)
 {
   char                 *buf[2] = { 0,0 };
-  
-  char                 **fixed_files = 0;
+
+  char const           **fixed_files = 0;
   size_t               fixed_count   = 0;
 
   size_t               fixed_count   = 0;
 
-  char                 **expr_files  = 0;
+  char const           **expr_files  = 0;
   size_t               expr_count    = 0;
   size_t               len;
 
   size_t               expr_count    = 0;
   size_t               len;
 
@@ -167,7 +167,7 @@ MatchList_initManually(struct MatchList *list,
   }
   else
     len  = strlen(vdir);
   }
   else
     len  = strlen(vdir);
-  
+
   if (Global_getVerbosity()>=1) {
     WRITE_MSG(1, "Initializing exclude-list for ");
     Vwrite(1, vdir, len);
   if (Global_getVerbosity()>=1) {
     WRITE_MSG(1, "Initializing exclude-list for ");
     Vwrite(1, vdir, len);
index ea01702..1dd3e9d 100644 (file)
@@ -1,16 +1,16 @@
-// $Id: matchlist.h 1912 2005-03-18 00:20:02Z ensc $    --*- c -*--
+// $Id: matchlist.h 2608 2007-09-03 07:42:17Z ensc $    --*- c -*--
 
 // Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 
 // Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
-//  
+//
 // 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; version 2 of the License.
 // 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; version 2 of the License.
-//  
+//
 // 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.
 // 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.
 // 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.
@@ -52,12 +52,12 @@ struct MatchList
 
 struct MatchVserverInfo
 {
 
 struct MatchVserverInfo
 {
-    char const                 *name;
+    char const         *name;
 
     vcCfgStyle         style;
     PathInfo           vdir;
     PathInfo           appdir;
 
     vcCfgStyle         style;
     PathInfo           vdir;
     PathInfo           appdir;
-    
+
     bool               use_pkgmgmt;
 };
 
     bool               use_pkgmgmt;
 };
 
@@ -73,7 +73,7 @@ void          MatchList_initRefserverList(struct MatchList **, size_t *cnt,
                                            char const *dir) NONNULL((1,2,3));
 void           MatchList_destroy(struct MatchList *) NONNULL((1));
 void           MatchList_appendFiles(struct MatchList *, size_t idx,
                                            char const *dir) NONNULL((1,2,3));
 void           MatchList_destroy(struct MatchList *) NONNULL((1));
 void           MatchList_appendFiles(struct MatchList *, size_t idx,
-                                     char **files, size_t count,
+                                     char const **files, size_t count,
                                      bool auto_type) NONNULL((1,3));
 
 MatchType      MatchList_compare(struct MatchList const *,
                                      bool auto_type) NONNULL((1,3));
 
 MatchType      MatchList_compare(struct MatchList const *,
index 717de0e..c7fc156 100644 (file)
@@ -1,4 +1,4 @@
-// $Id$    --*- c -*--
+// $Id: mkdir.c 2674 2008-01-27 07:55:13Z dhozac $    --*- c -*--
 
 // Copyright (C) 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 //  
 
 // Copyright (C) 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 //  
index 05cc4d7..1d3bceb 100644 (file)
@@ -1,4 +1,4 @@
-// $Id$    --*- c -*--
+// $Id: sys_unshare.h 2674 2008-01-27 07:55:13Z dhozac $    --*- c -*--
 
 // Copyright (C) 2007 Daniel Hokka Zakrisson
 //  
 
 // Copyright (C) 2007 Daniel Hokka Zakrisson
 //  
@@ -81,7 +81,7 @@ _syscall1(int, sys_unshare, int, flags)
 inline static UNUSED ALWAYSINLINE
 int sys_unshare(int flags)
 {
 inline static UNUSED ALWAYSINLINE
 int sys_unshare(int flags)
 {
-  return syscall(__NR_sys_clone, flags);
+  return syscall(__NR_sys_unshare, flags);
 }
 #endif
 
 }
 #endif
 
index 7bf6ddd..a6da5cd 100644 (file)
@@ -1,4 +1,4 @@
-## $Id: Makefile-files 2569 2007-07-22 17:24:29Z dhozac $      --*- makefile -*--
+## $Id: Makefile-files 2685 2008-02-21 23:22:23Z ensc $        --*- makefile -*--
 
 ## Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 ##  
 
 ## Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 ##  
@@ -36,10 +36,21 @@ TESTS +=                    lib_internal/testsuite/filecfg-ml \
                                lib_internal/testsuite/matchlist-gnu
 endif
 
                                lib_internal/testsuite/matchlist-gnu
 endif
 
+if ENSC_HAVE_CRYPTO
+check_PROGRAMS +=              lib_internal/testsuite/crypto \
+                               lib_internal/testsuite/crypto-speed
+TESTS +=                       lib_internal/testsuite/crypto
+endif
+
 DIETPROGS +=                   lib_internal/testsuite/isnumber \
                                lib_internal/testsuite/sigbus \
                                lib_internal/testsuite/matchlist
 
 DIETPROGS +=                   lib_internal/testsuite/isnumber \
                                lib_internal/testsuite/sigbus \
                                lib_internal/testsuite/matchlist
 
+if ENSC_CAN_CRYPTO_WITH_DIETLIBC
+DIETPROGS +=                   lib_internal/testsuite/crypto \
+                               lib_internal/testsuite/crypto-speed
+endif
+
 EXTRA_DIST +=                  lib_internal/testsuite/copy-check
 
 TESTS_ENVIRONMENT +=           libinternaltestsuitedir=$(top_builddir)/lib_internal/testsuite
 EXTRA_DIST +=                  lib_internal/testsuite/copy-check
 
 TESTS_ENVIRONMENT +=           libinternaltestsuitedir=$(top_builddir)/lib_internal/testsuite
@@ -79,3 +90,18 @@ lib_internal_testsuite_matchlist_CPPFLAGS =  $(AM_CPPFLAGS)          # see note above
 lib_internal_testsuite_matchlist_gnu_SOURCES = lib_internal/testsuite/matchlist.c
 lib_internal_testsuite_matchlist_gnu_LDADD =   $(LIBINTERNAL_GLIBC)
 lib_internal_testsuite_matchlist_gnu_CPPFLAGS =        $(AM_CPPFLAGS)          # see note above
 lib_internal_testsuite_matchlist_gnu_SOURCES = lib_internal/testsuite/matchlist.c
 lib_internal_testsuite_matchlist_gnu_LDADD =   $(LIBINTERNAL_GLIBC)
 lib_internal_testsuite_matchlist_gnu_CPPFLAGS =        $(AM_CPPFLAGS)          # see note above
+
+if ENSC_HAVE_CRYPTO
+lib_internal_testsuite_crypto_speed_SOURCES =  lib_internal/testsuite/crypto-speed.c
+lib_internal_testsuite_crypto_speed_CFLAGS =   $(AM_CFLAGS) $(ENSC_CRYPTO_CFLAGS)
+lib_internal_testsuite_crypto_speed_LDADD =    $(ENSC_CRYPTO_LIB) -lrt
+
+lib_internal_testsuite_crypto_SOURCES =                lib_internal/testsuite/crypto.c
+lib_internal_testsuite_crypto_CFLAGS =         $(AM_CFLAGS) $(ENSC_CRYPTO_CFLAGS)
+lib_internal_testsuite_crypto_LDADD =          $(ENSC_CRYPTO_LIB)
+
+if !ENSC_CAN_CRYPTO_WITH_DIETLIBC
+lib_internal_testsuite_crypto_speed_LDFLAGS =  -Wl,--as-needed
+lib_internal_testsuite_crypto_LDFLAGS =                -Wl,--as-needed
+endif
+endif
diff --git a/lib_internal/testsuite/crypto-speed.c b/lib_internal/testsuite/crypto-speed.c
new file mode 100644 (file)
index 0000000..0672a27
--- /dev/null
@@ -0,0 +1,112 @@
+/*     --*- c -*--
+ * Copyright (C) 2008 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
+ *
+ * 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; version 2 and/or 3 of the License.
+ *
+ * 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#define ENSC_TESTSUITE
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <lib_internal/crypto-wrapper.h>
+#include <lib_internal/coreassert.h>
+#include <time.h>
+#include <locale.h>
+
+
+static void
+do_benchmark(char const *meth_name)
+{
+       struct {
+               size_t          block_size;
+               size_t          blocks;
+       } const                 DATA_SIZES[] = {
+               { 0,  1 },
+               { 0,  1024*1024 },
+               { 16, 1 },
+               { 16, 1024*1024 },
+               { 1024, 16 },
+               { 1024, 16*1024 },
+               { 1024*1024, 16 },
+               { 1024*1024, 100 },
+               { 1024*1024, 1000 }
+       };
+               
+       ensc_hash_method const  *m = ensc_crypto_hash_find(meth_name);
+       ensc_hash_context       ctx;
+       size_t                  d_len = m ? ensc_crypto_hash_get_digestsize(m) : 0;
+       char                    digest[d_len];
+       char *                  buf;
+       size_t                  i;
+
+       assert(m);
+       assert(ensc_crypto_hashctx_init(&ctx, m)==0);
+
+       for (i=0; i<sizeof(DATA_SIZES)/sizeof(DATA_SIZES[0]); ++i) {
+               size_t          cnt = DATA_SIZES[i].blocks;
+               size_t const    bs  = DATA_SIZES[i].block_size;
+               struct timespec tm_start, tm_end, delta;
+               uint64_t        bps;
+
+               buf = malloc(bs+1);     /* avoid malloc-0 confusions */
+               assert(buf);
+
+               memset(buf, 0x11, bs);
+
+               ensc_crypto_hashctx_reset(&ctx);
+
+               /* benchmarked code starts here... */
+               clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &tm_start);
+               while (cnt--)
+                       ensc_crypto_hashctx_update(&ctx, buf, bs);
+
+               ensc_crypto_hashctx_get_digest(&ctx, digest, NULL, d_len);
+               clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &tm_end);
+               /* ... and ends here */
+
+               delta.tv_sec = tm_end.tv_sec - tm_start.tv_sec;
+               if (tm_end.tv_nsec < tm_start.tv_nsec) {
+                       --delta.tv_sec;
+                       tm_end.tv_nsec += 1000000000l;
+               }
+               delta.tv_nsec = tm_end.tv_nsec - tm_start.tv_nsec;
+
+               if (delta.tv_nsec==0 && delta.tv_sec==0)
+                       delta.tv_nsec = 1;
+
+               bps = (uint64_t)(DATA_SIZES[i].blocks) * bs * 1000000000;
+               bps /= (uint64_t)(delta.tv_sec) * 1000000000 + delta.tv_nsec;
+
+               printf("%6s: %7zu x %-7zu -> %2lu.%09lus, %'15llu bytes/s\n",
+                      meth_name, DATA_SIZES[i].blocks, bs,
+                      delta.tv_sec, delta.tv_nsec, (unsigned long long)(bps));
+       }
+
+       ensc_crypto_hashctx_free(&ctx);
+}
+
+int main()
+{
+       char const * const      METHS[] = {
+               "md5", "sha1", "sha256", "sha512", NULL
+       };
+       char const * const *    meth;
+       
+       ensc_crypto_init();
+       setlocale(LC_NUMERIC, "");      /* needed for the thousands grouping */
+
+       for (meth=METHS+0; *meth; ++meth)
+               do_benchmark(*meth);
+}
diff --git a/lib_internal/testsuite/crypto.c b/lib_internal/testsuite/crypto.c
new file mode 100644 (file)
index 0000000..5b11f97
--- /dev/null
@@ -0,0 +1,164 @@
+/*     --*- c -*--
+ * Copyright (C) 2008 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
+ *
+ * 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; version 2 and/or 3 of the License.
+ *
+ * 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#define ENSC_TESTSUITE
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <lib_internal/crypto-wrapper.h>
+#include <lib_internal/coreassert.h>
+
+static unsigned int
+hex2digit(char c)
+{
+       if (c>='0' && c<='9')
+               return c-'0';
+       c &= ~0x20;
+       if (c>='A' && c<='F')
+               return c-'A' + 10;
+
+       assert(0);
+       return 0;
+}
+
+static void
+convert_digest_ascii2bin(void *dst_v, char const *digest, size_t d_len)
+{
+       unsigned char   *dst = dst_v;
+       
+       while (d_len>0) {
+               *dst  = hex2digit(*digest++)<<4;
+               *dst |= hex2digit(*digest++);
+
+               ++dst;
+               --d_len;
+       }
+}
+
+static void
+test_digest(char const *name, size_t d_len,
+           void const *buf,  size_t buf_len,
+           char const *digest)
+{
+       ensc_hash_method const  *m = ensc_crypto_hash_find(name);
+       ensc_hash_context       ctx;
+       unsigned char           *exp_digest[d_len/8];
+       unsigned char           *bin_digest[d_len/8];
+       size_t                  bin_digest_len;
+       size_t                  i;
+
+       d_len /= 8;
+       convert_digest_ascii2bin(exp_digest, digest, d_len);
+
+       assert(m);
+       assert(ensc_crypto_hash_get_digestsize(m)==d_len);
+
+       {
+               char const              *tmp_name = ensc_crypto_hash_get_name(m);
+               ensc_hash_method const  *tmp_meth = tmp_name ? ensc_crypto_hash_find(tmp_name) : NULL;
+
+               assert(tmp_name!=NULL);
+               assert(tmp_meth!=NULL);
+               assert(ensc_crypto_hash_get_digestsize(tmp_meth)==d_len);
+       }
+
+       ensc_crypto_hashctx_init(&ctx, m);
+       assert(ensc_crypto_hashctx_get_digestsize(&ctx)==d_len);
+
+       /* run it multiple times to test for correct reset/init behavior */
+       for (i=0; i<3; ++i) {
+               assert(ensc_crypto_hashctx_reset(&ctx)==0);
+               assert(ensc_crypto_hashctx_update(&ctx, buf, buf_len)==0);
+
+               switch (i) {
+               case 0:
+               case 2:
+                       break;
+
+               case 1:
+                       assert(ensc_crypto_hashctx_update(&ctx, "gremlin", 7)==0);
+                       break;
+               }
+
+               assert(ensc_crypto_hashctx_get_digest(&ctx, bin_digest, &bin_digest_len, d_len)==0);
+               assert(bin_digest_len==d_len);
+
+               
+               switch (i) {
+               case 0:
+               case 2:
+                       assert(memcmp(exp_digest, bin_digest, d_len)==0);
+                       break;
+
+               case 1:
+                       assert(memcmp(exp_digest, bin_digest, d_len)!=0);
+                       break;
+               }
+       }
+
+       ensc_crypto_hashctx_free(&ctx);
+}
+
+int main()
+{
+       ensc_crypto_init();
+       assert(ensc_crypto_hash_get_default()!=NULL);
+
+       /* MD-5 */
+
+       test_digest("md5",  128, "",    0, "d41d8cd98f00b204e9800998ecf8427e");
+       test_digest("md-5", 128, "",    0, "d41d8cd98f00b204e9800998ecf8427e");
+       test_digest("MD5",  128, "",    0, "d41d8cd98f00b204e9800998ecf8427e");
+       test_digest("MD-5", 128, "",    0, "d41d8cd98f00b204e9800998ecf8427e");
+
+       test_digest("md5",  128, "foo", 3, "acbd18db4cc2f85cedef654fccc4a4d8");
+       
+       /* SHA-1 */
+       test_digest("sha1",  160, "",    0, "da39a3ee5e6b4b0d3255bfef95601890afd80709");
+       test_digest("sha-1", 160, "",    0, "da39a3ee5e6b4b0d3255bfef95601890afd80709");
+       test_digest("SHA1",  160, "",    0, "da39a3ee5e6b4b0d3255bfef95601890afd80709");
+       test_digest("SHA-1", 160, "",    0, "da39a3ee5e6b4b0d3255bfef95601890afd80709");
+       
+       test_digest("sha1",  160, "foo", 3, "0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33");
+
+       /* SHA-256 */
+       test_digest("sha256",  256, "",    0, "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855");
+       test_digest("sha-256", 256, "",    0, "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855");
+       test_digest("SHA256",  256, "",    0, "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855");
+       test_digest("SHA-256", 256, "",    0, "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855");
+
+       test_digest("sha256",  256, "foo", 3, "2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae");
+
+#if ENSC_CRYPTO_API != ENSC_CRYPTO_API_BEECRYPT         /* see comments in crypto-wrapper-beecrypt.h */
+       /* SHA-384 */
+       test_digest("sha384",  384, "",    0, "38b060a751ac96384cd9327eb1b1e36a21fdb71114be07434c0cc7bf63f6e1da274edebfe76f65fbd51ad2f14898b95b");
+       test_digest("sha-384", 384, "",    0, "38b060a751ac96384cd9327eb1b1e36a21fdb71114be07434c0cc7bf63f6e1da274edebfe76f65fbd51ad2f14898b95b");
+       test_digest("SHA384",  384, "",    0, "38b060a751ac96384cd9327eb1b1e36a21fdb71114be07434c0cc7bf63f6e1da274edebfe76f65fbd51ad2f14898b95b");
+       test_digest("SHA-384", 384, "",    0, "38b060a751ac96384cd9327eb1b1e36a21fdb71114be07434c0cc7bf63f6e1da274edebfe76f65fbd51ad2f14898b95b");
+
+       test_digest("sha384",  384, "foo", 3, "98c11ffdfdd540676b1a137cb1a22b2a70350c9a44171d6b1180c6be5cbb2ee3f79d532c8a1dd9ef2e8e08e752a3babb");
+#endif
+
+       /* SHA-512 */
+       test_digest("sha512",  512, "",    0, "cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e");
+       test_digest("sha-512", 512, "",    0, "cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e");
+       test_digest("SHA512",  512, "",    0, "cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e");
+       test_digest("SHA-512", 512, "",    0, "cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e");
+
+       test_digest("sha512",  512, "foo", 3, "f7fbba6e0636f890e56fbbf3283e524c6fa3204ae298382d624741d0dc6638326e282c41be5e4254d8820772c5518a2c5a8c0c7f7eda19594a7eb539453e1ed7");
+}
index d469345..979f712 100644 (file)
@@ -1,4 +1,4 @@
-// $Id$    --*- c -*--
+// $Id: matchlist.c 2680 2008-02-21 22:33:21Z ensc $    --*- c -*--
 
 // Copyright (C) 2007 Daniel Hokka Zakrisson
 //  
 
 // Copyright (C) 2007 Daniel Hokka Zakrisson
 //  
@@ -28,7 +28,7 @@
 
 int wrapper_exit_code = 255;
 
 
 int wrapper_exit_code = 255;
 
-int main(int argc, char *argv[])
+int main()
 {
        struct MatchList list;
        static const char *files[] = {
 {
        struct MatchList list;
        static const char *files[] = {
@@ -61,7 +61,7 @@ int main(int argc, char *argv[])
                return 0;
        else {
                char buf[(sizeof(result) * 8) / 3 + 2], *ptr;
                return 0;
        else {
                char buf[(sizeof(result) * 8) / 3 + 2], *ptr;
-               ssize_t i;
+               size_t i;
                WRITE_MSG(1, "result = ");
                buf[sizeof(buf) - 1] = '\0';
                for (i = 0, ptr = buf + sizeof(buf) - 2; i < (sizeof(result) * 8); i += 3, ptr--)
                WRITE_MSG(1, "result = ");
                buf[sizeof(buf) - 1] = '\0';
                for (i = 0, ptr = buf + sizeof(buf) - 2; i < (sizeof(result) * 8); i += 3, ptr--)
index 061ba3d..d70b9f5 100644 (file)
@@ -1,4 +1,4 @@
-// $Id: util-io.h 1954 2005-03-22 14:59:46Z ensc $    --*- c -*--
+// $Id: util-io.h 2650 2008-01-03 15:30:17Z dhozac $    --*- c -*--
 
 // Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 //  
 
 // Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 //  
@@ -21,6 +21,7 @@
 
 #include <unistd.h>
 #include <string.h>
 
 #include <unistd.h>
 #include <string.h>
+#include "ensc_fmt/fmt.h"
 
 inline static void UNUSED
 Vwrite(int fd, char const *buf, size_t len)
 
 inline static void UNUSED
 Vwrite(int fd, char const *buf, size_t len)
@@ -34,6 +35,17 @@ writeStr(int fd, char const *cmd)
   Vwrite(fd, cmd, strlen(cmd));
 }
 
   Vwrite(fd, cmd, strlen(cmd));
 }
 
+inline static void UNUSED
+WRITE_INT(int fd, int num)
+{
+  char   buf[sizeof(num)*3+2];
+  size_t l;
+
+  l = utilvserver_fmt_long(buf,num);
+
+  Vwrite(fd, buf, l);
+}
+
 #define WRITE_MSG(FD,X)                Vwrite(FD,X,sizeof(X)-1)
 #define WRITE_STR(FD,X)                writeStr(FD,X)
 
 #define WRITE_MSG(FD,X)                Vwrite(FD,X,sizeof(X)-1)
 #define WRITE_STR(FD,X)                writeStr(FD,X)
 
index 963c3b8..f270ec4 100644 (file)
@@ -1,4 +1,4 @@
-// $Id: util-lockfile.c 1616 2004-07-02 23:34:52Z ensc $    --*- c -*--
+// $Id: util-lockfile.c 2678 2008-02-16 22:09:30Z dhozac $    --*- c -*--
 
 // Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 //  
 
 // Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 //  
@@ -61,8 +61,8 @@ lockfile(int *fd, char const *filename, int op, long timeout,
     alarm(timeout);
   }
 
     alarm(timeout);
   }
 
-  errstr = "flock()";
-  while (flock(*fd, op)==-1) {
+  errstr = "lockf()";
+  while (lockf(*fd, op, 0)==-1) {
     if ((errno!=EINTR && errno!=EINTR) || alarm_flag) goto err;
   }
 
     if ((errno!=EINTR && errno!=EINTR) || alarm_flag) goto err;
   }
 
index 541cc9d..36b786a 100644 (file)
@@ -1,16 +1,16 @@
-// $Id: util-safechdir.h 934 2004-02-18 04:42:38Z ensc $    --*- c -*--
+// $Id: util-safechdir.h 2608 2007-09-03 07:42:17Z ensc $    --*- c -*--
 
 // Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 
 // Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
-//  
+//
 // 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; version 2 of the License.
 // 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; version 2 of the License.
-//  
+//
 // 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.
 // 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.
 // 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.
@@ -19,7 +19,8 @@
 #ifndef H_UTIL_VSERVER_LIB_INTERNAL_UTIL_SAFECHDIR_H
 #define H_UTIL_VSERVER_LIB_INTERNAL_UTIL_SAFECHDIR_H
 
 #ifndef H_UTIL_VSERVER_LIB_INTERNAL_UTIL_SAFECHDIR_H
 #define H_UTIL_VSERVER_LIB_INTERNAL_UTIL_SAFECHDIR_H
 
-struct stat;
+#include <sys/stat.h>
+
 int    safeChdir(char const *, struct stat const *exp_stat) NONNULL((1,2));
 
 #define EsafeChdir(PATH,EXP_STAT) \
 int    safeChdir(char const *, struct stat const *exp_stat) NONNULL((1,2));
 
 #define EsafeChdir(PATH,EXP_STAT) \
index 12996ca..6fea6b0 100644 (file)
@@ -1,4 +1,4 @@
-## $Id: Makefile-files 1192 2004-03-10 02:30:34Z ensc $  -*- makefile -*-
+## $Id: Makefile-files 2631 2007-10-27 19:34:50Z dhozac $  -*- makefile -*-
 
 ## Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 ##  
 
 ## Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 ##  
@@ -28,6 +28,13 @@ man_pages            =  man/chbind.8 \
                           man/vserver-stat.8 \
                           man/vserver.8 \
                           man/vtop.8
                           man/vserver-stat.8 \
                           man/vserver.8 \
                           man/vtop.8
+man_susbt_SRCS =       man/vserver-build.8.pathsubst
+man_gen_DTA =          man/vserver-build.8
 
 
-man_MANS +=            $(man_pages)
-EXTRA_DIST +=          $(man_pages)
+man_MANS +=            $(man_pages) \
+                       $(man_gen_DTA)
+EXTRA_DIST +=          $(man_pages) \
+                       $(man_susbt_SRCS)
+CLEANFILES +=          $(man_gen_DTA)
+
+man/vserver-build.8:   man/.vserver-build.8.pathsubst.stamp
diff --git a/man/vserver-build.8.pathsubst b/man/vserver-build.8.pathsubst
new file mode 100644 (file)
index 0000000..e989d06
--- /dev/null
@@ -0,0 +1,173 @@
+.TH VSERVER-BUILD "8" "October 27, 2007" "vserver-build" "System Administration"
+.SH "NAME"
+vserver-build \- initializes a vserver
+.SH SYNTAX
+.B vserver-build
+\fB\-m\fR \fImethod\fR \fB\-n\fR \fIname\fR [\fB\-\-force\fR] [\fB\-\-keep\fR]
+[\fB\-\-rootdir\fR \fIdir\fR] [\fB\-\-pkgbase\fR \fIdir\fR]
+\fIconfig options*\fR [\fB\-\-\fR] \fImethod arguments*\fR
+.TP
+\fB\-m\fR \fImethod\fR
+Use build \fImethod\fR; see below for possible values.
+.TP
+\fB\-n\fR \fIname\fR
+Name of vserver you are building.
+.TP
+\fB\-\-force\fR 
+Remove/rename already existing vservers with the same name.
+.TP
+\fB\-\-keep\fR 
+Do not delete generated files and directories if vserver build fails.
+.TP
+\fB\-\-rootdir\fR \fIdir\fR
+Root vserver directory [default: @SYSCONFDIR@/vservers/.defaults/vdirbase].
+.TP
+\fB\-\-pkgbase\fR \fIdir\fR
+Package base directory [default: @VSERVERDIR@/.pkg].
+.SH "CONFIG OPTIONS"
+.TP
+\fB\-\-context\fR \fInum\fR
+.IP
+\&The static context of the vserver [default: none; one will be generated for you].
+The valid range is 2 through 49151.
+.TP
+\fB\-\-confdir\fR \fIdir\fR
+.IP
+\&The vserver configuration directory to use [default: @SYSCONFDIR@/vservers/<name>].
+.TP
+\fB\-\-lockfile\fR \fIfilename\fR
+.IP
+\&The lockfile to use [default: /var/run/vservers/<name>].
+.TP
+\fB\-\-hostname\fR \fIhostname\fR
+.IP
+\&Hostname of the vserver.
+.TP
+\fB\-\-netdev\fR \fIdevice\fR
+.IP
+\&The default interface to use for \fB--interface\fR.
+.TP
+\fB\-\-netbcast\fR \fIbroadcast\fR
+.IP
+\&Broadcast address to associate with the vserver.
+.TP
+\fB\-\-netmask\fR \fInetmask\fR|\fB\-\-netprefix\fR \fIprefixlen\fR
+.IP
+\&Sets the default netmask (a.b.c.d quadruple) or prefixlen (length of the
+network).
+.TP
+\fB\-\-interface\fR [\fIname\-suffix\fR=][\fIdevice\fR:]\fIip\fR[/\fImask|prefixlen\fR]
+.IP
+\&Declares a network\-interface name and associated IP/netmask; this option can
+be specified multiple times.
+.TP
+\fB\-\-flags\fR \fIflags+\fR
+.IP
+\&Sets comma\-separated list of flags; see lib/cflags-v13.c for a list.
+.TP
+\fB\-\-cpuset\fR \fIname\fR
+.IP
+\&Declares the CPUSET this vserver will run in [default: none]
+.TP
+\fB\-\-cpusetcpus\fR \fInumber[\-number][:exclusive]\fR
+.IP
+\&Sets which CPUs belong to the CPUSET, \fI:exclusive\fR is a flag (0|1)
+prohibiting any other cpuset from using those CPUs.
+.TP
+\fB\-\-cpusetmems\fR \fInumber[\-number][:exclusive]\fR
+.IP
+\&Sets which memory pools belong to the CPUSET, \fI:exclusive\fR is a flag
+(0|1) prohibiting any other cpuset from using those memory pools.
+.TP
+\fB\-\-cpusetvirt\fR
+.IP
+\&Virtualize the cpuset (the vserver will see only CPUs defined in the cpuset).
+Requires kernel patch from http://www.bullopensource.org/cpuset/
+.TP
+\fB\-\-initstyle\fR \fIstyle\fR
+.IP
+\&Configures the initstyle (e.g. minit, sysv, plain, gentoo)
+.SH "METHODS"
+.TP
+\fBapt\-rpm\fR
+.IP
+\& \fB\-\-\fR \fB\-d\fR \fIdistribution\fR
+
+\&Installs the base\-packages of the given distribution with the help of
+'\fBvapt\-get\fR'
+.TP
+\fByum\fR
+.IP
+\&\fB\-\-\fR \fB\-d\fR \fIdistribution\fR
+
+\&Installs the base\-packages of the given distribution with help of
+'\fBvyum\fR'
+.TP
+\fBrpm\fR
+.IP
+\&\fB\-\-\fR [\fB\-d\fR \fIdistribution\fR] \fB\-\-empty\fR|([\fB\-\-force\fR] [\fB\-\-nodeps\fR] \fImanifest\fR)+
+
+\&Installs lists of rpm\-packages
+.TP
+\fBskeleton\fR
+.IP
+\&\fB\-\-\fR [\fIcmd args*\fR]
+
+\&Installs a minimal skeleton filesystem, creates the configuration file
+and calls an optional command
+.TP
+\fBdebootstrap\fR
+.IP
+\fB\-\-\fR \fB\-d\fR \fIdistribution\fR [\fB\-m\fR \fImirror\fR] [\fB\-s\fR \fIscript\fR] [\fB\-\-\fR \fIdebootstrap\-options*\fR]
+
+\&Bootstraps the vserver with Debian's 'debootstrap' package
+.TP
+\fBtemplate\fR
+.IP
+\&\fB\-\-\fR (\fB\-t\fR \fItarball\fR)+ [\fB\-d\fR \fIdistribution\fR]
+
+\&Installs a vserver using tarball(s)
+.TP
+\fBfai\fR
+.IP
+\&\fB\-\-\fR [\fB\-f\fR \fIfai_vserver\fR] [\fB\-n\fR \fInfsroot\fR] [\fB\-d\fR \fIfai_dir\fR] [\fB\-a\fR]
+
+\&Bootstraps the vserver with the Debian Fully Automatic Installation
+
+\fB\-f\fR means use the nfsroot and profile in the vserver \fIfai_vserver\fR
+
+\fB\-n\fR \fInfsroot\fR specifies the 'NFS' root explicitly
+
+\fB\-d\fR \fIfai_dir\fR specifies the location of the FAI profile
+
+the \fB\-f\fR option implies \fB\-n\fR and \fB\-d\fR are relative to the \fIfai_vserver\fR
+.TP
+\fBrsync\fR
+.IP
+\&\fB\-\-\fR [\fB\-d\fR \fIdistribution\fR] \fB\-\-source\fR \fIsource\fR [\fB\-o\fR \fIrsync option\fR]*
+
+\&Installs a vserver by rsyncing from \fIsource\fR to the guest root
+.TP
+\fBclone\fR
+.IP
+\&\fB\-\-\fR [\fB\-d\fR \fIdistribution\fR] \fB\-\-source\fR \fIsource\fR
+
+\&Clones a vserver by linking unified files and copying the rest
+.SH "EXAMPLES"
+.LP
+# vserver kea build -m debootstrap --context 10 --hostname kea --interface eth0:192.168.0.44/32 -- -d etch
+.SH "BUGS"
+.LP
+Please report bugs to vserver@list.linux\-vserver.org
+.SH "AUTHORS"
+.LP
+This man page was written by Micah Anderson <micah@debian.org> and based upon the helpful output from the program itself.
+.SH "SEE ALSO"
+.PP
+ chbind(8) chcontext(8)
+ rebootmgr(8) reducecap(8)
+ vps(8) vpstree(8)
+ vrpm(8)
+ vserver\-stat(8)
+ vtop(8)
+
index 6ea2052..c1c6702 100644 (file)
-.TH "vserver" "8" "0.1.0" "Klavs Klavsen <kl@vsen.dk>" "System Administration"
+.TH VSERVER 8 "October 24, 2007" "util-vserver" "System Administration"
 .SH "NAME"
 .LP 
 .SH "NAME"
 .LP 
-vserver \- The vserver utility enables you to control different aspects of your vservers.
-.SH "SYNTAX"
-.LP 
-vserver [ options ] [vserver name] [options]
-
-.SH "DESCRIPTION"
-.LP 
-vserver \- The vserver utility enables you to control different aspects of your vservers, such as stopping and starting them, and services within them.
-.SH "OPTIONS"
-.LP 
-.TP 
-\fBbuild\fR Create a virtual server by copying the packages of the root server
-.TP 
-\fBenter\fR Enter in the virtual server context and starts a shell. Same as "vserver name exec /bin/sh\".
-.TP 
-\fBexec\fR Exec a command in the virtual server context as root.
-syntax: vserver name exec command ...
-.TP 
-\fBsuexec\fR Exec a command in the virtual server context under some user id.
-syntax: vserver name suexec userid command ...
-.TP 
-\fBservice\fR Control a service inside a vserver. 
-syntax: vserver name service service\-name (start/stop/restart etc.)
-.TP 
-\fBstart\fR Starts the various services in the vserver.
-It uses the default runlevel found in the
-.B /etc/inittab
-file of the vserver.
-.TP 
-\fBstop\fR Ends all services and kills the remaining processes.
-.TP 
-\fBrunning\fR Tells if a virtual server is running. It returns proper exit code, so you can use it as a test.
-.TP
-\fBstatus\fR Tells various information about the state of a virtual server:
-running status, number of running processes and uptime.
-.TP
-.I --nodev
-do not configure the IP devices associated with the vserver. This
-is useful to execute some commands on the vserver (or enter it)
-without making it active on the network. Especially useful if you
-have an active copy of the vserver moved to another server on the
-network.
-.TP
-.I --silent
-cuts most informative messages.
-
+vserver \- The vserver utility enables you to manage the state of vservers, including building, starting, stopping, etc.
+.SH SYNTAX
+.B vserver
+[\fB-s|--sync\fR] [\fB-v|--verbose\fR] [\fB--silent\fR] [\-\-] \fIvserver\fR \fIcommand\fR [\fB--help\fR] \fIargs*\fR
+.TP
+\fB\-\-sync\fR - Perform synchronization with vshelper to ensure that the guest has been stopped
+.TP
+\fB\-\-verbose\fR - Makes things a lot louder.
+.TP
+\fB\-\-silent\fR - Removes most informative messages.
+.TP
+\fIvserver\fR - The name of a vserver.
+.TP
+\fIcommand\fR - One of the commands listed below.
+.TP
+\fB\-\-help\fR 
+.IP
+provides additional help for provided \fIcommand\fR, for example: vserver - build --help
+\fIargs\fR are the arguments that are possible for the different commands, see the
+arguments for each \fIcommand\fR listed below
+.SH "COMMANDS"
+.TP
+\fBstart\fR [\fB\-\-rescue\fR [\fB\-\-rescue\-init\fR] \fIprogram args\fR] 
+.IP
+\&Starts the specified vserver. The optional argument \fB--rescue\fR starts the
+vserver in rescue mode, which runs \fIprogram args*\fR to start the vserver
+instead of whatever is configured. The optional argument \fB--rescue-init\fR
+makes the command appear as PID 1 in the vserver. This can be used to start
+/bin/bash to investigate why a vserver is not able to start correctly.
+.TP
+\fBstop\fR [\fB\-\-rescue\-init\fR]
+.IP
+\&Stops the specified vserver, and kills the remaining processes. The optional
+argument \fB--rescue-init\fR can be used to stop a vserver that was started
+with the option of the same name.
+.TP
+\fBrestart\fR
+.IP
+\&Restarts the specified vserver. This is the subsequent execution of a
+synchronized 'stop' and a 'start'.
+.TP
+\fBcondrestart\fR
+.IP
+\&Restarts a running vserver.
+.TP
+\fBsuexec\fR \fIuser\fR \fIprogram args*\fR
+.IP
+\&Executes \fIprogram args*\fR as the specified \fIuser\fR in the vserver.
+.TP
+\fBexec\fR \fIprogram args*\fR
+.IP
+\&Executes \fIprogram args*\fR as the root user in the vserver.
+.TP
+\fBenter\fR
+.IP
+\&Executes the configured shell (default: /bin/bash if it exists) in the
+vserver and allocates a pty.
+.TP
+\fBchkconfig\fR \fIchkconfig\-options*\fR
+.IP
+\&Modifies the init\-system; currently, only Red Hat's \fBchkconfig\fR is
+supported.
+.TP
+\fBrunning\fR
+.IP
+\&Returns an exit code of 0 iff the vserver is running, 1 if not.
+.TP
+\fBstatus\fR
+.IP
+\&Provides some human readable status information about the vserver, and
+succeeds iff the vserver is running.
+.TP
+\fBbuild\fR \fIbuildopts*\fR
+.IP
+\&Create a vserver from scratch, where the \fIbuildopts*\fR are a set of
+options and a build method. As this option calls vserver-build, please see
+vserver-build(8) for a complete listing of possible options and methods.
+.TP
+\fBdelete\fR
+.IP
+\&Remove a vserver.
+.TP
+\fBunify\fR [\fB\-R\fR] [\fIvunify\-opts*\fR]
+.IP
+\&Unify or de-unify the vserver with its reference vserver(s).
+.TP
+\fBpkg install\fR \fIpkg*\fR
+.IP
+\&Installs package(s) \fIpkg\fR in the vserver.
+.TP
+\fBapt\-get,apt\-config,apt\-cache\fR \fIapt\-opts*\fR
+.IP
+\&Execute the apt\-* command for the given vserver
+.TP
+\fBrpm\fR \fIrpm\-opts*\fR
+.IP
+\&Execute the \fBrpm\fR command for the given vserver.
+.TP
+\fBpkgmgmt\fR \fBexternalize\fR|\fBinternalize\fR [\fB\-y\fR]
+.IP
+\&Externalize or internalize the package\-management for the given vserver.
+\'Externalize' means that package metadata and management tools (apt\-get,rpm)
+are living in the host, while 'internalize' means that data and programs from
+the vserver will be used.
+.TP
+\fBhashify\fR
+.IP
+\&Hashify the vserver.
 .SH "FILES"
 .LP 
 \fI/usr/sbin/vserver\fP 
 .P
 .SH "FILES"
 .LP 
 \fI/usr/sbin/vserver\fP 
 .P
-\fI/etc/vservers/*.conf\fP 
+\fI/etc/vservers/*\fP 
 .P
 .P
-\fI/etc/vservers/*.sh\fP 
 .P
 .P
-\fI/vservers/*\fP 
-
+\fI/var/lib/vservers/*\fP 
 .SH "EXAMPLES"
 .LP 
 Please contribute some, if you feel it's important.
 .SH "AUTHORS"
 .LP 
 .SH "EXAMPLES"
 .LP 
 Please contribute some, if you feel it's important.
 .SH "AUTHORS"
 .LP 
-This Man page was written by Klavs Klavsen <kl@vsen.dk> and based upon the helpful output from the program itself and the documentation on the Virtual Server site <http://www.solucorp.qc.ca/miscprj/s_context.hc?prjstate=1&nodoc=0>
+This man page was written by Micah Anderson <micah@debian.org> and based upon the helpful output from the program itself.
 .SH "SEE ALSO"
 .LP 
 chbind(8) chcontext(8)
 .SH "SEE ALSO"
 .LP 
 chbind(8) chcontext(8)
-newvserver(8)
 rebootmgr(8) reducecap(8)
 vps(8) vpstree(8)
 vrpm(8)
 rebootmgr(8) reducecap(8)
 vps(8) vpstree(8)
 vrpm(8)
+vserver\-build(8)
 vserver\-stat(8) 
 vtop(8)
 vserver\-stat(8) 
 vtop(8)
index 76f385d..7863b88 100644 (file)
@@ -1,4 +1,4 @@
-## $Id: Makefile-files 2558 2007-07-10 20:34:48Z dhozac $  -*- makefile -*-
+## $Id: Makefile-files 2684 2008-02-21 23:11:45Z ensc $  -*- makefile -*-
 
 ## Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 ##  
 
 ## Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 ##  
@@ -28,6 +28,7 @@ AM_INSTALLCHECK_STD_OPTIONS_EXEMPT += \
                                scripts/vserver-wrapper \
                                scripts/vsysvwrapper \
                                scripts/vtop \
                                scripts/vserver-wrapper \
                                scripts/vsysvwrapper \
                                scripts/vtop \
+                               scripts/h2ext-worker \
                                scripts/legacy/distrib-info \
                                scripts/legacy/vps \
                                scripts/legacy/save_s_context \
                                scripts/legacy/distrib-info \
                                scripts/legacy/vps \
                                scripts/legacy/save_s_context \
@@ -97,7 +98,8 @@ scripts_sbin_src_PRGS =               scripts/chbind \
                                scripts/vsomething \
                                scripts/vtop \
                                scripts/vupdateworld \
                                scripts/vsomething \
                                scripts/vtop \
                                scripts/vupdateworld \
-                               scripts/vyum
+                               scripts/vyum \
+                               scripts/vmount
 
 scripts_sbin_gen_PRGS =
 scripts_sbincfg_gen_DTA =
 
 scripts_sbin_gen_PRGS =
 scripts_sbincfg_gen_DTA =
index 9f55675..7cd118d 100644 (file)
@@ -1,5 +1,5 @@
 #! /bin/bash
 #! /bin/bash
-# $Id$
+# $Id: h2ext-worker 2674 2008-01-27 07:55:13Z dhozac $
 
 # Copyright (C) 2007 Daniel Hokka Zakrisson
 #  
 
 # Copyright (C) 2007 Daniel Hokka Zakrisson
 #  
index e0bc7e6..8cae4f1 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: util-vserver-vars.pathsubst 2589 2007-08-16 03:06:50Z dhozac $   --*- sh -*--
+# $Id: util-vserver-vars.pathsubst 2692 2008-03-01 00:22:34Z dhozac $   --*- sh -*--
 
 PACKAGE='@PACKAGE@'
 PACKAGE_BUGREPORT='@PACKAGE_BUGREPORT@'
 
 PACKAGE='@PACKAGE@'
 PACKAGE_BUGREPORT='@PACKAGE_BUGREPORT@'
@@ -70,6 +70,7 @@ _SECURE_MOUNT="$__PKGLIBDIR/secure-mount"
 _SETATTR="$__SBINDIR/setattr"
 _SHOWPERM="$__LEGACYDIR/showperm"
 _START_VSERVERS="$__PKGLIBDIR/start-vservers"
 _SETATTR="$__SBINDIR/setattr"
 _SHOWPERM="$__LEGACYDIR/showperm"
 _START_VSERVERS="$__PKGLIBDIR/start-vservers"
+_TUNCTL="$__PKGLIBDIR/tunctl"
 _VAPT_GET="$__SBINDIR/vapt-get"
 _VAPT_GET_WORKER="$__PKGLIBDIR/vapt-get-worker"
 _VATTRIBUTE="$__SBINDIR/vattribute"
 _VAPT_GET="$__SBINDIR/vapt-get"
 _VAPT_GET_WORKER="$__PKGLIBDIR/vapt-get-worker"
 _VATTRIBUTE="$__SBINDIR/vattribute"
@@ -81,6 +82,7 @@ _VDU="$__SBINDIR/vdu"
 _VHASHIFY="$__PKGLIBDIR/vhashify"
 _VKILL="$__SBINDIR/vkill"
 _VLIMIT="$__SBINDIR/vlimit"
 _VHASHIFY="$__PKGLIBDIR/vhashify"
 _VKILL="$__SBINDIR/vkill"
 _VLIMIT="$__SBINDIR/vlimit"
+_VMEMCTRL="$__SBINDIR/vmemctrl"
 _VNAMESPACE="$__SBINDIR/vnamespace"
 _VPKG="$__PKGLIBDIR/vpkg"
 _VPROCUNHIDE="$__PKGLIBDIR/vprocunhide"
 _VNAMESPACE="$__SBINDIR/vnamespace"
 _VPKG="$__PKGLIBDIR/vpkg"
 _VPROCUNHIDE="$__PKGLIBDIR/vprocunhide"
@@ -98,6 +100,7 @@ _VSERVERKILLALL="$__LEGACYDIR/vserverkillall"
 _VSHELPER="$__PKGLIBDIR/vshelper"
 _VSHELPER_SYNC="$__PKGLIBDIR/vshelper-sync"
 _VSOMETHING="$__SBINDIR/vsomething"
 _VSHELPER="$__PKGLIBDIR/vshelper"
 _VSHELPER_SYNC="$__PKGLIBDIR/vshelper-sync"
 _VSOMETHING="$__SBINDIR/vsomething"
+_VSPACE="$__SBINDIR/vspace"
 _VSYSCTL="$__PKGLIBDIR/vsysctl"
 _VTAG="$__SBINDIR/vtag"
 _VWAIT="$__SBINDIR/vwait"
 _VSYSCTL="$__PKGLIBDIR/vsysctl"
 _VTAG="$__SBINDIR/vtag"
 _VWAIT="$__SBINDIR/vwait"
@@ -117,6 +120,7 @@ _DIRNAME="@DIRNAME@"
 _EGREP="@EGREP@"
 _ENV="@ENV@"
 _FILE="@FILE@"
 _EGREP="@EGREP@"
 _ENV="@ENV@"
 _FILE="@FILE@"
+_FSCK="@FSCK@"
 _GREP="@GREP@"
 _GZIP="@GZIP@"
 _IP="@IP@"
 _GREP="@GREP@"
 _GZIP="@GZIP@"
 _IP="@IP@"
index 54e4bd4..0452dae 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/bash
 #!/bin/bash
-# $Id: vdispatch-conf 2486 2007-02-05 18:08:17Z hollow $
+# $Id: vdispatch-conf 2635 2007-11-17 23:52:59Z hollow $
 
 # Copyright (C) 2006 Benedikt Boehm <hollow@gentoo.org>
 #  
 
 # Copyright (C) 2006 Benedikt Boehm <hollow@gentoo.org>
 #  
@@ -58,15 +58,24 @@ while true; do
        (--debug)       send_through=( "${send_through[@]}" "$1" ); set -x;;
        (--quiet|-q)    send_through=( "${send_through[@]}" "$1" );;
        (--all)         vsomething_opts=( "${vsomething_opts[@]}" "$1" );;
        (--debug)       send_through=( "${send_through[@]}" "$1" ); set -x;;
        (--quiet|-q)    send_through=( "${send_through[@]}" "$1" );;
        (--all)         vsomething_opts=( "${vsomething_opts[@]}" "$1" );;
-       (--)            shift; break;;
+       (--)            test ${#vsomething_opts[@]} -eq 0 && shift; break;;
        (*)             echo $"vdispatch-conf: internal error; arg=='$1'" >&2; exit 1;;
     esac
     shift
 done
 
        (*)             echo $"vdispatch-conf: internal error; arg=='$1'" >&2; exit 1;;
     esac
     shift
 done
 
-VSOMETHING_TITLE=vemerge
+declare -a vserver_names
+
+while [ $# -gt 0 ]; do
+    case "$1" in
+       (--)            shift; break;;
+       (*)             vserver_names=( "${vserver_names[@]}" "$1" );;
+    esac
+    shift
+done
+
+VSOMETHING_TITLE=vdispatch-conf
 VSOMETHING_PKGMGMT=1
 
 export VSOMETHING_TITLE VSOMETHING_PKGMGMT
 VSOMETHING_PKGMGMT=1
 
 export VSOMETHING_TITLE VSOMETHING_PKGMGMT
-
-exec $_VSOMETHING "${send_through[@]}" dispatch-conf "${vsomething_opts[@]}" "$@"
+exec $_VSOMETHING "${send_through[@]}" dispatch-conf "${vsomething_opts[@]}" "${vserver_names[@]}" -- "$@"
index 639fdd1..69a314c 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/bash
 #!/bin/bash
-# $Id: vemerge 2363 2006-11-03 14:36:23Z hollow $
+# $Id: vemerge 2635 2007-11-17 23:52:59Z hollow $
 
 # Copyright (C) 2006 Benedikt Boehm <hollow@gentoo.org>
 #  
 
 # Copyright (C) 2006 Benedikt Boehm <hollow@gentoo.org>
 #  
@@ -58,16 +58,24 @@ while true; do
        (--debug)       send_through=( "${send_through[@]}" "$1" ); set -x;;
        (--quiet|-q)    send_through=( "${send_through[@]}" "$1" );;
        (--all)         vsomething_opts=( "${vsomething_opts[@]}" "$1" );;
        (--debug)       send_through=( "${send_through[@]}" "$1" ); set -x;;
        (--quiet|-q)    send_through=( "${send_through[@]}" "$1" );;
        (--all)         vsomething_opts=( "${vsomething_opts[@]}" "$1" );;
-       (--)            shift; break;;
+       (--)            test ${#vsomething_opts[@]} -eq 0 && shift; break;;
        (*)             echo $"vemerge: internal error; arg=='$1'" >&2; exit 1;;
     esac
     shift
 done
 
        (*)             echo $"vemerge: internal error; arg=='$1'" >&2; exit 1;;
     esac
     shift
 done
 
+declare -a vserver_names
+
+while [ $# -gt 0 ]; do
+    case "$1" in
+       (--)            shift; break;;
+       (*)             vserver_names=( "${vserver_names[@]}" "$1" );;
+    esac
+    shift
+done
+
 VSOMETHING_TITLE=vemerge
 VSOMETHING_PKGMGMT=1
 
 export VSOMETHING_TITLE VSOMETHING_PKGMGMT
 VSOMETHING_TITLE=vemerge
 VSOMETHING_PKGMGMT=1
 
 export VSOMETHING_TITLE VSOMETHING_PKGMGMT
-
-test ${#vsomething_opts[@]} -eq 0 || vsomething_opts=( "${vsomething_opts[@]}" -- )
-exec $_VSOMETHING "${send_through[@]}" emerge "${vsomething_opts[@]}" "$@"
+exec $_VSOMETHING "${send_through[@]}" emerge "${vsomething_opts[@]}" "${vserver_names[@]}" -- "$@"
index b722168..8bcc98e 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/bash
 #!/bin/bash
-# $Id: vesync 2486 2007-02-05 18:08:17Z hollow $
+# $Id: vesync 2635 2007-11-17 23:52:59Z hollow $
 
 # Copyright (C) 2006 Benedikt Boehm <hollow@gentoo.org>
 #  
 
 # Copyright (C) 2006 Benedikt Boehm <hollow@gentoo.org>
 #  
@@ -64,12 +64,22 @@ while true; do
        (--overlay)      overlay="${2%/}";;
        (--overlay-host) overlay_host="${2%/}";;
        (--overlay-only) overlay_only=1;;
        (--overlay)      overlay="${2%/}";;
        (--overlay-host) overlay_host="${2%/}";;
        (--overlay-only) overlay_only=1;;
-       (--)             shift; break;;
+       (--)             test ${#vsomething_opts[@]} -eq 0 && shift; break;;
        (*)              echo $"vesync: internal error; arg=='$1'" >&2; exit 1;;
     esac
     shift
 done
 
        (*)              echo $"vesync: internal error; arg=='$1'" >&2; exit 1;;
     esac
     shift
 done
 
+declare -a vserver_names
+
+while [ $# -gt 0 ]; do
+    case "$1" in
+       (--)            shift; break;;
+       (*)             vserver_names=( "${vserver_names[@]}" "$1" );;
+    esac
+    shift
+done
+
 VSOMETHING_TITLE=vesync
 VSOMETHING_PKGMGMT=1
 
 VSOMETHING_TITLE=vesync
 VSOMETHING_PKGMGMT=1
 
@@ -78,12 +88,12 @@ export VSOMETHING_TITLE VSOMETHING_PKGMGMT
 ret=0
 
 test $overlay_only -eq 0 && \
 ret=0
 
 test $overlay_only -eq 0 && \
-       $_VSOMETHING "${send_through[@]}" emerge "${vsomething_opts[@]}" "$@" -- --metadata
+       $_VSOMETHING "${send_through[@]}" emerge "${vsomething_opts[@]}" "${vserver_names[@]}" -- --metadata
 
 ret=$?
 
 test -n "$overlay" -a -n "$overlay_host" && \
 
 ret=$?
 
 test -n "$overlay" -a -n "$overlay_host" && \
-       $_VSOMETHING "${send_through[@]}" rsync "${vsomething_opts[@]}" "$@" -- \
+       $_VSOMETHING "${send_through[@]}" rsync "${vsomething_opts[@]}" "${vserver_names[@]}" -- \
        -rtW --progress --delete --delete-after "${overlay_host}/" "${overlay}/"
 
 test $? -eq 0 -a $ret -eq 0
        -rtW --progress --delete --delete-after "${overlay_host}/" "${overlay}/"
 
 test $? -eq 0 -a $ret -eq 0
diff --git a/scripts/vmount b/scripts/vmount
new file mode 100755 (executable)
index 0000000..3f0dfad
--- /dev/null
@@ -0,0 +1,104 @@
+#!/bin/bash
+# $Id: vmount 2682 2008-02-21 23:10:34Z ensc $
+
+# Copyright (C) 2007 Daniel Hokka Zakrisson
+#  
+# 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; version 2 of the License.
+#  
+# 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.
+
+: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
+test -e "$UTIL_VSERVER_VARS" || {
+    echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2
+    exit 1
+}
+. "$UTIL_VSERVER_VARS"
+. "$_LIB_FUNCTIONS"
+
+
+function showHelp()
+{
+    echo \
+$"Usage: $0 <vserver-name> -- [-o options] [--bind|--rbind]
+         [-t <type>] [-a] [-n] [--move]
+         [<source> [<destination>]]
+
+<source>       ...  what to mount, this is relative to the host's root
+<destination>  ...  where to mount it, this is relative to the guest's root
+
+Report bugs to <$PACKAGE_BUGREPORT>."
+    exit 0
+}
+
+function showVersion()
+{
+    echo \
+$"vmount $PACKAGE_VERSION -- mount for guests
+This program is part of $PACKAGE_STRING
+
+Copyright (C) 2007 Daniel Hokka Zakrisson
+This program is free software; you may redistribute it under the terms of
+the GNU General Public License.  This program has absolutely no warranty."
+    exit 0
+}
+
+
+declare -a guests
+while test $# -gt 0; do
+    case "$1" in
+       (--)    shift; break;;
+        (-*)    break;
+       (*)
+           _setVserverDir "$1"
+           guests=( "${guests[@]}" "$VSERVER_DIR" )
+           ;;
+    esac
+    shift
+done
+
+tmp=$(getopt -o +o:t:an --long help,version,debug,bind,rbind,move -n "$0" -- "$@") || exit 1
+eval set -- "$tmp"
+
+declare -a options
+
+while true; do
+    case "$1" in
+       (--help)        showHelp $0 ;;
+       (--version)     showVersion ;;
+       (--debug)       set -x;;
+       (--bind|--rbind|--move|-n|-a)
+                       options=( "${options[@]}" "$1" )
+                       ;;
+       (-t|-o)         options=( "${options[@]}" "$1" "$2" )
+                       shift
+                       ;;
+       (--)            shift; break;;
+       (*)             echo $"vmount: internal error; arg=='$1'" >&2; exit 1;;
+    esac
+    shift
+done
+
+case "x$1" in
+    (x/*|x)    ;;
+    (*)                panic $"vmount: the source must be an absolute path";;
+esac
+
+rc=0
+for guest in "${guests[@]}"; do
+    pushd "$guest/vdir" &> /dev/null
+    callInNamespace "$guest" \
+       $_SECURE_MOUNT --chroot --fstab "$guest/fstab" "${options[@]}" "$@"
+    test "$?" -eq 0 || rc=$?
+    popd &> /dev/null
+done
+
+exit $rc
index 4898a14..bcb936e 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/bash
 #! /bin/bash
-# $Id: vserver 2566 2007-07-18 17:24:36Z dhozac $
+# $Id: vserver 2661 2008-01-13 18:26:41Z dhozac $
 
 # Copyright (C) 2003,2004,2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 #  
 
 # Copyright (C) 2003,2004,2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 #  
@@ -31,21 +31,22 @@ test -e "$UTIL_VSERVER_VARS" || {
 function showHelp()
 {
     echo \
 function showHelp()
 {
     echo \
-$"Usage: $(basename $0) [-s|--sync] [-v|--verbose] [--silent]
+$"Usage: $(basename $0) [-s|--sync] [-v|--verbose] [--silent] [--debug]
              [--] <vserver> <command> <args>*
 
 <vserver> is the name of a vserver.
 
 Possible commands are:
              [--] <vserver> <command> <args>*
 
 <vserver> is the name of a vserver.
 
 Possible commands are:
-    start [--rescue [--rescue-init]] [<rescue-cmd> <args>*]
+    start [--rescue [--rescue-init] <rescue-cmd> <args>*]]
                 ... starts the specified vserver
                 ... starts the specified vserver
-    stop        ... stops the specified vserver
+    stop [--rescue-init]
+                ... stops the specified vserver
     restart     ... restarts the specified vserver; this is the subsequent
                     execution of a synchronized 'stop' and a 'start'
     condrestart ... restarts the vserver when it is running already
     restart     ... restarts the specified vserver; this is the subsequent
                     execution of a synchronized 'stop' and a 'start'
     condrestart ... restarts the vserver when it is running already
-    suexec <user> <shell-command> <args*>
+    suexec <user> <command> <args*>
                 ... executes a command as the specified user in the vserver
                 ... executes a command as the specified user in the vserver
-    exec <shell-command> <args*>
+    exec <command> <args*>
                 ... executes a command as root in the vserver
     enter       ... executes the configured shell in the vserver
     chkconfig <chkconfig-options*>
                 ... executes a command as root in the vserver
     enter       ... executes the configured shell in the vserver
     chkconfig <chkconfig-options*>
@@ -56,7 +57,8 @@ Possible commands are:
                     the vserver, and succeeds iff the vserver is running
 
     build <buildopts>*
                     the vserver, and succeeds iff the vserver is running
 
     build <buildopts>*
-                ... builds a new vserver from scratch
+                ... builds a new vserver from scratch, see
+                    vserver ... build --help for details
     delete      ... remove a vserver
 
     unify [-R] <vunify-opts>*
     delete      ... remove a vserver
 
     unify [-R] <vunify-opts>*
@@ -197,11 +199,11 @@ Possible solutions:
 _setVserverName
 
 # Create a new namespace when starting the guest
 _setVserverName
 
 # Create a new namespace when starting the guest
-test "$2" != start -o -n "$OPTION_NONAMESPACE" || isAvoidNamespace "$VSERVER_DIR" || \
+test "$cmd" != start -o -n "$OPTION_NONAMESPACE" || isAvoidNamespace "$VSERVER_DIR" || \
     exec $_VNAMESPACE --new -- $_VSERVER ----nonamespace "${OPTIONS_ORIG[@]}"
 
 # Enter the namespace early so we can test for files inside the guest
     exec $_VNAMESPACE --new -- $_VSERVER ----nonamespace "${OPTIONS_ORIG[@]}"
 
 # Enter the namespace early so we can test for files inside the guest
-test "$2" != enter -a "$2" != stop || \
+test "$cmd" != enter -a "$cmd" != stop || \
     test -n "$OPTION_NONAMESPACE" || isAvoidNamespace "$VSERVER_DIR" || \
     ! isVserverRunning "$VSERVER_DIR" || \
     exec $_VNAMESPACE --enter "$VSERVER_DIR" -- $_VSERVER ----nonamespace "${OPTIONS_ORIG[@]}"
     test -n "$OPTION_NONAMESPACE" || isAvoidNamespace "$VSERVER_DIR" || \
     ! isVserverRunning "$VSERVER_DIR" || \
     exec $_VNAMESPACE --enter "$VSERVER_DIR" -- $_VSERVER ----nonamespace "${OPTIONS_ORIG[@]}"
index fc78e6f..dc9100f 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/bash
 #! /bin/bash
-# $Id: vserver-build 2468 2007-01-21 20:05:19Z dhozac $
+# $Id: vserver-build 2644 2007-12-19 14:28:40Z dhozac $
 
 # Copyright (C) 2003,2004,2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 #  
 
 # Copyright (C) 2003,2004,2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 #  
@@ -74,7 +74,7 @@ Possible methods are:
                      the -f option implies -n and -d are relative to the <fai_vserver>
     rsync       ... -- [-d <distribution>] --source <source> [-o <rsync option>]*
                 ...  installs a guest by rsyncing from <source> to the guest root
                      the -f option implies -n and -d are relative to the <fai_vserver>
     rsync       ... -- [-d <distribution>] --source <source> [-o <rsync option>]*
                 ...  installs a guest by rsyncing from <source> to the guest root
-    clone       ... -- [-d <distribution>] --source <source>
+    clone       ... -- [-d <distribution>] --source <source> [--exclude-from <exclude-list>]
                 ...  clones a guest by linking unified files and copying the rest
 
 Please report bugs to $PACKAGE_BUGREPORT"
                 ...  clones a guest by linking unified files and copying the rest
 
 Please report bugs to $PACKAGE_BUGREPORT"
index 7cac25b..dc55693 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: vserver-build.clone 2494 2007-02-11 00:45:04Z dhozac $  --*- sh -*--
+# $Id: vserver-build.clone 2644 2007-12-19 14:28:40Z dhozac $  --*- sh -*--
 
 # Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 #  
 
 # Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 #  
@@ -15,7 +15,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
-tmp=$(getopt -o '+d:s:o:' --long debug,pkgmgmt,source: -n "$0" -- "$@") || exit 1
+tmp=$(getopt -o '+d:s:o:X:' --long debug,pkgmgmt,source:,exclude-from: -n "$0" -- "$@") || exit 1
 eval set -- "$tmp"
 
 . "$_LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT"
 eval set -- "$tmp"
 
 . "$_LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT"
@@ -23,12 +23,15 @@ eval set -- "$tmp"
 DISTRIBUTION=:
 use_pkgmgmt=
 SOURCE=
 DISTRIBUTION=:
 use_pkgmgmt=
 SOURCE=
+EXCLUDES=
 while true; do
     case "$1" in
        -d)             DISTRIBUTION=$2; shift;;
        --debug)        set -x;;
        --pkgmgmt)      use_pkgmgmt=1;;
        -s|--source)    SOURCE=$2; shift;;
 while true; do
     case "$1" in
        -d)             DISTRIBUTION=$2; shift;;
        --debug)        set -x;;
        --pkgmgmt)      use_pkgmgmt=1;;
        -s|--source)    SOURCE=$2; shift;;
+       -X|--exclude-from)
+                       EXCLUDES=$2; shift;;
        --)             shift; break ;;
        *)              echo "vserver-build.clone: internal error: unrecognized option '$1'" >&2
                        exit 1
        --)             shift; break ;;
        *)              echo "vserver-build.clone: internal error: unrecognized option '$1'" >&2
                        exit 1
@@ -63,7 +66,9 @@ setup_writeInitialFstab
 
 test -z "$BUILD_INITPRE"  || "$BUILD_INITPRE" "$SETUP_CONFDIR"  "$UTIL_VSERVER_VARS"
 
 
 test -z "$BUILD_INITPRE"  || "$BUILD_INITPRE" "$SETUP_CONFDIR"  "$UTIL_VSERVER_VARS"
 
-$_VCLONE "$SOURCE"/ "$VDIR"/
+$_VCLONE ${SETUP_CONTEXT:+--xid "$SETUP_CONTEXT"} \
+        ${EXCLUDES:+--exclude-from "$EXCLUDES"} \
+        "$SOURCE"/ "$VDIR"/
 
 test -z "$BUILD_INITPOST" || "$BUILD_INITPOST" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS"
 
 
 test -z "$BUILD_INITPOST" || "$BUILD_INITPOST" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS"
 
index 54f1564..0afe044 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: vserver-build.debootstrap 2574 2007-07-31 19:43:17Z dhozac $    --*- sh -*--
+# $Id: vserver-build.debootstrap 2641 2007-12-05 00:51:04Z dhozac $    --*- sh -*--
 
 # Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 #  
 
 # Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 #  
@@ -95,8 +95,10 @@ EOF
         cd $dir
         ar x "$dst"
         tar xzf data.tar.gz
         cd $dir
         ar x "$dst"
         tar xzf data.tar.gz
-        export DEBOOTSTRAP_DIR=`pwd`/usr/lib/debootstrap
+        DEBOOTSTRAP_DIR=`pwd`/usr/lib/debootstrap
         DEBOOTSTRAP=`pwd`/usr/sbin/debootstrap
         DEBOOTSTRAP=`pwd`/usr/sbin/debootstrap
+        test -d "$DEBOOTSTRAP_DIR" || DEBOOTSTRAP_DIR=`pwd`/usr/share/debootstrap
+        export DEBOOTSTRAP_DIR
 
        local arch
        arch=$(uname -i 2>/dev/null) || \
 
        local arch
        arch=$(uname -i 2>/dev/null) || \
index f619545..c8ccb84 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: vserver-build.functions 2571 2007-07-29 16:55:06Z dhozac $      --*- sh -*--
+# $Id: vserver-build.functions 2704 2008-03-16 03:30:22Z dhozac $      --*- sh -*--
 
 # Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 #  
 
 # Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 #  
@@ -54,7 +54,8 @@ function populateDev
 {
     local spec
 
 {
     local spec
 
-    mkdir -p -m755 "$VDIR"/dev/pts
+    mkdir -p -m755 "$VDIR"/dev
+    mkdir -m755 "$VDIR"/dev/pts
 
     while read spec; do
        makeDevEntry "$VDIR"/dev $spec
 
     while read spec; do
        makeDevEntry "$VDIR"/dev $spec
@@ -202,6 +203,9 @@ exist already; please try to use '--force', or remove them manually."
 
     mkdir -p -m755 "$VDIR"
     $_SETATTR --~barrier "$VDIR"
 
     mkdir -p -m755 "$VDIR"
     $_SETATTR --~barrier "$VDIR"
+    $_SETATTR --barrier "$VDIR"/.. || colwarn $"\
+WARNING: could not set the barrier attribute on '$VDIR/..',
+         please set it manually."
     base._addGeneratedFile "$VDIR"
     
     mkdir -p -m755 "$SETUP_CONFDIR"/apps "$VDIR"/etc
     base._addGeneratedFile "$VDIR"
     
     mkdir -p -m755 "$SETUP_CONFDIR"/apps "$VDIR"/etc
@@ -256,3 +260,27 @@ function base.setSuccess
 {
     __BASE_SUCCESS=1
 }
 {
     __BASE_SUCCESS=1
 }
+
+function startSleepingGuest
+{
+    local guest="$1"
+    local timeout="${2:-15}"
+    $_VSERVER "$guest" start --rescue --rescue-init bash -c "
+       exec  > /dev/null
+       exec 2> /dev/null
+       trap 'kill -s 9 -- -1; exit 0' INT
+       i=0
+       while [ \$i -lt $timeout ]; do
+           sleep 1
+           let ++i
+       done
+       kill -s 15 -- -1
+       sleep 1
+       kill -s 9 -- -1"
+}
+
+function stopSleepingGuest
+{
+    local guest="$1"
+    $_VSERVER "$guest" stop --rescue-init
+}
index 9422ba4..4f5ce37 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: vserver-build.functions.yum 2030 2005-04-16 21:20:45Z ensc $    --*- sh -*--
+# $Id: vserver-build.functions.yum 2612 2007-09-11 21:26:41Z ensc $    --*- sh -*--
 
 # Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 #  
 
 # Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 #  
@@ -56,6 +56,7 @@ function yum.__substituteConf
     if test -e "$f"; then
        $_SED -e "s!@YUMETCDIR@!$prefix$PKGCFGDIR/yum/etc!g;
                  s!@YUMCACHEDIR@!$prefix$PKGCFGDIR/yum/cache!g;
     if test -e "$f"; then
        $_SED -e "s!@YUMETCDIR@!$prefix$PKGCFGDIR/yum/etc!g;
                  s!@YUMCACHEDIR@!$prefix$PKGCFGDIR/yum/cache!g;
+                 s!@YUMLIBDIR@!$prefix$PKGCFGDIR/yum/lib!g;
                  s!@YUMLOGDIR@!$prefix$PKGCFGDIR/yum!g;
                  s!@YUMLOCKDIR@!$prefix$PKGCFGDIR/yum!g;
                  " "$f" >"$f.tmp"
                  s!@YUMLOGDIR@!$prefix$PKGCFGDIR/yum!g;
                  s!@YUMLOCKDIR@!$prefix$PKGCFGDIR/yum!g;
                  " "$f" >"$f.tmp"
@@ -66,7 +67,7 @@ function yum.__substituteConf
 
 function yum.initFilesystem
 {
 
 function yum.initFilesystem
 {
-    mkdir -p "$PKGCFGDIR"/yum/{etc,cache}
+    mkdir -p "$PKGCFGDIR"/yum/{etc,cache,lib}
     
     populateDirectory "$PKGCFGDIR/yum/etc" \
        "$__DISTRIBDIR/defaults/yum" \
     
     populateDirectory "$PKGCFGDIR/yum/etc" \
        "$__DISTRIBDIR/defaults/yum" \
index 7d7fefd..2289d3d 100644 (file)
@@ -1,5 +1,5 @@
 #! /bin/bash
 #! /bin/bash
-# $Id: vserver.delete 2577 2007-08-05 18:36:56Z dhozac $
+# $Id: vserver.delete 2654 2008-01-08 16:49:17Z dhozac $
 
 # Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 #  
 
 # Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 #  
@@ -32,4 +32,4 @@ isVserverRunning "$VSERVER_DIR" &&
 base.init
 pkgmgmt.initVariables
 $_RM -rf "`$_VSERVER_INFO "$vserver" VDIR 1`" "$VSERVER_DIR" "$PKGCFGDIR" \
 base.init
 pkgmgmt.initVariables
 $_RM -rf "`$_VSERVER_INFO "$vserver" VDIR 1`" "$VSERVER_DIR" "$PKGCFGDIR" \
-       "`$_READLINK "$VSERVER_DIR/cache"`"
+       "`$_READLINK "$VSERVER_DIR/cache" 2>/dev/null`"
index 23bb531..97b236f 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: vserver.functions 2599 2007-08-26 21:30:50Z dhozac $  --*- sh -*--
+# $Id: vserver.functions 2702 2008-03-11 10:07:26Z hollow $  --*- sh -*--
 
 # Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 #  
 
 # Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 #  
@@ -45,6 +45,8 @@ declare -a OPTS_VSCHED=()
 declare -a OPTS_ENV=()
 declare -a OPTS_VTAG_CREATE=()
 declare -a OPTS_VTAG_ENTER=()
 declare -a OPTS_ENV=()
 declare -a OPTS_VTAG_CREATE=()
 declare -a OPTS_VTAG_ENTER=()
+declare -a OPTS_VMEMCTRL=()
+declare -a OPTS_VSPACE=()
 
 declare -a STOPCMD_PREPARE=()
 
 
 declare -a STOPCMD_PREPARE=()
 
@@ -64,6 +66,7 @@ _IS_FAKEINIT=
 INITSTYLE=sysv
 
 S_CONTEXT=
 INITSTYLE=sysv
 
 S_CONTEXT=
+N_CONTEXT=
 
 SILENT_OPT=
 
 
 SILENT_OPT=
 
@@ -106,9 +109,7 @@ function _generateChbindOptions
     f="$vdir"/interfaces/lback
     getFileValue lback "$f"
 
     f="$vdir"/interfaces/lback
     getFileValue lback "$f"
 
-    getFileValue nid "$vdir/ncontext" "$vdir/context"
-    
-    CHBIND_CMD=( $_CHBIND $SILENT_OPT --secure ${nid:+--nid "$nid"}
+    CHBIND_CMD=( $_CHBIND $SILENT_OPT --secure ${N_CONTEXT:+--nid "$N_CONTEXT"}
                 ${bcast:+--bcast "$bcast"} ${lback:+--lback "$lback"}
                )
 
                 ${bcast:+--bcast "$bcast"} ${lback:+--lback "$lback"}
                )
 
@@ -314,9 +315,18 @@ function _generateInitOptions
 
        (xgentoo)
            test -n "$RUNLEVEL_START" || RUNLEVEL_START="default"
 
        (xgentoo)
            test -n "$RUNLEVEL_START" || RUNLEVEL_START="default"
+           RC_PATH=/usr/sbin:/usr/bin:/sbin:/bin
+
+           if test -x "$vdir/vdir/lib/rcscripts/sh/init-vserver.sh"; then
+               RC_WRAP=/lib/rcscripts/sh/init-vserver.sh
+           elif test -x "$vdir/vdir/lib/rc/sh/init-vserver.sh"; then
+               RC_WRAP=/lib/rc/sh/init-vserver.sh
+           else
+               panic "init-vserver.sh not found; aborting"
+           fi
 
 
-           INITCMD_START=( env TERM=$TERM /lib/rcscripts/sh/init-vserver.sh "$RUNLEVEL_START" )
-           INITCMD_STOP=( env -i TERM=$TERM RUNLEVEL=0 /sbin/rc shutdown )
+           INITCMD_START=( env TERM=$TERM $RC_WRAP "$RUNLEVEL_START" )
+           INITCMD_STOP=( env -i PATH=$RC_PATH TERM=$TERM RUNLEVEL=0 /sbin/rc shutdown )
            INITCMD_PREPARE=( $_FAKE_RUNLEVEL 3 /var/run/utmp )
            ;;
 
            INITCMD_PREPARE=( $_FAKE_RUNLEVEL 3 /var/run/utmp )
            ;;
 
@@ -509,6 +519,33 @@ create them before starting the vserver and use the 'nodev' flag then"
     return 0
 }
 
     return 0
 }
 
+function _getTunInfo
+{
+    local iface="$1"
+
+    test -e "$iface/tun" -o -e "$iface/tap" || return 1
+    test ! -e "$iface/tun"     || echo --tun
+    test ! -e "$iface/tap"     || echo --tap
+    test ! -e "$iface/nocsum"  || echo --~checksum
+    test   -e "$iface/shared"  || echo --nid-failure-ok "$N_CONTEXT"
+    if test -e "$iface/uid"; then
+       local uid
+       getFileValue uid "$iface/uid"
+       echo --uid "$uid"
+    fi
+    if test -e "$iface/gid"; then
+       local gid
+       getFileValue gid "$iface/gid"
+       echo --gid "$gid"
+    fi
+    if test -e "$iface/linktype"; then
+       local linktype
+       getFileValue linktype "$iface/linktype"
+       echo --linktype "$linktype"
+    fi
+    return 0
+}
+
 ## Usage: _processSingleInterface <interface-directory>
 function _processSingleInterface
 {
 ## Usage: _processSingleInterface <interface-directory>
 function _processSingleInterface
 {
@@ -568,21 +605,27 @@ function _processSingleInterface
 
        if ! test -e "$iface"/indirect; then
            # XXX: IPv6 hack
 
        if ! test -e "$iface"/indirect; then
            # XXX: IPv6 hack
-           use_bcast="broadcast ${bcast:-+}"
+           local use_bcast="broadcast ${bcast:-+}"
            echo "$ip" | $_GREP -q : && use_bcast=
            echo "$ip" | $_GREP -q : && use_bcast=
+
+           local tun_info
+           if tun_info=$(_getTunInfo "$iface"); then
+               _addInterfaceCmd TUNCTL "$dev" $tun_info
+           fi
+
            _addInterfaceCmd IP_ADDR  "$ip${prefix:+/$prefix}" $use_bcast ${name:+label "$dev:$name"} dev "$dev"
            #_addInterfaceCmd IP_ROUTE "$ip${prefix:+/$prefix}" dev "$dev"
            _addInterfaceCmd IP_LINK  "$dev" $up
            _addInterfaceCmd IP_ADDR  "$ip${prefix:+/$prefix}" $use_bcast ${name:+label "$dev:$name"} dev "$dev"
            #_addInterfaceCmd IP_ROUTE "$ip${prefix:+/$prefix}" dev "$dev"
            _addInterfaceCmd IP_LINK  "$dev" $up
-       elif ! test -n "$ctx"; then
+       elif ! test -n "$N_CONTEXT"; then
            echo $"Using 'dummy' (indirect) for interface '$dev' requires a fixed context number; dynamic ctx are not supported" >&2
            return 1
        else
            echo $"Using 'dummy' (indirect) for interface '$dev' requires a fixed context number; dynamic ctx are not supported" >&2
            return 1
        else
-           test -z "$mac" || _generateMac mac "$(basename $iface)" "$ctx" || return 1
+           test -z "$mac" || _generateMac mac "$(basename $iface)" "$N_CONTEXT" || return 1
            _addInterfaceCmd MODPROBE dummy "$dev"
            _addInterfaceCmd IP_LINK  dev dummy0 address "$mac"
            _addInterfaceCmd NAMEIF   "$dev" "$mac"
            _addInterfaceCmd IP_ADDR  "$ip${prefix:+/$prefix}" dev "$dev"
            _addInterfaceCmd MODPROBE dummy "$dev"
            _addInterfaceCmd IP_LINK  dev dummy0 address "$mac"
            _addInterfaceCmd NAMEIF   "$dev" "$mac"
            _addInterfaceCmd IP_ADDR  "$ip${prefix:+/$prefix}" dev "$dev"
-           test -z "$extip" || _addInterfaceCmd IPTABLES "$ip${prefix:+/$prefix}" ${name:+label "$dev:$name"} "$ctx" "$extip"
+           test -z "$extip" || _addInterfaceCmd IPTABLES "$ip${prefix:+/$prefix}" ${name:+label "$dev:$name"} "$N_CONTEXT" "$extip"
        fi
 
        break
        fi
 
        break
@@ -593,9 +636,11 @@ function _processSingleInterface
 function _generateInterfaceOptions
 {
     local iface
 function _generateInterfaceOptions
 {
     local iface
-    local ctx
 
 
-    test ! -e "$1"/context || read ctx <"$1"/context
+    # XXX: This is here instead of in _generateChbindOptions
+    #      to avoid a circular dependency
+    getFileValue N_CONTEXT "$1/ncontext" "$1/context"
+    test -n "$N_CONTEXT" -o -z "$S_CONTEXT" || N_CONTEXT="$S_CONTEXT"
 
     for iface in "$1/interfaces/"*; do
         test   -d "$iface"          || continue
 
     for iface in "$1/interfaces/"*; do
         test   -d "$iface"          || continue
@@ -606,17 +651,6 @@ function _generateInterfaceOptions
     _HAVE_INTERFACE_OPTIONS=1
 }
 
     _HAVE_INTERFACE_OPTIONS=1
 }
 
-function _generateTagOptions
-{
-    local vdir="$1"
-    local tag
-
-    getFileValue tag "$vdir/tag" "$vdir/context" || return 0
-
-    OPTS_VTAG_CREATE=( --tag "$tag" )
-    OPTS_VTAG_ENTER=( --tag "$tag" )
-}
-
 function enableInterfaces
 {
     local i=0
 function enableInterfaces
 {
     local i=0
@@ -645,6 +679,11 @@ function enableInterfaces
            IP_ADDR_FLUSH)      $_IP addr  flush "$@";;
            IP_LINK)            $_IP link  set   "$@";;
            IP_ROUTE)           $_IP route add   "$@";;
            IP_ADDR_FLUSH)      $_IP addr  flush "$@";;
            IP_LINK)            $_IP link  set   "$@";;
            IP_ROUTE)           $_IP route add   "$@";;
+           TUNCTL)
+               local dev="$1"
+               shift
+               $_TUNCTL --persist "$@" "$dev"
+               ;;
            *)                  echo "Unknown interface-command type '$type'" >&2; false;;
        esac
 
            *)                  echo "Unknown interface-command type '$type'" >&2; false;;
        esac
 
@@ -680,6 +719,7 @@ function disableInterfaces
            IP_ADDR_FLUSH)      ;;
            IP_LINK)            ;; ## Ignore the link-down command for now
            IP_ROUTE)           $_IP route del "$@";;
            IP_ADDR_FLUSH)      ;;
            IP_LINK)            ;; ## Ignore the link-down command for now
            IP_ROUTE)           $_IP route del "$@";;
+           TUNCTL)             $_TUNCTL --~persist "$1";;
            *)                  echo "Unknown interface-command type '$type'" >&2; false;;
        esac
     done
            *)                  echo "Unknown interface-command type '$type'" >&2; false;;
        esac
     done
@@ -687,6 +727,49 @@ function disableInterfaces
     unlock 1
 }
 
     unlock 1
 }
 
+function _generateTagOptions
+{
+    local vdir="$1"
+    local tag
+
+    getFileValue tag "$vdir/tag" "$vdir/context"
+    test -n "$tag" || return 0
+
+    OPTS_VTAG_CREATE=( --tag "$tag" )
+    OPTS_VTAG_ENTER=( --tag "$tag" )
+}
+
+function _generateMemctrlOptions
+{
+    local vdir="$1"
+    local badness
+
+    getFileValue badness "$vdir/badness"
+    test -n "$badness" || return 0
+
+    OPTS_VMEMCTRL=( --badness "$badness" )
+}
+
+function _generateSpaceOptions
+{
+    local vdir="$1"
+    local d="$vdir"/spaces
+
+    test ! -e "$d"/pid || \
+      OPTS_VSPACE=( "${OPTS_VSPACE[@]}" --pid )
+
+    test ! -e "$d"/net || {
+       OPTS_VSPACE=( "${OPTS_VSPACE[@]}" --net )
+       # network context and namespace don't make much sense
+       _HAVE_CHBIND_OPTIONS=1
+       CHBIND_CMD=()
+    }
+
+    local mask
+    getFileValue mask "$d"/mask || \
+      OPTS_VSPACE=( "${OPTS_VSPACE[@]}" --mask "$mask" )
+}
+
 ## Usage: prepareInit <vserver-directory>
 function prepareInit
 {
 ## Usage: prepareInit <vserver-directory>
 function prepareInit
 {
@@ -731,6 +814,8 @@ function generateOptions
     _generateScheduleOptions    "$1"
     _generatePersonalityOptions "$1"
     _generateTagOptions         "$1"
     _generateScheduleOptions    "$1"
     _generatePersonalityOptions "$1"
     _generateTagOptions         "$1"
+    _generateMemctrlOptions     "$1"
+    _generateSpaceOptions       "$1"
 
     if test -n "$_IS_FAKEINIT"; then
        CHCONTEXT_INIT_OPTS=( --disconnect --flag fakeinit )
 
     if test -n "$_IS_FAKEINIT"; then
        CHCONTEXT_INIT_OPTS=( --disconnect --flag fakeinit )
@@ -892,6 +977,22 @@ function umountVserver
     test -n "$is_ok"
 }
 
     test -n "$is_ok"
 }
 
+function fsckAllFS
+{
+    local cfgdir=$1
+    local fstab="$cfgdir"/fstab
+    local FSTAB_FILE
+    local fsck_exitcode
+
+    test -e "$fstab" || return 0
+
+    export FSTAB_FILE="$fstab"
+    $_FSCK -s -n -A -T
+    fsck_exitcode=$?
+    test "$fsck_exitcode" -eq 0 -o \
+         "$fsck_exitcode" -eq 1 || return $fsck_exitcode
+}
+
 ## Usage: waitForSync <vserver> <context> <vshelper-fifo-varname>
 function initSync
 {
 ## Usage: waitForSync <vserver> <context> <vshelper-fifo-varname>
 function initSync
 {
@@ -1215,22 +1316,27 @@ function _namespaceCleanup
     local root=$($_VSERVER_INFO "$1" VDIR 1)
     local -a list
     local -a skip
     local root=$($_VSERVER_INFO "$1" VDIR 1)
     local -a list
     local -a skip
-    local tmp
+    local i
+    local j
 
     getFileArray skip "$vdir"/namespace-cleanup-skip \
        "$__CONFDIR"/.defaults/namespace-cleanup-skip || :
 
     # these are things that have to be accessible post-cleanup
 
     getFileArray skip "$vdir"/namespace-cleanup-skip \
        "$__CONFDIR"/.defaults/namespace-cleanup-skip || :
 
     # these are things that have to be accessible post-cleanup
-    for tmp in "$root" "$__SBINDIR" "$__PKGLIBDIR" "$vdir" \
+    for i in "$root" "$__SBINDIR" "$__PKGLIBDIR" "$vdir" \
        "$__PKGSTATEDIR" "$__LOCKDIR" /usr/local /tmp "${skip[@]}"; do
        "$__PKGSTATEDIR" "$__LOCKDIR" /usr/local /tmp "${skip[@]}"; do
-       while test -n "$tmp"; do
-           list=( "${list[@]}" "$tmp" )
-           tmp="${tmp%/*}"
+       local real=`getPhysicalDir "$i"`
+       test "$i" != "$real" || real=
+       for j in "$i" "$real"; do
+           while test -n "$j"; do
+               list=( "${list[@]}" "$j" )
+               j="${j%/*}"
+           done
        done
     done
 
     local -a list_umount
        done
     done
 
     local -a list_umount
-    while read dev path opts; do
+    while read -r dev path opts; do
        test -n "$path" || continue
        for i in "$root" /dev /proc; do
            test "${path#$i}" != "$path" && continue 2
        test -n "$path" || continue
        for i in "$root" /dev /proc; do
            test "${path#$i}" != "$path" && continue 2
@@ -1247,13 +1353,15 @@ function _namespaceCleanup
     done
 }
 
     done
 }
 
-function loadDeviceMap
+function handleDeviceMap
 {
 {
-    local xid="$1"
-    local dir="$2"
+    local op="$1"
+    local xid="$2"
+    local dir="$3"
     local flags device target
 
     test -d "$dir" || return 0
     local flags device target
 
     test -d "$dir" || return 0
+    test -n "$xid" || return 0
 
     for i in "$dir"/*; do
        test -d "$i" || continue
 
     for i in "$dir"/*; do
        test -d "$i" || continue
@@ -1269,6 +1377,6 @@ function loadDeviceMap
        vdevmap_opts=(  "${vdevmap_opts[@]}" ${flags:+--flags "$flags"} \
                        ${device:+--device "$device"} ${target:+--target "$target"} )
 
        vdevmap_opts=(  "${vdevmap_opts[@]}" ${flags:+--flags "$flags"} \
                        ${device:+--device "$device"} ${target:+--target "$target"} )
 
-       $_VDEVMAP --xid "$xid" "${vdevmap_opts[@]}" || return $?
+       $_VDEVMAP --xid "$xid" "$op" "${vdevmap_opts[@]}" || return $?
     done
 }
     done
 }
index 92c2043..a5560e5 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: vserver.start 2599 2007-08-26 21:30:50Z dhozac $  --*- sh -*--
+# $Id: vserver.start 2664 2008-01-20 07:56:23Z dhozac $  --*- sh -*--
 
 # Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 #  
 
 # Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 #  
@@ -105,6 +105,8 @@ pushd "$VSERVER_DIR" >/dev/null
 execScriptlets   "$VSERVER_DIR" "$VSERVER_NAME" initialize
 popd >/dev/null
 
 execScriptlets   "$VSERVER_DIR" "$VSERVER_NAME" initialize
 popd >/dev/null
 
+fsckAllFS        "$VSERVER_DIR"
+
 mountRootFS      "$VSERVER_DIR"
 generateOptions  "$VSERVER_DIR"
 
 mountRootFS      "$VSERVER_DIR"
 generateOptions  "$VSERVER_DIR"
 
@@ -116,9 +118,11 @@ setDiskLimits    "$VSERVER_DIR"
 
 enableInterfaces "$VSERVER_DIR" && have_interfaces=1
 
 
 enableInterfaces "$VSERVER_DIR" && have_interfaces=1
 
-mountVserver "$VSERVER_DIR"     && is_mounted=1
-prepareInit  "$VSERVER_DIR"
-addtoCPUSET  "$VSERVER_DIR"
+mountVserver     "$VSERVER_DIR" && is_mounted=1
+prepareInit      "$VSERVER_DIR"
+addtoCPUSET      "$VSERVER_DIR"
+
+handleDeviceMap --set "$S_CONTEXT" "$VSERVER_DIR/apps/vdevmap"
 
 pushd "$VSERVER_DIR"/vdir/ >/dev/null
 execScriptlets   "$VSERVER_DIR" "$VSERVER_NAME" pre-start
 
 pushd "$VSERVER_DIR"/vdir/ >/dev/null
 execScriptlets   "$VSERVER_DIR" "$VSERVER_NAME" pre-start
@@ -133,13 +137,16 @@ if $_VSERVER_INFO - FEATURE migrate; then
     "${CHBIND_CMD[@]}" \
     $_EXEC_ULIMIT "$VSERVER_DIR"/ulimits \
     $_VTAG       --create "${OPTS_VTAG_CREATE[@]}" --silent -- \
     "${CHBIND_CMD[@]}" \
     $_EXEC_ULIMIT "$VSERVER_DIR"/ulimits \
     $_VTAG       --create "${OPTS_VTAG_CREATE[@]}" --silent -- \
+    $_VSPACE     --new "${OPTS_VSPACE[@]}" -- \
     $_VCONTEXT   --create "${OPTS_VCONTEXT_CREATE[@]}" -- \
     ${OPTION_STRACE:+$_STRACE -fF -o /tmp/vserver-start.$$} \
     ${USE_VNAMESPACE:+$_VNAMESPACE --set -- } \
     $_VCONTEXT   --create "${OPTS_VCONTEXT_CREATE[@]}" -- \
     ${OPTION_STRACE:+$_STRACE -fF -o /tmp/vserver-start.$$} \
     ${USE_VNAMESPACE:+$_VNAMESPACE --set -- } \
+    $_VSPACE     --set "${OPTS_VSPACE[@]}" -- \
     $_VLIMIT     --dir "$VSERVER_DIR"/rlimits --missingok -- \
     $_VSCHED     --xid self --force "${OPTS_VSCHED[@]}" -- \
     $_VSYSCTL    --xid self --dir "$VSERVER_DIR"/sysctl --missingok -- \
     $_VUNAME     --xid self --dir "$VSERVER_DIR"/uts    --missingok -- \
     $_VLIMIT     --dir "$VSERVER_DIR"/rlimits --missingok -- \
     $_VSCHED     --xid self --force "${OPTS_VSCHED[@]}" -- \
     $_VSYSCTL    --xid self --dir "$VSERVER_DIR"/sysctl --missingok -- \
     $_VUNAME     --xid self --dir "$VSERVER_DIR"/uts    --missingok -- \
+    $_VMEMCTRL   --xid self --set "${OPTS_VMEMCTRL[@]}" -- \
     "${VSERVER_EXTRA_CMDS[@]}" \
     $_VUNAME     --xid self --set -t context="$VSERVER_DIR" -- \
     $_VATTRIBUTE --set "${OPTS_VATTRIBUTE[@]}" -- \
     "${VSERVER_EXTRA_CMDS[@]}" \
     $_VUNAME     --xid self --set -t context="$VSERVER_DIR" -- \
     $_VATTRIBUTE --set "${OPTS_VATTRIBUTE[@]}" -- \
index d78e0de..cdf4d12 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: vserver.stop 2602 2007-08-27 10:53:04Z dhozac $  --*- sh -*--
+# $Id: vserver.stop 2704 2008-03-16 03:30:22Z dhozac $  --*- sh -*--
 
 # Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 #  
 
 # Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 #  
@@ -48,6 +48,14 @@ trap "cleanup" EXIT
 
 OPTION_FORCE_SYNC=1
 
 
 OPTION_FORCE_SYNC=1
 
+while test "$#" -gt 0; do
+    case "$1" in
+       (--rescue-init) shift; _IS_FAKEINIT=1;;
+       (--)            shift; break;;
+       (-*)            panic $"vserver ... stop: unknown option '$1'";;
+    esac
+done
+
 set -e
 generateOptions   "$VSERVER_DIR"
 set +e
 set -e
 generateOptions   "$VSERVER_DIR"
 set +e
@@ -62,6 +70,8 @@ cd "$VSERVER_DIR"/vdir/
 
 test -z "$OPTION_DEFAULTTTY" || setDefaultTTY "$VSERVER_DIR"
 
 
 test -z "$OPTION_DEFAULTTTY" || setDefaultTTY "$VSERVER_DIR"
 
+$_VATTRIBUTE --set --xid "$S_CONTEXT" --flag !SC_HELPER
+
 fail=
 initWait          "$VSERVER_DIR" "$S_CONTEXT" vwait_statdir
 if test -n "$_IS_FAKEINIT" && \
 fail=
 initWait          "$VSERVER_DIR" "$S_CONTEXT" vwait_statdir
 if test -n "$_IS_FAKEINIT" && \
@@ -72,6 +82,7 @@ if test -n "$_IS_FAKEINIT" && \
 elif $_VSERVER_INFO - FEATURE migrate; then
     "${NICE_CMD[@]}" \
     "${CHBIND_CMD[@]}" \
 elif $_VSERVER_INFO - FEATURE migrate; then
     "${NICE_CMD[@]}" \
     "${CHBIND_CMD[@]}" \
+    "$_VSPACE" --enter "$S_CONTEXT" "${OPTS_VSPACE[@]}" -- \
     "$_VTAG" --migrate "${OPTS_VTAG_ENTER[@]}" --silent -- \
     $_VCONTEXT $SILENT_OPT --migrate --chroot --xid "$S_CONTEXT" -- \
     "${INITCMD_STOP[@]}" || fail=1
     "$_VTAG" --migrate "${OPTS_VTAG_ENTER[@]}" --silent -- \
     $_VCONTEXT $SILENT_OPT --migrate --chroot --xid "$S_CONTEXT" -- \
     "${INITCMD_STOP[@]}" || fail=1
@@ -85,10 +96,10 @@ else
 fi
 
 # Remove persistent so those contexts can be stopped
 fi
 
 # Remove persistent so those contexts can be stopped
-$_VATTRIBUTE --set --xid "$S_CONTEXT" --flag ~persistent 2>/dev/null || :
-if $_VSERVER_INFO -q "$S_CONTEXT" XIDTYPE static &&
+$_VATTRIBUTE --set --xid "$S_CONTEXT" --flag !persistent 2>/dev/null || :
+if $_VSERVER_INFO -q "$N_CONTEXT" XIDTYPE static &&
    $_VSERVER_INFO - FEATURE vnet; then
    $_VSERVER_INFO - FEATURE vnet; then
-    $_NATTRIBUTE --set --nid "$S_CONTEXT" --flag ~persistent 2>/dev/null || :
+    $_NATTRIBUTE --set --nid "$N_CONTEXT" --flag !persistent 2>/dev/null || :
 fi
 
 vshelper.doStopSync
 fi
 
 vshelper.doStopSync
@@ -103,7 +114,9 @@ sendKillSequence   "$S_CONTEXT" "${INITKILL_SEQ[@]}"
     echo $"Vserver '$VSERVER_DIR' still running unexpectedly; please investigate it manually..." >&2
 
 execScriptlets    "$VSERVER_DIR" "$VSERVER_NAME" post-stop
     echo $"Vserver '$VSERVER_DIR' still running unexpectedly; please investigate it manually..." >&2
 
 execScriptlets    "$VSERVER_DIR" "$VSERVER_NAME" post-stop
-    
+
+handleDeviceMap --unset "$S_CONTEXT" "$VSERVER_DIR/apps/vdevmap"
+
 umountVserver     "$VSERVER_DIR" || :
 disableInterfaces "$VSERVER_DIR"
 
 umountVserver     "$VSERVER_DIR" || :
 disableInterfaces "$VSERVER_DIR"
 
index 3f35e90..e2afcb5 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: vserver.suexec 2599 2007-08-26 21:30:50Z dhozac $  --*- sh -*--
+# $Id: vserver.suexec 2669 2008-01-22 09:19:57Z dhozac $  --*- sh -*--
 
 # Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 #  
 
 # Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 #  
@@ -38,6 +38,7 @@ if $_VSERVER_INFO - FEATURE migrate; then
        "${CHBIND_CMD[@]}" \
        $_EXEC_ULIMIT "$VSERVER_DIR/ulimits" \
        ${USE_VNAMESPACE:+$_VNAMESPACE --enter "$S_CONTEXT" -- } \
        "${CHBIND_CMD[@]}" \
        $_EXEC_ULIMIT "$VSERVER_DIR/ulimits" \
        ${USE_VNAMESPACE:+$_VNAMESPACE --enter "$S_CONTEXT" -- } \
+       $_VSPACE --enter "$S_CONTEXT" "${OPTS_VSPACE[@]}" -- \
        $_VTAG --migrate "${OPTS_VTAG_ENTER[@]}" --silent -- \
        $_VCONTEXT $SILENT_OPT --migrate --chroot \
          --xid "$S_CONTEXT" --uid "$user" "${OPTS_VCONTEXT_ENTER[@]}" -- \
        $_VTAG --migrate "${OPTS_VTAG_ENTER[@]}" --silent -- \
        $_VCONTEXT $SILENT_OPT --migrate --chroot \
          --xid "$S_CONTEXT" --uid "$user" "${OPTS_VCONTEXT_ENTER[@]}" -- \
index 7e4cd17..6084c01 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/bash
 #!/bin/bash
-# $Id: vupdateworld 2486 2007-02-05 18:08:17Z hollow $
+# $Id: vupdateworld 2635 2007-11-17 23:52:59Z hollow $
 
 # Copyright (C) 2006 Benedikt Boehm <hollow@gentoo.org>
 #  
 
 # Copyright (C) 2006 Benedikt Boehm <hollow@gentoo.org>
 #  
@@ -58,8 +58,8 @@ while true; do
        (--debug)       send_through=( "${send_through[@]}" "$1" ); set -x;;
        (--quiet|-q)    send_through=( "${send_through[@]}" "$1" );;
        (--all)         vsomething_opts=( "${vsomething_opts[@]}" "$1" );;
        (--debug)       send_through=( "${send_through[@]}" "$1" ); set -x;;
        (--quiet|-q)    send_through=( "${send_through[@]}" "$1" );;
        (--all)         vsomething_opts=( "${vsomething_opts[@]}" "$1" );;
-       (--)            shift; break;;
-       (*)             echo $"vemerge: internal error; arg=='$1'" >&2; exit 1;;
+       (--)            test ${#vsomething_opts[@]} -eq 0 && shift; break;;
+       (*)             echo $"vupdateworld: internal error; arg=='$1'" >&2; exit 1;;
     esac
     shift
 done
     esac
     shift
 done
@@ -74,10 +74,8 @@ while [ $# -gt 0 ]; do
     shift
 done
 
     shift
 done
 
-VSOMETHING_TITLE=vemerge
+VSOMETHING_TITLE=vupdateworld
 VSOMETHING_PKGMGMT=1
 
 export VSOMETHING_TITLE VSOMETHING_PKGMGMT
 VSOMETHING_PKGMGMT=1
 
 export VSOMETHING_TITLE VSOMETHING_PKGMGMT
-
-test ${#vsomething_opts[@]} -eq 0 || vsomething_opts=( "${vsomething_opts[@]}" -- )
 exec $_VSOMETHING "${send_through[@]}" emerge "${vsomething_opts[@]}" "${vserver_names[@]}" -- world --update --deep --newuse "$@"
 exec $_VSOMETHING "${send_through[@]}" emerge "${vsomething_opts[@]}" "${vserver_names[@]}" -- world --update --deep --newuse "$@"
index b557433..bfe10ce 100644 (file)
@@ -1,4 +1,4 @@
-## $Id: Makefile-files 2589 2007-08-16 03:06:50Z dhozac $  -*- makefile -*-
+## $Id: Makefile-files 2697 2008-03-01 01:24:07Z dhozac $  -*- makefile -*-
 
 ## Copyright (C) 2003,2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 ##  
 
 ## Copyright (C) 2003,2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 ##  
@@ -82,9 +82,12 @@ DIETPROGS +=         src/chcontext-compat \
                        src/vsysctl \
                        src/vclone \
                        src/h2ext \
                        src/vsysctl \
                        src/vclone \
                        src/h2ext \
-                       src/vtag
+                       src/vtag \
+                       src/vspace \
+                       src/vmemctrl \
+                       src/tunctl
 
 
-if ENSC_CAN_BEECRYPT_WITH_DIETLIBC
+if ENSC_CAN_CRYPTO_WITH_DIETLIBC
 DIETPROGS +=           src/vhashify
 endif
 
 DIETPROGS +=           src/vhashify
 endif
 
@@ -99,7 +102,8 @@ noinst_HEADERS +=    src/capability-compat.h \
                        src/vhashify.h \
                        src/vhashify-init.hc \
                        src/vserver-visitdir.hc \
                        src/vhashify.h \
                        src/vhashify-init.hc \
                        src/vserver-visitdir.hc \
-                       src/context-sync.hc
+                       src/context-sync.hc \
+                       src/attribute-util.h
 
 pkglib_PROGRAMS +=     src/capchroot \
                        src/chain-echo \
 
 pkglib_PROGRAMS +=     src/capchroot \
                        src/chain-echo \
@@ -121,13 +125,14 @@ pkglib_PROGRAMS +=        src/capchroot \
                        src/chbind-compat \
                        src/vsysctl \
                        src/h2ext \
                        src/chbind-compat \
                        src/vsysctl \
                        src/h2ext \
+                       src/tunctl \
                        $(src_pkglib_C99_X_PROGS) \
                        $(src_pkglib_CXX_X_PROGS)
 
 if ENSC_HAVE_C99_COMPILER
                        $(src_pkglib_C99_X_PROGS) \
                        $(src_pkglib_CXX_X_PROGS)
 
 if ENSC_HAVE_C99_COMPILER
-if ENSC_HAVE_BEECRYPT
+if ENSC_HAVE_CRYPTO
 pkglib_PROGRAMS +=     src/vhashify
 pkglib_PROGRAMS +=     src/vhashify
-endif ENSC_HAVE_BEECRYPT
+endif ENSC_HAVE_CRYPTO
 endif ENSC_HAVE_C99_COMPILER
 
 legacy_PROGRAMS +=     src/ifspec \
 endif ENSC_HAVE_C99_COMPILER
 
 legacy_PROGRAMS +=     src/ifspec \
@@ -163,6 +168,8 @@ sbin_PROGRAMS +=    src/exec-cd \
                        src/naddress \
                        src/vdevmap \
                        src/vtag \
                        src/naddress \
                        src/vdevmap \
                        src/vtag \
+                       src/vspace \
+                       src/vmemctrl \
                        $(src_sbin_CXX_X_PROGS)
 
 if ENSC_HAVE_C99_COMPILER
                        $(src_sbin_CXX_X_PROGS)
 
 if ENSC_HAVE_C99_COMPILER
@@ -291,12 +298,13 @@ src_vunify_LDADD =                $(LIBINTERNAL) $(VSERVER_LDADDS)
 src_vunify_LDFLAGS =           $(VSERVER_LDFLGS)
 
 src_vhashify_SOURCES =         src/vhashify.c
 src_vunify_LDFLAGS =           $(VSERVER_LDFLGS)
 
 src_vhashify_SOURCES =         src/vhashify.c
-if ENSC_CAN_BEECRYPT_WITH_DIETLIBC
-src_vhashify_LDADD =           $(LIBINTERNAL) $(LIBENSCVECTOR) -lbeecrypt $(VSERVER_LDADDS)
+src_vhashify_CFLAGS =          $(AM_CFLAGS) $(ENSC_CRYPTO_CFLAGS)
+if ENSC_CAN_CRYPTO_WITH_DIETLIBC
+src_vhashify_LDADD =           $(LIBINTERNAL) $(LIBENSCVECTOR) $(ENSC_CRYPTO_LIB) $(VSERVER_LDADDS)
 src_vhashify_LDFLAGS =         $(VSERVER_LDFLGS)
 else
 src_vhashify_LDFLAGS =         $(VSERVER_LDFLGS)
 else
-src_vhashify_LDADD =           $(LIBINTERNAL_GLIBC) $(LIBENSCVECTOR_GLIBC) $(LIBVSERVER_GLIBC) -lbeecrypt
-src_vhashify_LDFLAGS =
+src_vhashify_LDADD =           $(LIBINTERNAL_GLIBC) $(LIBENSCVECTOR_GLIBC) $(LIBVSERVER_GLIBC) $(ENSC_CRYPTO_LIB)
+src_vhashify_LDFLAGS =          -Wl,--as-needed
 endif
 
 src_vuname_SOURCES =           src/vuname.c
 endif
 
 src_vuname_SOURCES =           src/vuname.c
@@ -348,6 +356,18 @@ src_vtag_SOURCES           = src/vtag.c
 src_vtag_LDADD                 = $(VSERVER_LDADDS)
 src_vtag_LDFLAGS               = $(VSERVER_LDADDS)
 
 src_vtag_LDADD                 = $(VSERVER_LDADDS)
 src_vtag_LDFLAGS               = $(VSERVER_LDADDS)
 
+src_vspace_SOURCES             = src/vspace.c
+src_vspace_LDADD               = $(VSERVER_LDADDS) $(LIBINTERNAL)
+src_vspace_LDFLAGS             = $(VSERVER_LDFLGS)
+
+src_vmemctrl_SOURCES           = src/vmemctrl.c
+src_vmemctrl_LDADD             = $(VSERVER_LDADDS) $(LIBINTERNAL)
+src_vmemctrl_LDFLAGS           = $(VSERVER_LDFLGS)
+
+src_tunctl_SOURCES             = src/tunctl.c
+src_tunctl_LDADD               = $(VSERVER_LDADDS) $(LIBINTERNAL)
+src_tunctl_LDFLAGS             = $(VSERVER_LDFLGS)
+
 EXTRA_PROGRAMS +=              $(src_sbin_CXX_PROGS) $(src_pkglib_CXX_PROGS)
 
 TESTS_ENVIRONMENT +=           srctestsuitedir=$(top_builddir)/src/testsuite
 EXTRA_PROGRAMS +=              $(src_sbin_CXX_PROGS) $(src_pkglib_CXX_PROGS)
 
 TESTS_ENVIRONMENT +=           srctestsuitedir=$(top_builddir)/src/testsuite
diff --git a/src/attribute-util.h b/src/attribute-util.h
new file mode 100644 (file)
index 0000000..5f11938
--- /dev/null
@@ -0,0 +1,65 @@
+// $Id$    --*- c -*--
+
+// Copyright (C) 2007-2008 Daniel Hokka Zakrisson
+//  
+// 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; version 2 of the License.
+//  
+// 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.
+
+#ifndef _ATTRIBUTE_UTIL_H
+#define _ATTRIBUTE_UTIL_H
+
+static inline int
+ffsull(unsigned long long word)
+{
+  int bit;
+  for (bit = 0; bit < 64; bit++) {
+    if (word & (1ULL << bit))
+      break;
+  }
+  if (bit == 64)
+    bit = 0;
+  return bit;
+}
+
+#define print_bitfield(fd, type, name, var)    \
+  do {                                         \
+  int first;                                   \
+  WRITE_MSG(fd, name ":\n");                   \
+  first = 1;                                   \
+  while (1) {                                  \
+    char const *i;                             \
+    i = vc_lo ## type ## 2text(var);           \
+    if (!i)                                    \
+      break;                                   \
+    if (!first)                                        \
+      WRITE_MSG(fd, ",");                      \
+    else                                       \
+      first = 0;                               \
+    WRITE_STR(fd, i);                          \
+  }                                            \
+  while (*(var)) {                             \
+    int bit = ffsull(*(var));                  \
+    if (!bit)                                  \
+      break;                                   \
+    if (!first)                                        \
+      WRITE_MSG(fd, ",");                      \
+    else                                       \
+      first = 0;                               \
+    WRITE_MSG(fd, "^");                                \
+    WRITE_INT(fd, bit);                                \
+    *(var) &= ~(1ULL << bit);                  \
+  }                                            \
+  WRITE_MSG(fd, "\n");                         \
+  } while (0)
+
+#endif
index 50d3094..717ce1c 100644 (file)
@@ -1,4 +1,4 @@
-// $Id$
+// $Id: h2ext.c 2674 2008-01-27 07:55:13Z dhozac $
 
 // Copyright (C) 2007 Daniel Hokka Zakrisson <daniel@hozac.com>
 //  
 
 // Copyright (C) 2007 Daniel Hokka Zakrisson <daniel@hozac.com>
 //  
@@ -210,17 +210,6 @@ byteswap(void *p, size_t len)
   }
 }
 
   }
 }
 
-static inline ALWAYSINLINE void
-WRITE_INT(int fd, int num)
-{
-  char   buf[sizeof(num)*3+2];
-  size_t l;
-
-  l = utilvserver_fmt_long(buf,num);
-
-  Vwrite(fd, buf, l);
-}
-
 static int
 load_description(const char *file, file_format_t **head)
 {
 static int
 load_description(const char *file, file_format_t **head)
 {
index 2fe31b2..a5e4836 100644 (file)
@@ -1,4 +1,4 @@
-// $Id: lockfile.c 1447 2004-04-13 08:27:50Z ensc $    --*- c -*--
+// $Id: lockfile.c 2696 2008-03-01 01:20:42Z dhozac $    --*- c -*--
 
 // Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 //  
 
 // Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 //  
@@ -44,7 +44,7 @@ showHelp(char const *cmd)
            "  2.  'lockfile' will be called\n"
            "  3a. 'lockfile' waits until somebody opens the <syncpipe> for reading\n"
            "  3b. parent (shell) opens the pipe for reading and blocks\n"
            "  2.  'lockfile' will be called\n"
            "  3a. 'lockfile' waits until somebody opens the <syncpipe> for reading\n"
            "  3b. parent (shell) opens the pipe for reading and blocks\n"
-           "  4.  'lockfile' calls flock() on the <lockfile>\n"
+           "  4.  'lockfile' calls lockf() on the <lockfile>\n"
            "  5.  'lockfile' closes the <syncpipe>\n"
            "  6.  parent (shell) unlocks since <syncpipe> is closed\n"
            "  7.  'lockfile' goes into infinite loop\n"
            "  5.  'lockfile' closes the <syncpipe>\n"
            "  6.  parent (shell) unlocks since <syncpipe> is closed\n"
            "  7.  'lockfile' goes into infinite loop\n"
@@ -110,7 +110,7 @@ int main(int argc, char *argv[])
                   
   if ((sync_fd=open(argv[idx+1], O_WRONLY))==-1)
     perror("lockfile: open(<syncpipe>)");
                   
   if ((sync_fd=open(argv[idx+1], O_WRONLY))==-1)
     perror("lockfile: open(<syncpipe>)");
-  else if ((fd=open(argv[idx], O_CREAT|O_RDONLY|O_NOFOLLOW|O_NONBLOCK, 0644))==-1)
+  else if ((fd=open(argv[idx], O_CREAT|O_WRONLY|O_NOFOLLOW|O_NONBLOCK, 0644))==-1)
     perror("lockfile: open(<lockfile>)");
   else if (unlink(argv[idx+1])==-1)
     perror("lockfile: unlink(<syncpipe>)");
     perror("lockfile: open(<lockfile>)");
   else if (unlink(argv[idx+1])==-1)
     perror("lockfile: unlink(<syncpipe>)");
@@ -122,10 +122,10 @@ int main(int argc, char *argv[])
   else while (time(0)<end_time && getppid()==ppid) {
     int                duration = end_time-time(0);
     alarm(MIN(10, MAX(duration,1)));
   else while (time(0)<end_time && getppid()==ppid) {
     int                duration = end_time-time(0);
     alarm(MIN(10, MAX(duration,1)));
-    
-    if (flock(fd,LOCK_EX)==-1) {
+
+    if (lockf(fd,F_LOCK,0)==-1) {
       if (errno==EINTR) continue;
       if (errno==EINTR) continue;
-      perror("lockfile: flock()");
+      perror("lockfile: lockf()");
       break;
     }
     signal(SIGALRM, SIG_IGN);
       break;
     }
     signal(SIGALRM, SIG_IGN);
index c459dfb..04a6ba2 100644 (file)
@@ -1,4 +1,4 @@
-// $Id: naddress.c 2584 2007-08-10 15:28:42Z dhozac $
+// $Id: naddress.c 2668 2008-01-21 14:13:52Z dhozac $
 
 // Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 // Copyright (C) 2006 Daniel Hokka Zakrisson <daniel@hozac.com>
 
 // Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 // Copyright (C) 2006 Daniel Hokka Zakrisson <daniel@hozac.com>
@@ -237,94 +237,98 @@ maskToPrefix(void *data, int limit)
   return prefix;
 }
 
   return prefix;
 }
 
-static void
-readIP(char const *str, struct vc_ips **ips, uint16_t type)
+static int
+parseIPFormat(char const *str_c, struct vc_ips **ips,
+            char const *format)
 {
 {
-  if (ifconfig_getaddr(str, &(*ips)->a.vna_v4_ip.s_addr, &(*ips)->a.vna_v4_mask.s_addr, NULL)==-1) {
-    char               *pt;
-    char               tmpopt[strlen(str)+1];
+  size_t len = strlen(str_c);
+  char const *fc;
+  char str[len + 1], *ptr = str;
+  int ret = 0;
+
+  strcpy(str, str_c);
+
+  /* XXX: condition at the bottom */
+  for (fc = format; ; fc += 2) {
+    char *sep;
+    void *dst;
+    unsigned long limit = 0;
+
+    switch (*fc) {
+      case '1': dst = &(*ips)->a.s.ip;         break;
+      case '2': dst = &(*ips)->a.s.ip2;                break;
+      case 'm':        dst = &(*ips)->a.s.mask;        break;
+      default:                                 goto out;
+    }
 
 
-    strcpy(tmpopt,str);
-    pt = strchr(tmpopt,'/');
-    if (pt)
-      *pt++ = '\0';
+    if (len == 0)
+      goto out;
+    if ((sep = memchr(ptr, *(fc + 1), len)) == NULL)
+      sep = ptr + len;
+    *sep = '\0';
 
 
-    if (convertAddress(tmpopt, &(*ips)->a.vna_type, &(*ips)->a.vna_v4_ip.s_addr) == -1) {
-      WRITE_MSG(2, "Invalid IP number '");
-      WRITE_STR(2, tmpopt);
-      WRITE_MSG(2, "'\n");
-      exit(wrapper_exit_code);
+    /* This is ugly, and means that m cannot be first */
+    switch ((*ips)->a.vna_type) {
+      case VC_NXA_TYPE_IPV4: limit =  32;      break;
+      case VC_NXA_TYPE_IPV6: limit = 128;      break;
     }
 
     }
 
-    if (pt==0) {
+    /* This is required due to the dain-bramage that is inet_pton in dietlibc.
+     * Essentially any number will be parsed as a valid IPv4 address...
+     */
+    if (*fc == 'm' && strchr(ptr, ':') == NULL && strchr(ptr, '.') == NULL) {
+      /* This is a prefix, not a netmask */
+      unsigned long    sz;
+
+      if (!isNumberUnsigned(ptr, &sz, true) || sz > limit) {
+       ret = -1;
+       goto out;
+      }
+
+      (*ips)->a.vna_prefix = sz;
       switch ((*ips)->a.vna_type) {
        case VC_NXA_TYPE_IPV4:
       switch ((*ips)->a.vna_type) {
        case VC_NXA_TYPE_IPV4:
-         (*ips)->a.vna_v4_mask.s_addr = htonl(0xffffff00);
-         (*ips)->a.vna_prefix = 24;
+         (*ips)->a.vna_v4_mask.s_addr = htonl(~((1 << (32 - sz)) - 1));
          break;
        case VC_NXA_TYPE_IPV6:
          break;
        case VC_NXA_TYPE_IPV6:
-         (*ips)->a.vna_prefix = 64;
-         (*ips)->a.vna_v6_mask.s6_addr32[0] = (*ips)->a.vna_v6_mask.s6_addr32[1] = 0xffffffff;
-         (*ips)->a.vna_v6_mask.s6_addr32[2] = (*ips)->a.vna_v6_mask.s6_addr32[3] = 0x00000000;
+         ipv6PrefixToMask(&(*ips)->a.vna_v6_mask, sz);
          break;
          break;
-       default: break;
       }
     }
     else {
       }
     }
     else {
-      // Ok, we have a network size, not a netmask
-      if (strchr(pt,'.')==0 && strchr(pt,':')==0) {
-       unsigned long   sz, limit = 0;
-
-       switch ((*ips)->a.vna_type) {
-         case VC_NXA_TYPE_IPV4: limit =  32;   break;
-         case VC_NXA_TYPE_IPV6: limit = 128;   break;
-         default:                              break;
-       }
-
-       if (!isNumberUnsigned(pt, &sz, true) || sz > limit) {
-         WRITE_MSG(2, "Invalid prefix '");
-         WRITE_STR(2, pt);
-         WRITE_MSG(2, "'\n");
-         exit(wrapper_exit_code);
-       }
-
-       (*ips)->a.vna_prefix = sz;
-       switch ((*ips)->a.vna_type) {
-         case VC_NXA_TYPE_IPV4:
-           (*ips)->a.vna_v4_mask.s_addr = htonl(~((1 << (32 - sz)) - 1));
-           break;
-         case VC_NXA_TYPE_IPV6:
-           ipv6PrefixToMask(&(*ips)->a.vna_v6_mask, (*ips)->a.vna_prefix);
-           break;
-         default: break;
-       }
+      if (convertAddress(ptr, &(*ips)->a.vna_type, dst) == -1) {
+       ret = -1;
+       goto out;
       }
       }
-      else {
-       int af, limit;
-       void *mask;
-       switch ((*ips)->a.vna_type) {
-         case VC_NXA_TYPE_IPV4:
-           af = AF_INET;
-           mask = &(*ips)->a.vna_v4_mask.s_addr;
-           limit = 32;
-           break;
-         case VC_NXA_TYPE_IPV6:
-           af = AF_INET6;
-           mask = (*ips)->a.vna_v6_mask.s6_addr32;
-           limit = 128;
-           break;
-         default:
-           return;
-       }
-       if (inet_pton(af, pt, mask) < 0) {
-         WRITE_MSG(2, "Invalid netmask '");
-         WRITE_STR(2, pt);
-         WRITE_MSG(2, "'\n");
-         exit(wrapper_exit_code);
-       }
-       (*ips)->a.vna_prefix = maskToPrefix(mask, limit);
+      else if (*fc == 'm') {
+       /* Got a mask, set the prefix */
+       (*ips)->a.vna_prefix = maskToPrefix(&(*ips)->a.s.mask, limit);
       }
     }
       }
     }
+
+    ret++;
+    len -= (sep - ptr);
+    ptr = sep + 1;
+
+    if (*(fc + 1) == '\0')
+      break;
+  }
+
+out:
+  free(str);
+  return ret;
+}
+
+static void
+readIP(char const *str, struct vc_ips **ips, uint16_t type)
+{
+  if (ifconfig_getaddr(str, &(*ips)->a.vna_v4_ip.s_addr, &(*ips)->a.vna_v4_mask.s_addr, NULL)==-1) {
+    if (parseIPFormat(str, ips, "1/m") < 1) {
+      WRITE_MSG(2, "Invalid IP number '");
+      WRITE_STR(2, str);
+      WRITE_MSG(2, "'\n");
+      exit(wrapper_exit_code);
+    }
   }
   else
     (*ips)->a.vna_type = VC_NXA_TYPE_IPV4;
   }
   else
     (*ips)->a.vna_type = VC_NXA_TYPE_IPV4;
@@ -352,6 +356,20 @@ readBcast(char const *str, struct vc_ips **ips)
   *ips = (*ips)->next;
 }
 
   *ips = (*ips)->next;
 }
 
+static void
+readRange(char const *str, struct vc_ips **ips)
+{
+  if (parseIPFormat(str, ips, "1-2/m") < 2) {
+    WRITE_MSG(2, "Invalid range '");
+    WRITE_STR(2, str);
+    WRITE_MSG(2, "'\n");
+    exit(wrapper_exit_code);
+  }
+  (*ips)->a.vna_type |= VC_NXA_TYPE_RANGE;
+  (*ips)->next = calloc(1, sizeof(struct vc_ips));
+  *ips = (*ips)->next;
+}
+
 static void
 tellAddress(struct vc_net_addr *addr, bool silent)
 {
 static void
 tellAddress(struct vc_net_addr *addr, bool silent)
 {
@@ -452,7 +470,7 @@ int main (int argc, char *argv[])
       case CMD_SET     :  args.do_set    = true; break;
       case CMD_IP      :  readIP(optarg, &ips, VC_NXA_TYPE_ADDR);  break;
       case CMD_MASK    :  readIP(optarg, &ips, VC_NXA_TYPE_MASK);  break;
       case CMD_SET     :  args.do_set    = true; break;
       case CMD_IP      :  readIP(optarg, &ips, VC_NXA_TYPE_ADDR);  break;
       case CMD_MASK    :  readIP(optarg, &ips, VC_NXA_TYPE_MASK);  break;
-      case CMD_RANGE   :  readIP(optarg, &ips, VC_NXA_TYPE_RANGE); break;
+      case CMD_RANGE   :  readRange(optarg, &ips); break;
       case CMD_BCAST   :  readBcast(optarg, &ips); break;
       case CMD_LBACK   :  readIP(optarg, &ips, VC_NXA_TYPE_ADDR | VC_NXA_MOD_LBACK); break;
       default          :
       case CMD_BCAST   :  readBcast(optarg, &ips); break;
       case CMD_LBACK   :  readIP(optarg, &ips, VC_NXA_TYPE_ADDR | VC_NXA_MOD_LBACK); break;
       default          :
index b211bd2..b8bda61 100644 (file)
@@ -1,4 +1,4 @@
-// $Id: nattribute.c 2585 2007-08-12 00:13:31Z dhozac $    --*- c -*--
+// $Id: nattribute.c 2694 2008-03-01 01:07:49Z dhozac $    --*- c -*--
 
 // Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 // Copyright (C) 2006 Daniel Hokka Zakrisson
 
 // Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 // Copyright (C) 2006 Daniel Hokka Zakrisson
@@ -22,6 +22,7 @@
 #endif
 
 #include "util.h"
 #endif
 
 #include "util.h"
+#include "attribute-util.h"
 #include <lib/vserver.h>
 
 #include <getopt.h>
 #include <lib/vserver.h>
 
 #include <getopt.h>
@@ -40,6 +41,7 @@
 #define CMD_CAP                        0x2002
 #define CMD_FLAG               0x2003
 #define CMD_SECURE             0x2004
 #define CMD_CAP                        0x2002
 #define CMD_FLAG               0x2003
 #define CMD_SECURE             0x2004
+#define CMD_GET                        0x2005
 
 int                    wrapper_exit_code = 1;
 
 
 int                    wrapper_exit_code = 1;
 
@@ -52,13 +54,15 @@ CMDLINE_OPTIONS[] = {
   { "ncap",       required_argument, 0, CMD_CAP },
   { "flag",       required_argument, 0, CMD_FLAG },
   { "secure",     no_argument,       0, CMD_SECURE },
   { "ncap",       required_argument, 0, CMD_CAP },
   { "flag",       required_argument, 0, CMD_FLAG },
   { "secure",     no_argument,       0, CMD_SECURE },
+  { "get",        no_argument,       0, CMD_GET },
   {0,0,0,0}
 };
 
 struct Arguments {
   {0,0,0,0}
 };
 
 struct Arguments {
+    int                        mode;
     nid_t              nid;
     nid_t              nid;
-    struct vc_net_flags flags;
-    struct vc_net_caps  caps;
+    struct vc_net_flags        flags;
+    struct vc_net_caps caps;
 };
 
 static void
 };
 
 static void
@@ -67,7 +71,8 @@ showHelp(int fd, char const *cmd, int res)
   WRITE_MSG(fd, "Usage:\n    ");
   WRITE_STR(fd, cmd);
   WRITE_MSG(fd,
   WRITE_MSG(fd, "Usage:\n    ");
   WRITE_STR(fd, cmd);
   WRITE_MSG(fd,
-           " --set [--nid <nid>] [--ncap [~!]<ncap>] [--flag [~!]<flag>] [--secure] -- [<program> <args>*]\n"
+           " {--set|--get} [--nid <nid>] [--ncap [~!]<ncap>] [--flag [~!]<flag>] [--secure] --\n"
+           "    [<program> <args>*]\n"
            "\n"
            " --ncap <cap>   ...  network capability to be added\n"
            " --flag <flag>  ...  network flag to be added\n"
            "\n"
            " --ncap <cap>   ...  network capability to be added\n"
            " --flag <flag>  ...  network flag to be added\n"
@@ -81,7 +86,7 @@ static void
 showVersion()
 {
   WRITE_MSG(1,
 showVersion()
 {
   WRITE_MSG(1,
-           "nattribute " VERSION " -- sets attributes of network contexts\n"
+           "nattribute " VERSION " -- sets/gets attributes of network contexts\n"
            "This program is part of " PACKAGE_STRING "\n\n"
            "Copyright (C) 2004 Enrico Scholz\n"
            "Copyright (C) 2006 Daniel Hokka Zakrisson\n"
            "This program is part of " PACKAGE_STRING "\n\n"
            "Copyright (C) 2004 Enrico Scholz\n"
            "Copyright (C) 2006 Daniel Hokka Zakrisson\n"
@@ -133,9 +138,25 @@ parseSecure(struct vc_net_flags * flags,
   flags->mask     = VC_NXF_HIDE_NETIF;
 }
 
   flags->mask     = VC_NXF_HIDE_NETIF;
 }
 
+static int
+printAttrs(struct Arguments *args)
+{
+  struct vc_net_flags flags;
+  struct vc_net_caps  caps;
+
+  Evc_get_nflags(args->nid, &flags);
+  Evc_get_ncaps(args->nid, &caps);
+
+  print_bitfield(1, ncap, "ncapabilities", &caps.ncaps);
+  print_bitfield(1, nflag, "nflags", &flags.flagword);
+
+  return 0;
+}
+
 int main(int argc, char *argv[])
 {
   struct Arguments             args = {
 int main(int argc, char *argv[])
 {
   struct Arguments             args = {
+    .mode  = CMD_SET,
     .nid   = VC_NOCTX,
     .flags = { .flagword = 0, .mask = 0 },
     .caps  = { .ncaps = 0, .cmask = 0 },
     .nid   = VC_NOCTX,
     .flags = { .flagword = 0, .mask = 0 },
     .caps  = { .ncaps = 0, .cmask = 0 },
@@ -148,7 +169,8 @@ int main(int argc, char *argv[])
     switch (c) {
       case CMD_HELP    :  showHelp(1, argv[0], 0);
       case CMD_VERSION :  showVersion();
     switch (c) {
       case CMD_HELP    :  showHelp(1, argv[0], 0);
       case CMD_VERSION :  showVersion();
-      case CMD_SET     :  break; // default op currently
+      case CMD_SET     :  args.mode = CMD_SET;                    break;
+      case CMD_GET     :  args.mode = CMD_GET;                    break;
       case CMD_NID     :  args.nid = Evc_nidopt2nid(optarg,true); break;
       case CMD_FLAG    :  parseFlags(optarg, &args.flags);        break;
       case CMD_CAP     :  parseNCaps(optarg, &args.caps);         break;
       case CMD_NID     :  args.nid = Evc_nidopt2nid(optarg,true); break;
       case CMD_FLAG    :  parseFlags(optarg, &args.flags);        break;
       case CMD_CAP     :  parseNCaps(optarg, &args.caps);         break;
@@ -164,16 +186,25 @@ int main(int argc, char *argv[])
 
   if (args.nid==VC_NOCTX) args.nid = Evc_get_task_nid(0);
 
 
   if (args.nid==VC_NOCTX) args.nid = Evc_get_task_nid(0);
 
-  if (args.caps.cmask &&
-      vc_set_ncaps(args.nid, &args.caps)==-1)
-    perror(ENSC_WRAPPERS_PREFIX "vc_set_ncaps()");
-  else if (args.flags.mask &&
-          vc_set_nflags(args.nid, &args.flags)==-1)
-    perror(ENSC_WRAPPERS_PREFIX "vc_set_nflags()");
-  else if (optind<argc)
-    EexecvpD(argv[optind], argv+optind);
-  else
-    return EXIT_SUCCESS;
+  if (args.mode == CMD_SET) {
+    if (args.caps.cmask &&
+        vc_set_ncaps(args.nid, &args.caps)==-1)
+      perror(ENSC_WRAPPERS_PREFIX "vc_set_ncaps()");
+    else if (args.flags.mask &&
+            vc_set_nflags(args.nid, &args.flags)==-1)
+      perror(ENSC_WRAPPERS_PREFIX "vc_set_nflags()");
+    else if (optind<argc)
+      EexecvpD(argv[optind], argv+optind);
+    else
+      return EXIT_SUCCESS;
+  }
+  else if (args.mode == CMD_GET) {
+    printAttrs(&args);
+    if (optind<argc)
+      EexecvpD(argv[optind], argv+optind);
+    else
+      return EXIT_SUCCESS;
+  }
 
   return EXIT_FAILURE;
 }
 
   return EXIT_FAILURE;
 }
index 9bb5a6c..8f34e15 100644 (file)
@@ -1,4 +1,4 @@
-// $Id: rpm-fake.c 2578 2007-08-08 20:05:26Z dhozac $    --*- c++ -*--
+// $Id: rpm-fake.c 2693 2008-03-01 00:26:31Z dhozac $    --*- c++ -*--
 
 // Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 //  
 
 // Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 //  
@@ -96,6 +96,8 @@ static unsigned int   debug_level = 0;
 
 static bool            is_initialized = false;
 
 
 static bool            is_initialized = false;
 
+static bool            ctx_created = false;
+
   //DECLARE(rpm_execcon);
   //DECLARE(execv);
 DECLARE(getpwnam);
   //DECLARE(rpm_execcon);
   //DECLARE(execv);
 DECLARE(getpwnam);
@@ -255,6 +257,7 @@ setupContext(xid_t xid, char const **xid_str)
       char                     buf[sizeof(xid_t)*3 + 128];
       size_t                   l;
       struct vc_ctx_caps       caps;
       char                     buf[sizeof(xid_t)*3 + 128];
       size_t                   l;
       struct vc_ctx_caps       caps;
+      struct vc_ctx_flags      flags;
       
       strcpy(buf, "rpm-fake.so #");
       l = utilvserver_fmt_uint(buf+sizeof("rpm-fake.so #")-1, getppid());
       
       strcpy(buf, "rpm-fake.so #");
       l = utilvserver_fmt_uint(buf+sizeof("rpm-fake.so #")-1, getppid());
@@ -265,11 +268,16 @@ setupContext(xid_t xid, char const **xid_str)
       caps.bcaps = ~vc_get_insecurebcaps();
       caps.bmask = ~0ull;
       Evc_set_ccaps(rc, &caps);
       caps.bcaps = ~vc_get_insecurebcaps();
       caps.bmask = ~0ull;
       Evc_set_ccaps(rc, &caps);
+
+      flags.flagword = 0;
+      flags.mask = VC_VXF_SC_HELPER;
+      Evc_set_cflags(rc, &flags);
       
        // context will be activated later...
 
       xid = rc;
       res = true;
       
        // context will be activated later...
 
       xid = rc;
       res = true;
+      ctx_created = true;
     }
   }
 
     }
   }
 
@@ -510,6 +518,15 @@ exitRPMFake()
     uint8_t    c;
     if (read(sync_sock, &c, 1)!=1) { /*...*/ }
     if (write(pw_sock, "Q", 1)!=1) { /*...*/ }
     uint8_t    c;
     if (read(sync_sock, &c, 1)!=1) { /*...*/ }
     if (write(pw_sock, "Q", 1)!=1) { /*...*/ }
+    if (ctx_created) {
+      if (vc_isSupported(vcFEATURE_VWAIT)) {
+       if (vc_wait_exit(ctx)==-1) { /*...*/ }
+      }
+      else {
+       /* this can race */
+       if (read(sync_sock, &c, 1)!=0) { /*...*/}
+      }
+    }
   }
 }
 
   }
 }
 
index 5fba02d..1bc29c3 100644 (file)
@@ -1,4 +1,4 @@
-// $Id: secure-mount.c 2480 2007-01-28 11:35:19Z dhozac $    --*- c++ -*--
+// $Id: secure-mount.c 2678 2008-02-16 22:09:30Z dhozac $    --*- c++ -*--
 
 // Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 //  
 
 // Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 //  
@@ -279,8 +279,8 @@ updateMtab(struct MountInfo const *mnt, struct Options const *opt)
     goto err0;
   }
 
     goto err0;
   }
 
-  if (flock(fd, LOCK_EX)==-1) {
-    perror("secure-mount: flock()");
+  if (lockf(fd, F_LOCK, 0)==-1) {
+    perror("secure-mount: lockf()");
     goto err1;
   }
 
     goto err1;
   }
 
index 2000d0b..5eeddd7 100644 (file)
@@ -1,4 +1,4 @@
-## $Id: Makefile-files 2245 2006-01-04 17:28:42Z ensc $                --*- makefile -*--
+## $Id: Makefile-files 2685 2008-02-21 23:22:23Z ensc $                --*- makefile -*--
 
 ## Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 ##  
 
 ## Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 ##  
@@ -22,7 +22,7 @@ src_testsuite_check_active_PRGS =     src/testsuite/vunify-functest \
 src_testsuite_check_passive_PRGS =     src/testsuite/rpm-fake-test
 
 if ENSC_HAVE_C99_COMPILER
 src_testsuite_check_passive_PRGS =     src/testsuite/rpm-fake-test
 
 if ENSC_HAVE_C99_COMPILER
-if ENSC_HAVE_BEECRYPT
+if ENSC_HAVE_CRYPTO
 src_testsuite_check_passive_PRGS +=    src/testsuite/hashcalc          \
                                        src/testsuite/hashcalc-plain
 endif
 src_testsuite_check_passive_PRGS +=    src/testsuite/hashcalc          \
                                        src/testsuite/hashcalc-plain
 endif
@@ -33,7 +33,7 @@ check_PROGRAMS +=                     $(src_testsuite_check_passive_PRGS) \
 
 if ENSC_HAVE_C99_COMPILER
 src_testsuite_check_src_C99_SCRPTS =   src/testsuite/vunify-test.sh
 
 if ENSC_HAVE_C99_COMPILER
 src_testsuite_check_src_C99_SCRPTS =   src/testsuite/vunify-test.sh
-if ENSC_HAVE_BEECRYPT
+if ENSC_HAVE_CRYPTO
 src_testsuite_check_src_C99_SCRPTS +=  src/testsuite/hashcalc-plain.sh         \
                                        src/testsuite/hashcalc.sh
 endif
 src_testsuite_check_src_C99_SCRPTS +=  src/testsuite/hashcalc-plain.sh         \
                                        src/testsuite/hashcalc.sh
 endif
@@ -73,18 +73,21 @@ src_testsuite_chbind_test_LDADD =   lib/libvserver.la
 
 src_testsuite_hashcalc_SOURCES =       src/testsuite/hashcalc.c
 src_testsuite_hashcalc_plain_SOURCES = src/testsuite/hashcalc-plain.c
 
 src_testsuite_hashcalc_SOURCES =       src/testsuite/hashcalc.c
 src_testsuite_hashcalc_plain_SOURCES = src/testsuite/hashcalc-plain.c
-if ENSC_CAN_BEECRYPT_WITH_DIETLIBC
-src_testsuite_hashcalc_LDADD =         $(LIBINTERNAL) $(LIBENSCVECTOR) -lbeecrypt $(VSERVER_LDADDS)
+src_testsuite_hashcalc_CFLAGS =                $(AM_CFLAGS) $(ENSC_CRYPTO_CFLAGS)
+src_testsuite_hashcalc_plain_CFLAGS =  $(AM_CFLAGS) $(ENSC_CRYPTO_CFLAGS)
+
+if ENSC_CAN_CRYPTO_WITH_DIETLIBC
+src_testsuite_hashcalc_LDADD =         $(LIBINTERNAL) $(LIBENSCVECTOR) $(ENSC_CRYPTO_LIB) $(VSERVER_LDADDS)
 src_testsuite_hashcalc_LDFLAGS =       $(VSERVER_LDFLGS)
 
 src_testsuite_hashcalc_LDFLAGS =       $(VSERVER_LDFLGS)
 
-src_testsuite_hashcalc_plain_LDADD =   $(LIBINTERNAL) $(LIBENSCVECTOR) -lbeecrypt $(VSERVER_LDADDS)
+src_testsuite_hashcalc_plain_LDADD =   $(LIBINTERNAL) $(LIBENSCVECTOR) $(ENSC_CRYPTO_LIB) $(VSERVER_LDADDS)
 src_testsuite_hashcalc_plain_LDFLAGS = $(VSERVER_LDFLGS)
 else
 src_testsuite_hashcalc_plain_LDFLAGS = $(VSERVER_LDFLGS)
 else
-src_testsuite_hashcalc_LDADD =         $(LIBINTERNAL_GLIBC) $(LIBENSCVECTOR_GLIBC) $(LIBVSERVER_GLIBC) -lbeecrypt
-src_testsuite_hashcalc_LDFLAGS =
+src_testsuite_hashcalc_LDADD =         $(LIBINTERNAL_GLIBC) $(LIBENSCVECTOR_GLIBC) $(LIBVSERVER_GLIBC) $(ENSC_CRYPTO_LIB)
+src_testsuite_hashcalc_LDFLAGS =        -Wl,--as-needed
 
 
-src_testsuite_hashcalc_plain_LDADD =   $(LIBINTERNAL_GLIBC) $(LIBENSCVECTOR_GLIBC) $(LIBVSERVER_GLIBC) -lbeecrypt
-src_testsuite_hashcalc_plain_LDFLAGS =
+src_testsuite_hashcalc_plain_LDADD =   $(LIBINTERNAL_GLIBC) $(LIBENSCVECTOR_GLIBC) $(LIBVSERVER_GLIBC) $(ENSC_CRYPTO_LIB)
+src_testsuite_hashcalc_plain_LDFLAGS =  -Wl,--as-needed
 endif
 
 src_testsuite_CPPFLAGS =               -I $(top_srcdir)/src -D ENSC_TESTSUITE
 endif
 
 src_testsuite_CPPFLAGS =               -I $(top_srcdir)/src -D ENSC_TESTSUITE
index 5b6ff47..bc0f075 100644 (file)
@@ -1,4 +1,4 @@
-// $Id: hashcalc-plain.c 2245 2006-01-04 17:28:42Z ensc $    --*- c -*--
+// $Id: hashcalc-plain.c 2685 2008-02-21 23:22:23Z ensc $    --*- c -*--
 
 // Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 //  
 
 // Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 //  
@@ -20,7 +20,7 @@
 #  include <config.h>
 #endif
 
 #  include <config.h>
 #endif
 
-#include <beecrypt/beecrypt.h>
+#include <lib_internal/crypto-wrapper.h>
 #include <stdbool.h>
 #include <unistd.h>
 #include <fcntl.h>
 #include <stdbool.h>
 #include <unistd.h>
 #include <fcntl.h>
 #define HASH_BLOCKSIZE         0x10000000u
 
 static bool
 #define HASH_BLOCKSIZE         0x10000000u
 
 static bool
-convertDigest(char res[], hashFunctionContext * h_ctx)
+convertDigest(char res[], ensc_hash_context * h_ctx)
 {
   static char const            HEX_DIGIT[] = "0123456789abcdef";
 {
   static char const            HEX_DIGIT[] = "0123456789abcdef";
-  size_t                       d_size   = h_ctx->algo->digestsize;
+  size_t                       d_size   = ensc_crypto_hashctx_get_digestsize(h_ctx);
     
   unsigned char                        digest[d_size];
   size_t                       out = 0;
 
     
   unsigned char                        digest[d_size];
   size_t                       out = 0;
 
-  if (hashFunctionContextDigest(h_ctx, digest)==-1)
+  if (ensc_crypto_hashctx_get_digest(h_ctx, digest, NULL, d_size)==-1)
     return false;
   
   for (size_t in=0; in<d_size; ++in) {
     return false;
   
   for (size_t in=0; in<d_size; ++in) {
@@ -54,19 +54,20 @@ convertDigest(char res[], hashFunctionContext * h_ctx)
 
 int main(int UNUSED argc, char *argv[])
 {
 
 int main(int UNUSED argc, char *argv[])
 {
-  int                  fd = open(argv[1], O_NOFOLLOW|O_NONBLOCK|O_RDONLY|O_NOCTTY);
-  hashFunctionContext  hash_context;
-  hashFunction const   *method;
-  struct stat          st;
-  off_t                        size;
-  loff_t               offset = 0;
-  char                 digest[1024];
+  int                          fd = open(argv[1], O_NOFOLLOW|O_NONBLOCK|O_RDONLY|O_NOCTTY);
+  ensc_hash_context            hash_context;
+  ensc_hash_method const       *method;
+  struct stat                  st;
+  off_t                                size;
+  loff_t                       offset = 0;
+  char                         digest[2048];
 
 
-  assert((method = hashFunctionFind(argv[2]))!=0);
-  assert(hashFunctionContextInit(&hash_context, method)!=-1);
+  ensc_crypto_init();
+  assert((method = ensc_crypto_hash_find(argv[2]))!=0);
+  assert(ensc_crypto_hashctx_init(&hash_context, method)!=-1);
 
   assert(fstat(fd, &st)!=-1);
 
   assert(fstat(fd, &st)!=-1);
-  assert(hashFunctionContextReset(&hash_context)!=-1);
+  assert(ensc_crypto_hashctx_reset(&hash_context)!=-1);
 
   size = st.st_size;
 
 
   size = st.st_size;
 
@@ -77,7 +78,7 @@ int main(int UNUSED argc, char *argv[])
 
     assert((buf=mmap(0, buf_size, PROT_READ, MAP_SHARED, fd, offset))!=0);
     offset += buf_size;
 
     assert((buf=mmap(0, buf_size, PROT_READ, MAP_SHARED, fd, offset))!=0);
     offset += buf_size;
-    assert(hashFunctionContextUpdate(&hash_context, buf, buf_size)!=-1);
+    assert(ensc_crypto_hashctx_update(&hash_context, buf, buf_size)!=-1);
     munmap((void *)(buf), buf_size);
   }
     
     munmap((void *)(buf), buf_size);
   }
     
@@ -86,7 +87,7 @@ int main(int UNUSED argc, char *argv[])
   Vwrite(1, digest, strlen(digest));
   Vwrite(1, "\n", 1);
   
   Vwrite(1, digest, strlen(digest));
   Vwrite(1, "\n", 1);
   
-  hashFunctionContextFree(&hash_context);
+  ensc_crypto_hashctx_free(&hash_context);
   
   return 0;
 }
   
   return 0;
 }
index 3b84e95..dac9148 100644 (file)
@@ -1,4 +1,4 @@
-// $Id: hashcalc.c 2209 2005-10-29 10:33:02Z ensc $    --*- c -*--
+// $Id: hashcalc.c 2685 2008-02-21 23:22:23Z ensc $    --*- c -*--
 
 // Copyright (C) 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 //  
 
 // Copyright (C) 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 //  
@@ -39,17 +39,18 @@ int main(int UNUSED argc, char *argv[])
       volatile unsigned int    canary2;
       volatile unsigned int    canary3;
   } __attribute__((__packed__))        d_path;
       volatile unsigned int    canary2;
       volatile unsigned int    canary3;
   } __attribute__((__packed__))        d_path;
-
   d_path.canary0 = 0x12345678;
   d_path.canary1 = 0x21436587;
   d_path.canary2 = 0x89abcdef;
   d_path.canary3 = 0x98badcfe;
   memset(d_path.d, 0x66, sizeof d_path.d);
 
   d_path.canary0 = 0x12345678;
   d_path.canary1 = 0x21436587;
   d_path.canary2 = 0x89abcdef;
   d_path.canary3 = 0x98badcfe;
   memset(d_path.d, 0x66, sizeof d_path.d);
 
-  global_info.hash_conf.method = hashFunctionFind(argv[2]);
+  ensc_crypto_init();
+  global_info.hash_conf.method = ensc_crypto_hash_find(argv[2]);
   
   
-  assert(hashFunctionContextInit(&global_info.hash_context,
-                                global_info.hash_conf.method)!=-1);
+  assert(ensc_crypto_hashctx_init(&global_info.hash_context,
+                                 global_info.hash_conf.method)!=-1);
 
   assert(fstat(fd, &st)!=-1);
 
 
   assert(fstat(fd, &st)!=-1);
 
@@ -68,7 +69,7 @@ int main(int UNUSED argc, char *argv[])
   Vwrite(1, d_path.d, strlen(d_path.d));
   Vwrite(1, "\n", 1);
   
   Vwrite(1, d_path.d, strlen(d_path.d));
   Vwrite(1, "\n", 1);
   
-  hashFunctionContextFree(&global_info.hash_context);
+  ensc_crypto_hashctx_free(&global_info.hash_context);
   
   return 0;
 }
   
   return 0;
 }
index 600109a..492bfe2 100755 (executable)
@@ -51,21 +51,16 @@ test x"$ensc_use_expensive_tests" != xyes || {
 } &>/dev/null
 
 for i in $tmpdir/rand-*; do
 } &>/dev/null
 
 for i in $tmpdir/rand-*; do
-    sha1_0=$($hashcalc "$i" SHA-1 | tr -d / )
-    sha1_1=$(sha1sum   "$i" | awk '{ print $1}' )
+    for m in md5 sha1 sha256 sha512; do
+       sum_0=$($hashcalc "$i" "$m" | tr -d / )
+       sum_1=$(${m}sum   "$i" | awk '{ print $1}' )
 
 
-    test x"$sha1_0" = x"$sha1_1" || {
-       echo "SHA-1 mismatch at $(basename $i)"
-       exit 1
-    }
-
-    md5_0=$($hashcalc "$i" MD5  | tr -d / )
-    md5_1=$(md5sum   "$i" | awk '{ print $1}' )
-
-    test x"$md5_0" = x"$md5_1" || {
-       echo "MD5 mismatch at $(basename $i)"
-       exit 1
-    }
+       # compare only the first 80 chars as vhashify will cut digest to MAXPATHLEN
+       test x"${sum_0::80}" = x"${sum_1::80}" || {
+         echo "$m mismatch at $(basename $i): '$sum_0' vs. '$sum_1'"
+         exit 1
+       }
+    done
 done
 
 true
 done
 
 true
diff --git a/src/tunctl.c b/src/tunctl.c
new file mode 100644 (file)
index 0000000..14b904a
--- /dev/null
@@ -0,0 +1,233 @@
+// $Id$    --*- c -*--
+
+// Copyright (C) 2008 Daniel Hokka Zakrisson
+//  
+// 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; version 2 of the License.
+//  
+// 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.
+
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include "util.h"
+
+#include <vserver.h>
+
+#include <getopt.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <sys/ioctl.h>
+#include <linux/if.h>
+#include <linux/if_tun.h>
+
+/* Make sure we have the necessary ioctls */
+#ifndef TUNSETGROUP
+#  define TUNSETGROUP          _IOW('T', 206, int)
+#endif
+#ifndef TUNSETNID
+#  define TUNSETNID            _IOW('T', 215, int)
+#endif
+
+#define ENSC_WRAPPERS_PREFIX   "tunctl: "
+#define ENSC_WRAPPERS_UNISTD   1
+#define ENSC_WRAPPERS_VSERVER  1
+#define ENSC_WRAPPERS_FCNTL    1
+#define ENSC_WRAPPERS_IOCTL    1
+#include <wrappers.h>
+
+
+#define CMD_HELP               0x1000
+#define CMD_VERSION            0x1001
+#define CMD_NID                        0x0001
+#define CMD_DEVICE             0x0002
+#define CMD_PERSIST            0x0004
+#define CMD_NOPERSIST          0x0008
+#define CMD_CSUM               0x0010
+#define CMD_NOCSUM             0x0020
+#define CMD_UID                        0x0040
+#define CMD_GID                        0x0080
+#define CMD_LINKTYPE           0x0100
+#define CMD_TUN                        0x0200
+#define CMD_TAP                        0x0400
+#define CMD_NID_FAILURE_OK     (0x0800 | CMD_NID)
+
+int            wrapper_exit_code  =  255;
+
+struct option const
+CMDLINE_OPTIONS[] = {
+  { "help",           no_argument,       0, CMD_HELP },
+  { "version",        no_argument,       0, CMD_VERSION },
+  { "nid",            required_argument, 0, CMD_NID },
+  { "device",         required_argument, 0, CMD_DEVICE },
+  { "persist",        no_argument,       0, CMD_PERSIST },
+  { "~persist",       no_argument,       0, CMD_NOPERSIST },
+  { "checksum",       no_argument,       0, CMD_CSUM },
+  { "~checksum",      no_argument,       0, CMD_NOCSUM },
+  { "uid",            required_argument, 0, CMD_UID },
+  { "gid",            required_argument, 0, CMD_GID },
+  { "linktype",       required_argument, 0, CMD_LINKTYPE },
+  { "tun",            no_argument,       0, CMD_TUN },
+  { "tap",            no_argument,       0, CMD_TAP },
+  { "nid-failure-ok", required_argument, 0, CMD_NID_FAILURE_OK },
+  {0,0,0,0}
+};
+
+struct Arguments {
+  unsigned int set;
+  nid_t nid;
+  char *device;
+  unsigned persist : 1;
+  unsigned checksum : 1;
+  uid_t uid;
+  gid_t gid;
+  int linktype;
+  int type;
+};
+
+static void
+showHelp(int fd, char const *cmd, int res)
+{
+  WRITE_MSG(fd, "Usage: ");
+  WRITE_STR(fd, cmd);
+  WRITE_MSG(fd,
+           " {--tun|--tap}\n"
+           "    [--persist|--~persist] [--checksum|--~checksum]\n"
+           "    [--nid <nid>] [--uid <uid>] [--gid <gid>] [--linktype <link type>]\n"
+           "    <interface(s)>...\n"
+           "\n"
+           "Please report bugs to " PACKAGE_BUGREPORT "\n");
+
+  exit(res);
+}
+
+static void
+showVersion()
+{
+  WRITE_MSG(1,
+           "tunctl " VERSION " -- controls TUN/TAP devices\n"
+           "This program is part of " PACKAGE_STRING "\n\n"
+           "Copyright (C) 2008 Daniel Hokka Zakrisson\n"
+           VERSION_COPYRIGHT_DISCLAIMER);
+  exit(0);
+}
+
+static void
+doTunctl(struct Arguments *args, char *interface)
+{
+  int fd;
+  struct ifreq ifr;
+
+  fd = EopenD(args->device, O_RDWR, 0);
+
+  strncpy(ifr.ifr_name, interface, IFNAMSIZ);
+  ifr.ifr_name[IFNAMSIZ-1] = '\0';
+  ifr.ifr_flags = args->type;
+  EioctlD(fd, TUNSETIFF, &ifr);
+
+  if (args->set & (CMD_CSUM|CMD_NOCSUM))
+    EioctlD(fd, TUNSETNOCSUM, (void *) (long) !args->checksum);
+  if (args->set & CMD_UID)
+    EioctlD(fd, TUNSETOWNER, (void *) (long) args->uid);
+  if (args->set & CMD_GID)
+    EioctlD(fd, TUNSETGROUP, (void *) (long) args->gid);
+  if (args->set & CMD_NID) {
+    if (args->set & CMD_NID_FAILURE_OK)
+      ioctl(fd, TUNSETNID, (void *) (long) args->nid);
+    else
+      EioctlD(fd, TUNSETNID, (void *) (long) args->nid);
+  }
+  if (args->set & CMD_LINKTYPE)
+    EioctlD(fd, TUNSETLINK, (void *) (long) args->linktype);
+  if (args->set & (CMD_PERSIST|CMD_NOPERSIST))
+    EioctlD(fd, TUNSETPERSIST, (void *) (long) args->persist);
+
+  close(fd);
+}
+
+int main(int argc, char *argv[])
+{
+  struct Arguments args = {
+    .set = 0,
+    .nid = VC_NOCTX,
+    .device = "/dev/net/tun",
+    .persist = 0,
+    .checksum = 0,
+    .uid = -1,
+    .gid = -1,
+    .linktype = -1,
+    .type = IFF_TUN,
+  };
+  char **interface;
+  
+  while (1) {
+    int                c = getopt_long(argc, argv, "+", CMDLINE_OPTIONS, 0);
+    signed long tmp = 0;
+    if (c==-1) break;
+
+    switch (c) {
+      case CMD_HELP    :  showHelp(1, argv[0], 0);
+      case CMD_VERSION :  showVersion();
+
+      case CMD_NID_FAILURE_OK:
+      case CMD_NID     :  args.nid = Evc_nidopt2nid(optarg, true);     break;
+      case CMD_DEVICE  :  args.device = optarg;                        break;
+      case CMD_PERSIST :  args.persist = 1;                            break;
+      case CMD_NOPERSIST:  args.persist = 0;                           break;
+      case CMD_CSUM    :  args.checksum = 1;                           break;
+      case CMD_NOCSUM  :  args.checksum = 0;                           break;
+      case CMD_TUN     :  args.type = IFF_TUN;                         break;
+      case CMD_TAP     :  args.type = IFF_TAP;                         break;
+      case CMD_UID     :
+       if (!isNumber(optarg, &tmp, true)) {
+         WRITE_MSG(2, "Uid '");
+         WRITE_STR(2, optarg);
+         WRITE_MSG(2, "' is not an integer.\n");
+       }
+       args.uid = (uid_t) tmp;
+       break;
+      case CMD_GID     :
+       if (!isNumber(optarg, &tmp, true)) {
+         WRITE_MSG(2, "Gid '");
+         WRITE_STR(2, optarg);
+         WRITE_MSG(2, "' is not an integer.\n");
+       }
+       args.gid = (gid_t) tmp;
+       break;
+      case CMD_LINKTYPE        :
+       if (!isNumber(optarg, &tmp, true)) {
+         WRITE_MSG(2, "Link-type '");
+         WRITE_STR(2, optarg);
+         WRITE_STR(2, "' is not an integer.\n");
+       }
+       args.linktype = (int) tmp;
+       break;
+
+      default          :
+       WRITE_MSG(2, "Try '");
+       WRITE_STR(2, argv[0]);
+       WRITE_MSG(2, " --help' for more information.\n");
+       return 255;
+       break;
+    }
+
+    args.set |= c;
+  }
+
+  for (interface = argv + optind; *interface; interface++) {
+    doTunctl(&args, *interface);
+  }
+
+  return EXIT_SUCCESS;
+}
index 1339e15..9cd8708 100644 (file)
@@ -1,4 +1,4 @@
-// $Id: vattribute.c 2403 2006-11-24 23:06:08Z dhozac $    --*- c -*--
+// $Id: vattribute.c 2695 2008-03-01 01:15:31Z dhozac $    --*- c -*--
 
 // Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 //  
 
 // Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 //  
@@ -21,6 +21,7 @@
 #endif
 
 #include "util.h"
 #endif
 
 #include "util.h"
+#include "attribute-util.h"
 #include <lib/vserver.h>
 
 #include <getopt.h>
 #include <lib/vserver.h>
 
 #include <getopt.h>
@@ -40,6 +41,7 @@
 #define CMD_FLAG               0x2003
 #define CMD_SECURE             0x2004
 #define CMD_BCAP               0x2005
 #define CMD_FLAG               0x2003
 #define CMD_SECURE             0x2004
 #define CMD_BCAP               0x2005
+#define CMD_GET                        0x2006
 
 int                    wrapper_exit_code = 1;
 
 
 int                    wrapper_exit_code = 1;
 
@@ -49,6 +51,7 @@ CMDLINE_OPTIONS[] = {
   { "version",    no_argument,       0, CMD_VERSION },
   { "xid",        required_argument, 0, CMD_XID },
   { "set",        no_argument,       0, CMD_SET },
   { "version",    no_argument,       0, CMD_VERSION },
   { "xid",        required_argument, 0, CMD_XID },
   { "set",        no_argument,       0, CMD_SET },
+  { "get",        no_argument,       0, CMD_GET },
   { "ccap",       required_argument, 0, CMD_CCAP },
   { "bcap",       required_argument, 0, CMD_BCAP },
   { "flag",       required_argument, 0, CMD_FLAG },
   { "ccap",       required_argument, 0, CMD_CCAP },
   { "bcap",       required_argument, 0, CMD_BCAP },
   { "flag",       required_argument, 0, CMD_FLAG },
@@ -60,6 +63,7 @@ struct Arguments {
     xid_t              xid;
     struct vc_ctx_flags flags;
     struct vc_ctx_caps  caps;
     xid_t              xid;
     struct vc_ctx_flags flags;
     struct vc_ctx_caps  caps;
+    int                        mode;
 };
 
 static void
 };
 
 static void
@@ -68,10 +72,12 @@ showHelp(int fd, char const *cmd, int res)
   WRITE_MSG(fd, "Usage:\n    ");
   WRITE_STR(fd, cmd);
   WRITE_MSG(fd,
   WRITE_MSG(fd, "Usage:\n    ");
   WRITE_STR(fd, cmd);
   WRITE_MSG(fd,
-           " --set [--xid <xid>] [--bcap [~!]<cap>] [--ccap [~!]<cap>] [--flag [~!]<flag>] [--secure] -- [<program> <args>*]\n"
+           " [--xid <xid>] {--get|--set [--bcap [~!]<cap>] [--ccap [~!]<cap>]\n"
+           "    [--flag [~!]<flag>] [--secure]} -- [<program> <args>*]\n"
            "\n"
            "\n"
-           " --bcap <cap>   ...  system  capability to be added\n"
-           " --cap  <cap>   ...  context capability to be added\n"
+           " --bcap <cap>   ...  system  capability to be set\n"
+           " --ccap <cap>   ...  context capability to be set\n"
+           " --flag <flag>  ...  context flag to be set\n"
            "\n"
            "Please report bugs to " PACKAGE_BUGREPORT "\n");
 
            "\n"
            "Please report bugs to " PACKAGE_BUGREPORT "\n");
 
@@ -82,7 +88,7 @@ static void
 showVersion()
 {
   WRITE_MSG(1,
 showVersion()
 {
   WRITE_MSG(1,
-           "vattribute " VERSION " -- sets attributes of vservers\n"
+           "vattribute " VERSION " -- sets/gets attributes of vservers\n"
            "This program is part of " PACKAGE_STRING "\n\n"
            "Copyright (C) 2004 Enrico Scholz\n"
            VERSION_COPYRIGHT_DISCLAIMER);
            "This program is part of " PACKAGE_STRING "\n\n"
            "Copyright (C) 2004 Enrico Scholz\n"
            VERSION_COPYRIGHT_DISCLAIMER);
@@ -151,14 +157,31 @@ parseSecure(struct vc_ctx_flags UNUSED * flags,
   flags->mask     = VC_VXF_HIDE_NETIF;
 }
 
   flags->mask     = VC_VXF_HIDE_NETIF;
 }
 
+static int
+printAttrs(struct Arguments *args)
+{
+  struct vc_ctx_flags flags;
+  struct vc_ctx_caps caps;
+
+  Evc_get_cflags(args->xid, &flags);
+  Evc_get_ccaps(args->xid, &caps);
+
+  print_bitfield(1, bcap, "bcapabilities", &caps.bcaps);
+  print_bitfield(1, ccap, "ccapabilities", &caps.ccaps);
+  print_bitfield(1, cflag, "flags", &flags.flagword);
+
+  return 0;
+}
+
 int main(int argc, char *argv[])
 {
   struct Arguments             args = {
     .xid   = VC_NOCTX,
     .flags = { .flagword = 0, .mask = 0 },
     .caps  = { .bcaps = 0, .bmask = 0,.ccaps = 0, .cmask = 0 },
 int main(int argc, char *argv[])
 {
   struct Arguments             args = {
     .xid   = VC_NOCTX,
     .flags = { .flagword = 0, .mask = 0 },
     .caps  = { .bcaps = 0, .bmask = 0,.ccaps = 0, .cmask = 0 },
+    .mode  = CMD_SET,
   };
   };
-  
+
   while (1) {
     int                c = getopt_long(argc, argv, "+", CMDLINE_OPTIONS, 0);
     if (c==-1) break;
   while (1) {
     int                c = getopt_long(argc, argv, "+", CMDLINE_OPTIONS, 0);
     if (c==-1) break;
@@ -166,7 +189,8 @@ int main(int argc, char *argv[])
     switch (c) {
       case CMD_HELP    :  showHelp(1, argv[0], 0);
       case CMD_VERSION :  showVersion();
     switch (c) {
       case CMD_HELP    :  showHelp(1, argv[0], 0);
       case CMD_VERSION :  showVersion();
-      case CMD_SET     :  break; // default op currently
+      case CMD_SET     :  args.mode = CMD_SET;                    break;
+      case CMD_GET     :  args.mode = CMD_GET;                    break;
       case CMD_XID     :  args.xid = Evc_xidopt2xid(optarg,true); break;
       case CMD_FLAG    :  parseFlags(optarg, &args.flags);        break;
       case CMD_CCAP    :  parseCCaps(optarg, &args.caps);         break;
       case CMD_XID     :  args.xid = Evc_xidopt2xid(optarg,true); break;
       case CMD_FLAG    :  parseFlags(optarg, &args.flags);        break;
       case CMD_CCAP    :  parseCCaps(optarg, &args.caps);         break;
@@ -183,16 +207,25 @@ int main(int argc, char *argv[])
 
   if (args.xid==VC_NOCTX) args.xid = Evc_get_task_xid(0);
 
 
   if (args.xid==VC_NOCTX) args.xid = Evc_get_task_xid(0);
 
-  if ((args.caps.cmask || args.caps.bmask) &&
-      vc_set_ccaps(args.xid, &args.caps)==-1)
-    perror(ENSC_WRAPPERS_PREFIX "vc_set_ccaps()");
-  else if (args.flags.mask &&
-          vc_set_cflags(args.xid, &args.flags)==-1)
-    perror(ENSC_WRAPPERS_PREFIX "vc_set_flags()");
-  else if (optind<argc)
-    EexecvpD(argv[optind], argv+optind);
-  else
-    return EXIT_SUCCESS;
+  if (args.mode == CMD_SET) {
+    if ((args.caps.cmask || args.caps.bmask) &&
+       vc_set_ccaps(args.xid, &args.caps)==-1)
+      perror(ENSC_WRAPPERS_PREFIX "vc_set_ccaps()");
+    else if (args.flags.mask &&
+            vc_set_cflags(args.xid, &args.flags)==-1)
+      perror(ENSC_WRAPPERS_PREFIX "vc_set_flags()");
+    else if (optind<argc)
+      EexecvpD(argv[optind], argv+optind);
+    else
+      return EXIT_SUCCESS;
+  }
+  else if (args.mode == CMD_GET) {
+    printAttrs(&args);
+    if (optind<argc)
+      EexecvpD(argv[optind], argv+optind);
+    else
+      return EXIT_SUCCESS;
+  }
 
   return EXIT_FAILURE;
 }
 
   return EXIT_FAILURE;
 }
index 458a0ba..854cc7f 100644 (file)
@@ -1,4 +1,4 @@
-// $Id: vclone.c 2569 2007-07-22 17:24:29Z dhozac $    --*- c -*--
+// $Id: vclone.c 2646 2007-12-20 00:09:06Z dhozac $    --*- c -*--
 
 // Copyright (C) 2007 Daniel Hokka Zakrisson
 //  
 
 // Copyright (C) 2007 Daniel Hokka Zakrisson
 //  
@@ -181,7 +181,8 @@ handleDirEntry(const PathInfo *src_path, const PathInfo *basename,
        if (!Unify_copy(basename->d, st, dst_path.d))
          PERROR_Q(ENSC_WRAPPERS_PREFIX "Unify_copy", dst_path.d);
        else if (global_args->xid != VC_NOCTX &&
        if (!Unify_copy(basename->d, st, dst_path.d))
          PERROR_Q(ENSC_WRAPPERS_PREFIX "Unify_copy", dst_path.d);
        else if (global_args->xid != VC_NOCTX &&
-                vc_set_iattr(dst_path.d, global_args->xid, 0, VC_IATTR_XID) == -1)
+                vc_set_iattr(dst_path.d, global_args->xid, 0, VC_IATTR_XID) == -1 &&
+                errno != EINVAL)
          PERROR_Q(ENSC_WRAPPERS_PREFIX "vc_set_iattr", dst_path.d);
        else
          res = true;
          PERROR_Q(ENSC_WRAPPERS_PREFIX "vc_set_iattr", dst_path.d);
        else
          res = true;
index 5b70b51..a56c00e 100644 (file)
@@ -1,4 +1,4 @@
-// $Id: vdevmap.c 2490 2007-02-05 20:45:25Z dhozac $    --*- c -*--
+// $Id: vdevmap.c 2703 2008-03-15 16:05:49Z dhozac $    --*- c -*--
 
 // Copyright (C) 2006 Daniel Hokka Zakrisson
 //  
 
 // Copyright (C) 2006 Daniel Hokka Zakrisson
 //  
@@ -43,6 +43,8 @@ CMDLINE_OPTIONS[] = {
   { "help",       no_argument,       0, CMD_HELP },
   { "version",    no_argument,       0, CMD_VERSION },
   { "xid",        required_argument, 0, 'x' },
   { "help",       no_argument,       0, CMD_HELP },
   { "version",    no_argument,       0, CMD_VERSION },
   { "xid",        required_argument, 0, 'x' },
+  { "set",        no_argument,       0, 's' },
+  { "unset",      no_argument,       0, 'u' },
   { "open",       no_argument,       0, 'o' },
   { "create",     no_argument,       0, 'c' },
   { "remap",      no_argument,       0, 'r' },
   { "open",       no_argument,       0, 'o' },
   { "create",     no_argument,       0, 'c' },
   { "remap",      no_argument,       0, 'r' },
@@ -58,7 +60,24 @@ showHelp(int fd, char const *cmd)
   WRITE_MSG(fd, "Usage: ");
   WRITE_STR(fd, cmd);
   WRITE_MSG(fd,
   WRITE_MSG(fd, "Usage: ");
   WRITE_STR(fd, cmd);
   WRITE_MSG(fd,
-           " --xid <xid> [--flags <flags>] [--open] [--create] [--remap] [--device <dev>] [--target <dev>]\n"
+           " --xid <xid> {--set|--unset} [--flags <flags>] [--open] [--create]\n"
+           "        [--device <dev>] [--remap --target <dev>]\n"
+           "\n"
+           "    --flags <flags>     Set the specified flags\n"
+           "    --open              Allow opening of the device\n"
+           "    --create            If CAP_MKNOD is given, allow mknod(2)\n"
+           "    --device <dev>      Device to apply the command to\n"
+           "    --remap             Remap the device to the target\n"
+           "    --target <dev>      Target for --remap\n"
+           "\n"
+           "EXAMPLES\n"
+           "  Remap /dev/hda1 to /dev/vroot1 for xid 42\n"
+           "    vdevmap --xid 42 --set --open --device /dev/hda1 --target /dev/vroot1 --remap\n"
+           "  Let xid 42 create all device nodes\n"
+           "    vdevmap --xid 42 --set --open --create --target /dev/null\n"
+           "    vdevmap --xid 42 --set --open --create --target /dev/root\n"
+           "  Let xid 43 create just /dev/null\n"
+           "    vdevmap --xid 43 --set --open --create --device /dev/null\n"
            "\n"
            "Please report bugs to " PACKAGE_BUGREPORT "\n");
 
            "\n"
            "Please report bugs to " PACKAGE_BUGREPORT "\n");
 
@@ -85,10 +104,11 @@ int main(int argc, char *argv[])
   uint32_t     flags           = 0;
   char         *device         = NULL;
   char         *target         = NULL;
   uint32_t     flags           = 0;
   char         *device         = NULL;
   char         *target         = NULL;
+  bool         set             = true;
   unsigned long        tmp             = 0;
   
   while (1) {
   unsigned long        tmp             = 0;
   
   while (1) {
-    int                c = getopt_long(argc, argv, "+x:ocrf:d:t:", CMDLINE_OPTIONS, 0);
+    int                c = getopt_long(argc, argv, "+x:suocrf:d:t:", CMDLINE_OPTIONS, 0);
     if (c==-1) break;
 
     switch (c) {
     if (c==-1) break;
 
     switch (c) {
@@ -100,6 +120,8 @@ int main(int argc, char *argv[])
       case 'r'         :  do_remap = true;                     break;
       case 'd'         :  device = optarg;                     break;
       case 't'         :  target = optarg;                     break;
       case 'r'         :  do_remap = true;                     break;
       case 'd'         :  device = optarg;                     break;
       case 't'         :  target = optarg;                     break;
+      case 's'         :  set = 1;                             break;
+      case 'u'         :  set = 0;                             break;
       case 'f'         :
        if (!isNumberUnsigned(optarg, &tmp, false)) {
          WRITE_MSG(2, "Invalid flags argument: '");
       case 'f'         :
        if (!isNumberUnsigned(optarg, &tmp, false)) {
          WRITE_MSG(2, "Invalid flags argument: '");
@@ -123,12 +145,18 @@ int main(int argc, char *argv[])
   if (allow_create)    flags |= VC_DATTR_CREATE;
   if (do_remap)                flags |= VC_DATTR_REMAP;
 
   if (allow_create)    flags |= VC_DATTR_CREATE;
   if (do_remap)                flags |= VC_DATTR_REMAP;
 
-  if (xid==VC_NOCTX)
+  if (!target && do_remap)
+    WRITE_MSG(2, "Remapping specified without a target; try '--help' for more information\n");
+  else if (xid==VC_NOCTX)
     WRITE_MSG(2, "No xid specified; try '--help' for more information\n");
   else if (optind!=argc)
     WRITE_MSG(2, "Unused argument(s); try '--help' for more information\n");
     WRITE_MSG(2, "No xid specified; try '--help' for more information\n");
   else if (optind!=argc)
     WRITE_MSG(2, "Unused argument(s); try '--help' for more information\n");
-  else if (vc_set_mapping(xid, device, target, flags)==-1)
+  else if (!device && !target)
+    WRITE_MSG(2, "Device and target are missing; try '--help' for more information\n");
+  else if (set && vc_set_mapping(xid, device, target, flags)==-1)
       perror("vc_set_mapping()");
       perror("vc_set_mapping()");
+  else if (!set && vc_unset_mapping(xid, device, target, flags)==-1)
+      perror("vc_unset_mapping()");
   else
     return EXIT_SUCCESS;
 
   else
     return EXIT_SUCCESS;
 
index 2e43779..1a81f7c 100644 (file)
@@ -1,4 +1,4 @@
-// $Id: vhashify-init.hc 1967 2005-03-23 02:10:23Z ensc $    --*- c -*--
+// $Id: vhashify-init.hc 2685 2008-02-21 23:22:23Z ensc $    --*- c -*--
 
 // Copyright (C) 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 //  
 
 // Copyright (C) 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 //  
@@ -96,15 +96,18 @@ initHashMethod(struct HashDirConfiguration *conf, char const *filename)
 {
   int          fd = open(filename, O_RDONLY);
   if (fd==-1 && conf->method==0)
 {
   int          fd = open(filename, O_RDONLY);
   if (fd==-1 && conf->method==0)
-    conf->method = hashFunctionDefault();
+    conf->method = ensc_crypto_hash_get_default();
 
   if (fd==-1) {
 
   if (fd==-1) {
+    char const *hash_name;
     assert(conf->method!=0);
     if (conf->method==0)      return false;
     if (global_args->dry_run) return true;     // do not create the file
     assert(conf->method!=0);
     if (conf->method==0)      return false;
     if (global_args->dry_run) return true;     // do not create the file
-    
+
     fd = Eopen(filename, O_WRONLY|O_CREAT|O_EXCL|O_NOFOLLOW, 0644);
     fd = Eopen(filename, O_WRONLY|O_CREAT|O_EXCL|O_NOFOLLOW, 0644);
-    TEMP_FAILURE_RETRY(write(fd, conf->method->name, strlen(conf->method->name)));
+
+    hash_name = ensc_crypto_hash_get_name(conf->method);
+    TEMP_FAILURE_RETRY(write(fd, hash_name, strlen(hash_name)));
     TEMP_FAILURE_RETRY(write(fd, "\n", 1));
   }
   else {
     TEMP_FAILURE_RETRY(write(fd, "\n", 1));
   }
   else {
@@ -119,7 +122,7 @@ initHashMethod(struct HashDirConfiguration *conf, char const *filename)
        --s;
       buf[s] = '\0';
 
        --s;
       buf[s] = '\0';
 
-      conf->method = hashFunctionFind(buf);
+      conf->method = ensc_crypto_hash_find(buf);
       if (conf->method==0) {
        WRITE_MSG(2, "Can not find hash-function '");
        WRITE_STR(2, buf);
       if (conf->method==0) {
        WRITE_MSG(2, "Can not find hash-function '");
        WRITE_STR(2, buf);
@@ -130,7 +133,7 @@ initHashMethod(struct HashDirConfiguration *conf, char const *filename)
       WRITE_MSG(2, "Can not read configuration file for hash-method\n");
   }
 
       WRITE_MSG(2, "Can not read configuration file for hash-method\n");
   }
 
-  if (conf->method!=0 && conf->method->digestsize*8>HASH_MAXBITS) {
+  if (conf->method!=0 && ensc_crypto_hash_get_digestsize(conf->method)*8>HASH_MAXBITS) {
     WRITE_MSG(2, "Wow... what an huge hash-function. I can not handle so much bits; giving up...\n");
     conf->method=0;
   }
     WRITE_MSG(2, "Wow... what an huge hash-function. I can not handle so much bits; giving up...\n");
     conf->method=0;
   }
index 005efd8..fb1172c 100644 (file)
@@ -1,4 +1,4 @@
-// $Id: vhashify.c 2569 2007-07-22 17:24:29Z dhozac $    --*- c -*--
+// $Id: vhashify.c 2685 2008-02-21 23:22:23Z ensc $    --*- c -*--
 
 // Copyright (C) 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 //  
 
 // Copyright (C) 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 //  
@@ -30,7 +30,7 @@
 #include "lib_internal/unify.h"
 #include "ensc_vector/vector.h"
 
 #include "lib_internal/unify.h"
 #include "ensc_vector/vector.h"
 
-#include <beecrypt/beecrypt.h>
+#include "lib_internal/crypto-wrapper.h"
 
 #include <setjmp.h>
 #include <unistd.h>
 
 #include <setjmp.h>
 #include <unistd.h>
@@ -95,7 +95,7 @@ typedef char                  HashPath[HASH_MAXBITS/4 + (HASH_MAXBITS/4/2) +
 
 struct HashDirConfiguration
 {
 
 struct HashDirConfiguration
 {
-    hashFunction const                         *method;
+    ensc_hash_method const                     *method;
     enum { hshALL=0, hshSTART = 1, hshMIDDLE=2,
           hshEND = 4, hshINVALID = -1 }        blocks;
     size_t                                     blocksize;
     enum { hshALL=0, hshSTART = 1, hshMIDDLE=2,
           hshEND = 4, hshINVALID = -1 }        blocks;
     size_t                                     blocksize;
@@ -109,7 +109,7 @@ struct WalkdownInfo
     HashDirCollection          hash_dirs;
     size_t                     hash_dirs_max_size;
 
     HashDirCollection          hash_dirs;
     size_t                     hash_dirs_max_size;
 
-    hashFunctionContext                hash_context;
+    ensc_hash_context          hash_context;
 };
 
 int                            wrapper_exit_code = 1;
 };
 
 int                            wrapper_exit_code = 1;
@@ -251,13 +251,13 @@ static bool
 convertDigest(HashPath d_path)
 {
   static char const            HEX_DIGIT[] = "0123456789abcdef";
 convertDigest(HashPath d_path)
 {
   static char const            HEX_DIGIT[] = "0123456789abcdef";
-  hashFunctionContext * const  h_ctx    = &global_info.hash_context;
-  size_t                       d_size   = h_ctx->algo->digestsize;
-    
+  ensc_hash_context * const    h_ctx    = &global_info.hash_context;
+  size_t                       d_size   = ensc_crypto_hashctx_get_digestsize(h_ctx);
+
   unsigned char                        digest[d_size];
   size_t                       out = 0;
 
   unsigned char                        digest[d_size];
   size_t                       out = 0;
 
-  if (hashFunctionContextDigest(h_ctx, digest)==-1)
+  if (ensc_crypto_hashctx_get_digest(h_ctx, digest, NULL, d_size)==-1)
     return false;
   
   for (size_t in=0;
     return false;
   
   for (size_t in=0;
@@ -275,7 +275,7 @@ convertDigest(HashPath d_path)
 
 #ifndef ENSC_TESTSUITE
 static bool
 
 #ifndef ENSC_TESTSUITE
 static bool
-addStatHash(hashFunctionContext *h_ctx, struct stat const * const st)
+addStatHash(ensc_hash_context *h_ctx, struct stat const * const st)
 {
 #define DECL_ATTR(X)   __typeof__(st->st_##X)  X
 #define SET_ATTR(X)    .X = st->st_##X
 {
 #define DECL_ATTR(X)   __typeof__(st->st_##X)  X
 #define SET_ATTR(X)    .X = st->st_##X
@@ -300,11 +300,11 @@ addStatHash(hashFunctionContext *h_ctx, struct stat const * const st)
 #undef DECL_ATTR
 
   
 #undef DECL_ATTR
 
   
-  return hashFunctionContextUpdate(h_ctx, (void *)&tmp, sizeof tmp)!=-1;
+  return ensc_crypto_hashctx_update(h_ctx, (void *)&tmp, sizeof tmp)!=-1;
 }
 #else
 static bool
 }
 #else
 static bool
-addStatHash(hashFunctionContext UNUSED *h_ctx, struct stat const UNUSED * const st)
+addStatHash(ensc_hash_context UNUSED *h_ctx, struct stat const UNUSED * const st)
 {
   return true;
 }
 {
   return true;
 }
@@ -313,13 +313,13 @@ addStatHash(hashFunctionContext UNUSED *h_ctx, struct stat const UNUSED * const
 static bool
 calculateHashFromFD(int fd, HashPath d_path, struct stat const * const st)
 {
 static bool
 calculateHashFromFD(int fd, HashPath d_path, struct stat const * const st)
 {
-  hashFunctionContext * const  h_ctx    = &global_info.hash_context;
+  ensc_hash_context * const    h_ctx    = &global_info.hash_context;
   void const * volatile                buf      = 0;
   loff_t volatile              buf_size = 0;
   bool   volatile              res      = false;
 
 
   void const * volatile                buf      = 0;
   loff_t volatile              buf_size = 0;
   bool   volatile              res      = false;
 
 
-  if (hashFunctionContextReset(h_ctx)==-1 ||
+  if (ensc_crypto_hashctx_reset(h_ctx)==-1 ||
       !addStatHash(h_ctx, st))
     return false;
 
       !addStatHash(h_ctx, st))
     return false;
 
@@ -340,7 +340,7 @@ calculateHashFromFD(int fd, HashPath d_path, struct stat const * const st)
       offset += buf_size;
       madvise(const_cast(void *)(buf), buf_size, MADV_SEQUENTIAL);     // ignore error...
 
       offset += buf_size;
       madvise(const_cast(void *)(buf), buf_size, MADV_SEQUENTIAL);     // ignore error...
 
-      if (hashFunctionContextUpdate(h_ctx, buf, buf_size)==-1) goto out;
+      if (ensc_crypto_hashctx_update(h_ctx, buf, buf_size)==-1) goto out;
 
       munmap(const_cast(void *)(buf), buf_size);
       buf = 0;
 
       munmap(const_cast(void *)(buf), buf_size);
       buf = 0;
@@ -668,14 +668,15 @@ int main(int argc, char *argv[])
     return EXIT_FAILURE;
   }
 
     return EXIT_FAILURE;
   }
 
+  ensc_crypto_init();
   switch (args.mode) {
     case mdMANUALLY    :  initModeManually(&args, argc-optind, argv+optind); break;
     case mdVSERVER     :  initModeVserver (&args, argc-optind, argv+optind); break;
     default            :  assert(false); return EXIT_FAILURE;
   };
 
   switch (args.mode) {
     case mdMANUALLY    :  initModeManually(&args, argc-optind, argv+optind); break;
     case mdVSERVER     :  initModeVserver (&args, argc-optind, argv+optind); break;
     default            :  assert(false); return EXIT_FAILURE;
   };
 
-  if (hashFunctionContextInit(&global_info.hash_context,
-                             global_info.hash_conf.method)==-1) {
+  if (ensc_crypto_hashctx_init(&global_info.hash_context,
+                              global_info.hash_conf.method)==-1) {
     WRITE_MSG(2, "Failed to initialize hash-context\n");
     return EXIT_FAILURE;
   }
     WRITE_MSG(2, "Failed to initialize hash-context\n");
     return EXIT_FAILURE;
   }
@@ -691,7 +692,7 @@ int main(int argc, char *argv[])
 #ifndef NDEBUG
   MatchList_destroy(&global_info.dst_list);
   freeHashList(&global_info.hash_dirs);
 #ifndef NDEBUG
   MatchList_destroy(&global_info.dst_list);
   freeHashList(&global_info.hash_dirs);
-  hashFunctionContextFree(&global_info.hash_context);
+  ensc_crypto_hashctx_free(&global_info.hash_context);
 #endif
 
   return EXIT_SUCCESS;
 #endif
 
   return EXIT_SUCCESS;
diff --git a/src/vmemctrl.c b/src/vmemctrl.c
new file mode 100644 (file)
index 0000000..471171c
--- /dev/null
@@ -0,0 +1,187 @@
+// $Id: vmemctrl.c 2674 2008-01-27 07:55:13Z dhozac $
+
+// Copyright (C) 2007 Daniel Hokka Zakrisson
+//  
+// 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.
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include "vserver.h"
+#include "util.h"
+
+#include <lib/internal.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <errno.h>
+#include <getopt.h>
+
+#define ENSC_WRAPPERS_PREFIX   "vmemctrl: "
+#define ENSC_WRAPPERS_VSERVER  1
+#define ENSC_WRAPPERS_UNISTD   1
+#include "wrappers.h"
+
+#define CMD_HELP       0x1000
+#define CMD_VERSION    0x1001
+
+#define CMD_SET                0x2000
+#define CMD_GET                0x2001
+
+#define CMD_XID                0x4000
+#define CMD_BADNESS    0x4001
+
+int wrapper_exit_code = 255;
+
+
+static struct option const
+CMDLINE_OPTIONS[] = {
+  { "help",     no_argument,        0, CMD_HELP },
+  { "version",  no_argument,        0, CMD_VERSION },
+  { "set",      no_argument,        0, CMD_SET },
+  { "get",      no_argument,        0, CMD_GET },
+  { "xid",      required_argument,  0, CMD_XID },
+  { "badness",  required_argument,  0, CMD_BADNESS },
+  { 0,0,0,0 }
+};
+
+struct Arguments {
+  xid_t                xid;
+  int64_t      badness;
+  bool         do_set;
+  bool         do_get;
+  uint32_t     mask;
+};
+
+static inline int
+hasArg(struct Arguments *args, uint32_t arg)
+{
+  return (args->mask & arg) == arg;
+}
+
+static void
+showHelp(int fd, char const *cmd, int res)
+{
+  WRITE_MSG(fd, "Usage:\n  ");
+  WRITE_STR(fd, cmd);
+  WRITE_MSG(fd,
+           " (--set|--get) [--xid <xid>] [--badness <OOM bias>]\n"
+           "        [--] [<command> <args>*]\n\n"
+           "Please report bugs to " PACKAGE_BUGREPORT "\n");
+
+  exit(res);
+}
+
+static void
+showVersion()
+{
+  WRITE_MSG(1,
+           "vmemctrl " VERSION " -- \n"
+           "This program is part of " PACKAGE_STRING "\n\n"
+           "Copyright (C) 2007 Daniel Hokka Zakrisson\n"
+           VERSION_COPYRIGHT_DISCLAIMER);
+  exit(0);
+}
+
+static inline void
+doset(struct Arguments *args)
+{
+  if (hasArg(args, CMD_BADNESS) &&
+      vc_set_badness(args->xid, args->badness) == -1) {
+    perror(ENSC_WRAPPERS_PREFIX "vc_set_badness()");
+    exit(wrapper_exit_code);
+  }
+}
+
+static inline void
+doget(struct Arguments *args)
+{
+  int64_t badness;
+  char buf[32];
+  size_t l;
+  if (vc_get_badness(args->xid, &badness) == -1) {
+    perror(ENSC_WRAPPERS_PREFIX "vc_get_badness()");
+    exit(wrapper_exit_code);
+  }
+  l = utilvserver_fmt_int64(buf, badness);
+  buf[l] = '\0';
+  WRITE_STR(1, buf);
+  WRITE_MSG(1, "\n");
+}
+
+int main (int argc, char *argv[])
+{
+  struct Arguments args = {
+    .do_set    = false,
+    .do_get    = false,
+    .xid       = VC_NOCTX,
+    .badness   = 0,
+    .mask      = 0,
+  };
+  
+  while (1) {
+    int                c = getopt_long(argc, argv, "+", CMDLINE_OPTIONS, 0);
+    if (c==-1) break;
+
+    switch (c) {
+      case CMD_HELP    :  showHelp(1, argv[0], 0);
+      case CMD_VERSION :  showVersion();
+      case CMD_XID     :  args.xid       = Evc_xidopt2xid(optarg,true); break;
+      case CMD_SET     :  args.do_set    = true; break;
+      case CMD_GET     :  args.do_get    = true; break;
+      case CMD_BADNESS : {
+       char *endptr;
+       args.badness = strtoll(optarg, &endptr, 0);
+       if (*endptr) {
+         WRITE_MSG(2, ENSC_WRAPPERS_PREFIX "Badness '");
+         WRITE_STR(2, optarg);
+         WRITE_MSG(2, "' is not an integer\n");
+         exit(wrapper_exit_code);
+       }
+       break;
+      }
+      default          :
+       WRITE_MSG(2, "Try '");
+       WRITE_STR(2, argv[0]);
+       WRITE_MSG(2, " --help' for more information.\n");
+       exit(wrapper_exit_code);
+       break;
+    }
+    args.mask |= c;
+  }
+
+  if (args.xid == VC_NOCTX) args.xid = Evc_get_task_xid(0);
+
+  if (!args.do_set && !args.do_get) {
+    WRITE_MSG(2, "No operation specified; try '--help' for more information\n");
+    exit(wrapper_exit_code);
+  }
+  else if (((args.do_set ? 1 : 0) + (args.do_get ? 1 : 0)) > 1) {
+    WRITE_MSG(2, "Multiple operations specified; try '--help' for more information\n");
+    exit(wrapper_exit_code);
+  }
+
+  if (args.do_set)
+    doset(&args);
+  else if (args.do_get)
+    doget(&args);
+
+  if (optind != argc)
+    Eexecvp (argv[optind],argv+optind);
+  return EXIT_SUCCESS;
+}
index 1536836..892ed0e 100644 (file)
@@ -1,4 +1,4 @@
-// $Id: vnamespace.c 2415 2006-12-08 13:24:49Z dhozac $    --*- c -*--
+// $Id: vnamespace.c 2693 2008-03-01 00:26:31Z dhozac $    --*- c -*--
 
 // Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 //  
 
 // Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 //  
index 00339e0..fe2315f 100644 (file)
@@ -1,4 +1,4 @@
-// $Id: vrsetup.c 2403 2006-11-24 23:06:08Z dhozac $    --*- c -*--
+// $Id: vrsetup.c 2686 2008-02-28 23:12:06Z dhozac $    --*- c -*--
 
 // Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 //  
 
 // Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 //  
@@ -124,7 +124,7 @@ int main(int argc, char *argv[])
   else if (do_delete)    Eioctl(fd, VROOT_CLR_DEV, 0);
   else {
     int                dfd = EopenD(real_root_device, O_RDONLY, 0);
   else if (do_delete)    Eioctl(fd, VROOT_CLR_DEV, 0);
   else {
     int                dfd = EopenD(real_root_device, O_RDONLY, 0);
-    Eioctl(fd, VROOT_SET_DEV, (void*)dfd);
+    Eioctl(fd, VROOT_SET_DEV, (void*)(long)dfd);
     Eclose(dfd);
   }
 
     Eclose(dfd);
   }
 
index e3a6db5..96dbe6d 100644 (file)
@@ -1,4 +1,4 @@
-// $Id: vsched.c 2510 2007-03-07 20:33:56Z dhozac $    --*- c -*--
+// $Id: vsched.c 2637 2007-11-26 23:47:41Z dhozac $    --*- c -*--
 
 // Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 // Copyright (C) 2006 Daniel Hokka Zakrisson <daniel@hozac.com>
 
 // Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 // Copyright (C) 2006 Daniel Hokka Zakrisson <daniel@hozac.com>
@@ -183,7 +183,7 @@ static void do_dir_entry(struct vc_set_sched *sched, const char *name)
     if (!isNumber(buf, &val, true)) {
       WRITE_MSG(2, ENSC_WRAPPERS_PREFIX);
       WRITE_STR(2, name);
     if (!isNumber(buf, &val, true)) {
       WRITE_MSG(2, ENSC_WRAPPERS_PREFIX);
       WRITE_STR(2, name);
-      WRITE_MSG(2, ": is not a number\n");
+      WRITE_MSG(2, ": is not an integer\n");
       exit(1);
     }
 
       exit(1);
     }
 
@@ -244,7 +244,7 @@ static void do_dir(xid_t xid, struct vc_set_sched *sched, const char *dir, int m
 
 #define SETVAL(ATTR,MASK) \
   if (!isNumber(optarg, &tmp, false)) { \
 
 #define SETVAL(ATTR,MASK) \
   if (!isNumber(optarg, &tmp, false)) { \
-    WRITE_MSG(2, ENSC_WRAPPERS_PREFIX "non-numeric value specified for '--" #ATTR "'\n"); \
+    WRITE_MSG(2, ENSC_WRAPPERS_PREFIX "non-integer value specified for '--" #ATTR "'\n"); \
     exit(wrapper_exit_code); \
   } \
   else { \
     exit(wrapper_exit_code); \
   } \
   else { \
diff --git a/src/vspace.c b/src/vspace.c
new file mode 100644 (file)
index 0000000..d715a3b
--- /dev/null
@@ -0,0 +1,225 @@
+// $Id: vspace.c 2693 2008-03-01 00:26:31Z dhozac $    --*- c -*--
+
+// Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
+// Copyright (C) 2007 Daniel Hokka Zakrisson
+//  
+// 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; version 2 of the License.
+//  
+// 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.
+
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include "util.h"
+#include <lib_internal/sys_clone.h>
+
+#include <vserver.h>
+
+#include <getopt.h>
+#include <libgen.h>
+#include <errno.h>
+#include <signal.h>
+#include <sched.h>
+
+#define ENSC_WRAPPERS_PREFIX   "vspace: "
+#define ENSC_WRAPPERS_UNISTD   1
+#define ENSC_WRAPPERS_VSERVER  1
+#include <wrappers.h>
+
+#define CMD_HELP               0x1000
+#define CMD_VERSION            0x1001
+
+int            wrapper_exit_code  =  255;
+
+struct option const
+CMDLINE_OPTIONS[] = {
+  { "help",       no_argument,       0, CMD_HELP },
+  { "version",    no_argument,       0, CMD_VERSION },
+  { "new",        no_argument,       0, 'n' },
+  { "enter",      required_argument, 0, 'e' },
+  { "set",        no_argument,       0, 's' },
+  { "mask",       required_argument, 0, 'm' },
+
+  { "mount",      no_argument,       0, 'M' },
+  { "fs",         no_argument,       0, 'F' },
+  { "ipc",        no_argument,       0, 'I' },
+  { "uts",        no_argument,       0, 'U' },
+  { "user",       no_argument,       0, 'S' },
+  { "pid",        no_argument,       0, 'P' },
+  { "net",        no_argument,       0, 'N' },
+  {0,0,0,0}
+};
+
+static void
+showHelp(int fd, char const *cmd, int res)
+{
+  WRITE_MSG(fd, "Usage: ");
+  WRITE_STR(fd, cmd);
+  WRITE_MSG(fd,
+           " <operation> <spaces>* [--] [<program> <args>*]\n"
+           "\n"
+           "<operation> can be one of:\n"
+           "    --new|-n          ...  create new spaces and execute <program> there;\n"
+           "                           <program> is mandatory in this case\n"
+           "    --enter|-e <xid>  ...  enter the spaces of context <xid> and execute\n"
+           "                           <program> there; <program> is mandatory in this\n"
+           "                           case\n"
+           "    --set|-s          ...  assign the current spaces to the current context\n"
+           "\n"
+           "<spaces>* specifies the spaces to manipulate.\n"
+           "It can be any combination of:\n"
+           "    --mask <mask>     ...  specify a mask of spaces\n"
+           "    --mount           ...  the mount namespace\n"
+           "    --fs              ...  the fs_struct\n"
+           "    --ipc             ...  the IPC namespace\n"
+           "    --uts             ...  the uts namespace\n"
+           "    --user            ...  the user namespace\n"
+           "    --pid             ...  the pid namespace\n"
+           "    --net             ...  the network namespace\n"
+           "\n"
+           "Please report bugs to " PACKAGE_BUGREPORT "\n");
+
+  exit(res);
+}
+
+static void
+showVersion()
+{
+  WRITE_MSG(1,
+           "vspace " VERSION " -- manages spaces\n"
+           "This program is part of " PACKAGE_STRING "\n\n"
+           "Copyright (C) 2004 Enrico Scholz\n"
+           "Copyright (C) 2007 Daniel Hokka Zakrisson\n"
+           VERSION_COPYRIGHT_DISCLAIMER);
+  exit(0);
+}
+
+static void
+newSpaces(uint_least64_t mask, const char *cmd)
+{
+  pid_t pid;
+
+  /* optimize default case */
+  if (mask == 0)
+    return;
+
+  signal(SIGCHLD, SIG_DFL);
+
+#ifdef NDEBUG
+  pid = sys_clone((int) mask | CLONE_VFORK|SIGCHLD, 0);
+#else
+  pid = sys_clone((int) mask | SIGCHLD, 0);
+#endif
+
+  switch (pid) {
+    case -1    :
+      perror(ENSC_WRAPPERS_PREFIX "clone()");
+      exit(wrapper_exit_code);
+    case 0     :
+      break;
+    default    :
+      exitLikeProcess(pid, cmd, wrapper_exit_code);
+  }
+}
+
+static void
+enterSpaces(xid_t xid, uint_least64_t mask)
+{
+  if (vc_enter_namespace(xid, mask)==-1) {
+    perror(ENSC_WRAPPERS_PREFIX "vc_enter_namespace()");
+    exit(wrapper_exit_code);
+  }
+}
+
+static void
+setSpaces(xid_t xid, uint_least64_t mask)
+{
+  if (vc_set_namespace(xid, mask)==-1) {
+    perror(ENSC_WRAPPERS_PREFIX "vc_set_namespace()");
+    exit(wrapper_exit_code);
+  }
+}
+
+int main(int argc, char *argv[])
+{
+  bool                 do_new     = false;
+  bool                 do_enter   = false;
+  bool                 do_set     = false;
+  uint_least64_t       mask       = 0;
+  xid_t                        xid        = VC_NOCTX;
+  int                  sum        = 0;
+  
+  while (1) {
+    int                c = getopt_long(argc, argv, "+nsce:m:" "MFIUSPN", CMDLINE_OPTIONS, 0);
+    if (c==-1) break;
+
+    switch (c) {
+      case CMD_HELP    :  showHelp(1, argv[0], 0);
+      case CMD_VERSION :  showVersion();
+      case 'n'         :  do_new     = true; break;
+      case 's'         :  do_set     = true; break;
+      case 'e'         :
+       do_enter = true;
+       xid      = Evc_xidopt2xid(optarg,true);
+       break;
+      case 'm'         :  {
+       unsigned long   mask_l;
+       if (!isNumberUnsigned(optarg, &mask_l, true)) {
+         WRITE_MSG(2, "Invalid mask '");
+         WRITE_STR(2, optarg);
+         WRITE_MSG(2, "'; try '--help' for more information\n");
+         return wrapper_exit_code;
+       }
+       mask = mask_l;
+       break;
+      }
+      case 'M'         :  mask |= CLONE_NEWNS;         break;
+      case 'F'         :  mask |= CLONE_FS;            break;
+      case 'I'         :  mask |= CLONE_NEWIPC;        break;
+      case 'U'         :  mask |= CLONE_NEWUTS;        break;
+      case 'S'         :  mask |= CLONE_NEWUSER;       break;
+      case 'P'         :  mask |= CLONE_NEWPID;        break;
+      case 'N'         :  mask |= CLONE_NEWNET;        break;
+
+      default          :
+       WRITE_MSG(2, "Try '");
+       WRITE_STR(2, argv[0]);
+       WRITE_MSG(2, " --help' for more information.\n");
+       return 255;
+       break;
+    }
+  }
+
+  sum = ((do_new ? 1 : 0) + (do_enter ? 1 : 0) +
+        (do_set ? 1 : 0));
+  
+  if (sum==0)
+    WRITE_MSG(2, "No operation was specified; try '--help' for more information\n");
+  else if (sum>1)
+    WRITE_MSG(2, "Can not specify multiple operations; try '--help' for more information\n");
+  else if (optind==argc && (do_new || do_enter))
+    WRITE_MSG(2, "No command specified; try '--help' for more information\n");
+  else {
+    if      (do_new)     newSpaces(mask, argv[optind]);
+    else if (do_set)     setSpaces(VC_SAMECTX, mask);
+    else if (do_enter)   enterSpaces(xid, mask);
+
+    if (optind<argc)
+      EexecvpD(argv[optind], argv+optind);
+
+    return EXIT_SUCCESS;
+  }
+
+  return 255;
+}
index edf9766..b856714 100644 (file)
@@ -1,4 +1,4 @@
-// $Id$    --*- c -*--
+// $Id: vtag.c 2674 2008-01-27 07:55:13Z dhozac $    --*- c -*--
 
 // Copyright (C) 2007 Daniel Hokka Zakrisson
 //  
 
 // Copyright (C) 2007 Daniel Hokka Zakrisson
 //  
@@ -109,6 +109,16 @@ doit(struct Arguments const *args, char *argv[])
     else
       goto exec;
   }
     else
       goto exec;
   }
+  if (args->tag == VC_DYNAMIC_XID) {
+    if (args->verbosity >= 1) {
+      WRITE_MSG(2, "You must specify the tag with '--tag'; try '--help' for more information\n");
+      return wrapper_exit_code;
+    }
+    else {
+      WRITE_MSG(2, ENSC_WRAPPERS_PREFIX "WARNING: A dynamic tag has been specified, this is not supported\n");
+      goto exec;
+    }
+  }
 
   if (args->do_create) {
     tag = vc_tag_create(args->tag);
 
   if (args->do_create) {
     tag = vc_tag_create(args->tag);
@@ -140,7 +150,7 @@ exec:
 int main (int argc, char *argv[])
 {
   struct Arguments             args = {
 int main (int argc, char *argv[])
 {
   struct Arguments             args = {
-    .tag               = VC_NOCTX,
+    .tag               = VC_DYNAMIC_XID,
     .do_create         = false,
     .do_migrate        = false,
     .is_silentexist    = false,
     .do_create         = false,
     .do_migrate        = false,
     .is_silentexist    = false,
@@ -173,8 +183,6 @@ int main (int argc, char *argv[])
     WRITE_MSG(2, "Neither '--create' nor '--migrate' specified; try '--help' for more information\n");
   else if (args.do_create && args.do_migrate)
     WRITE_MSG(2, "Can not specify '--create' and '--migrate' at the same time; try '--help' for more information\n");
     WRITE_MSG(2, "Neither '--create' nor '--migrate' specified; try '--help' for more information\n");
   else if (args.do_create && args.do_migrate)
     WRITE_MSG(2, "Can not specify '--create' and '--migrate' at the same time; try '--help' for more information\n");
-  else if (args.tag==VC_NOCTX)
-    WRITE_MSG(2, "You must specify the tag with '--tag'; try '--help' for more information\n");
   else if (optind>=argc)
     WRITE_MSG(2, "No command given; use '--help' for more information.\n");
   else
   else if (optind>=argc)
     WRITE_MSG(2, "No command given; use '--help' for more information.\n");
   else
index fe0be29..d56dadc 100755 (executable)
@@ -49,7 +49,7 @@ function kill_contexts()
 
 function create_dirs()
 {
 
 function create_dirs()
 {
-    $_MKDIR -p "$__RUNDIR" && $_MKDIR -p "$__VSHELPERSTATEDIR" && $_MKDIR -p `getPhysicalDir "$__PKGSTATEREVDIR"`
+    $_MKDIR -p "$__RUNDIR" && $_MKDIR -p "$__VSHELPERSTATEDIR" && $_MKDIR -p `$_READLINK "$__PKGSTATEREVDIR"`
 }
 
 function start()
 }
 
 function start()
@@ -62,7 +62,7 @@ function start()
     _endResult $?
     local retval=$?
     _beginResult $"Loading default device map"
     _endResult $?
     local retval=$?
     _beginResult $"Loading default device map"
-    loadDeviceMap 0 "$__CONFDIR/.defaults/apps/vdevmap"
+    handleDeviceMap --set 0 "$__CONFDIR/.defaults/apps/vdevmap"
     _endResult $?
     test "$retval" -ne 0 || touch "$lockfile"
     return $retval
     _endResult $?
     test "$retval" -ne 0 || touch "$lockfile"
     return $retval
index 420095e..b2a79d2 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: util-vserver.spec.in 2575 2007-08-05 18:35:40Z dhozac $
+# $Id: util-vserver.spec.in 2626 2007-10-16 00:27:58Z dhozac $
 
 ## This package understands the following switches:
 ## --without dietlibc        ...   disable usage of dietlibc
 
 ## This package understands the following switches:
 ## --without dietlibc        ...   disable usage of dietlibc
@@ -13,9 +13,9 @@
 
 %global _localstatedir %_var
 
 
 %global _localstatedir %_var
 
-%global ver            %( echo 0.30.214 | sed 's/-.*//' )
-%global subver         %( s=`echo 0.30.214 | grep -- - | sed 's/.*-/./'`; echo ${s:-.1} )
-%global fullver                0.30.214
+%global ver            %( echo 0.30.215 | sed 's/-.*//' )
+%global subver         %( s=`echo 0.30.215 | grep -- - | sed 's/.*-/./'`; echo ${s:-.1} )
+%global fullver                0.30.215
 
 
 %{!?release_func:%global release_func() %1%{?dist}}
 
 
 %{!?release_func:%global release_func() %1%{?dist}}
@@ -39,6 +39,7 @@ Obsoletes:    vserver < %version
 BuildRequires: mount vconfig gawk iproute iptables
 BuildRequires: gcc-c++ wget which diffutils
 BuildRequires: e2fsprogs-devel beecrypt-devel
 BuildRequires: mount vconfig gawk iproute iptables
 BuildRequires: gcc-c++ wget which diffutils
 BuildRequires: e2fsprogs-devel beecrypt-devel
+BuildRequires: e2fsprogs
 %{!?_without_doc:BuildRequires:        doxygen tetex-latex}
 Requires(post):                %name-core
 Requires(pre):         %pkglibdir
 %{!?_without_doc:BuildRequires:        doxygen tetex-latex}
 Requires(post):                %name-core
 Requires(pre):         %pkglibdir
index 225dc97..6e0aef4 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: util-vserver.spec.in 2575 2007-08-05 18:35:40Z dhozac $
+# $Id: util-vserver.spec.in 2626 2007-10-16 00:27:58Z dhozac $
 
 ## This package understands the following switches:
 ## --without dietlibc        ...   disable usage of dietlibc
 
 ## This package understands the following switches:
 ## --without dietlibc        ...   disable usage of dietlibc
@@ -39,6 +39,7 @@ Obsoletes:    vserver < %version
 BuildRequires: mount vconfig gawk iproute iptables
 BuildRequires: gcc-c++ wget which diffutils
 BuildRequires: e2fsprogs-devel beecrypt-devel
 BuildRequires: mount vconfig gawk iproute iptables
 BuildRequires: gcc-c++ wget which diffutils
 BuildRequires: e2fsprogs-devel beecrypt-devel
+BuildRequires: e2fsprogs
 %{!?_without_doc:BuildRequires:        doxygen tetex-latex}
 Requires(post):                %name-core
 Requires(pre):         %pkglibdir
 %{!?_without_doc:BuildRequires:        doxygen tetex-latex}
 Requires(post):                %name-core
 Requires(pre):         %pkglibdir
index c6ec40a..cb283c4 100644 (file)
@@ -1,4 +1,4 @@
-// $Id: main.c 2589 2007-08-16 03:06:50Z dhozac $    --*- c -*--
+// $Id: main.c 2678 2008-02-16 22:09:30Z dhozac $    --*- c -*--
 
 // Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 //  
 
 // Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 //  
@@ -98,7 +98,7 @@ initLock()
   ptr  = Xmemcpy(ptr, ".startup",  sizeof(".startup"));
   *ptr = '\0';
 
   ptr  = Xmemcpy(ptr, ".startup",  sizeof(".startup"));
   *ptr = '\0';
 
-  if (!lockfile(&fd, tmp, LOCK_EX, 30, &err)) {
+  if (!lockfile(&fd, tmp, F_LOCK, 30, &err)) {
     WRITE_MSG(2, "vserver.start: failed to lock '");
     WRITE_STR(2, tmp);
     WRITE_MSG(2, "': ");
     WRITE_MSG(2, "vserver.start: failed to lock '");
     WRITE_STR(2, tmp);
     WRITE_MSG(2, "': ");