├── .gitignore ├── AUTHORS ├── COPYING ├── Makefile.am ├── Makefile.svn ├── NEWS ├── README ├── REQUIREMENTS ├── THANKS ├── build-all ├── compat-c99.h ├── compat.h ├── configure.ac ├── contrib ├── .gitignore ├── Makefile-files ├── make-deb-manifest ├── make-manifest ├── manifest.dat.pathsubst ├── yum-2.2.1-chroot.patch ├── yum-2.3.2-chroot.patch ├── yum-2.3.3-chroot.patch ├── yum-2.3.4-chroot.patch ├── yum-2.6.0-chroot.patch ├── yum-2.9.6-chroot.patch ├── yum-3.0.3-chroot.patch ├── yum-3.0.5-chroot.patch ├── yum-3.2.0-chroot.patch ├── yum-3.2.1-chroot.patch ├── yum-3.2.19-chroot.patch ├── yum-3.2.22-chroot.patch ├── yum-3.2.27_el6-chroot.patch ├── yum-3.2.29_el62-chroot.patch ├── yum-3.2.29_el66-chroot.patch ├── yum-3.2.29_el66-no-scriptout-exception.patch ├── yum-3.2.29_el66-releasever.patch ├── yum-3.2.4-chroot.patch ├── yum-3.4.3_el70-chroot.patch ├── yum-3.4.3_el70-no-scriptout-exception.patch └── yum-3.4.3_el70-releasever.patch ├── debian ├── Makefile-files ├── changelog.in ├── compat ├── control ├── copyright ├── docs ├── rules ├── util-vserver-build.postinst ├── util-vserver-legacy.postinst ├── util-vserver-legacy.postrm ├── util-vserver-legacy.prerm ├── util-vserver-sysv.postinst ├── util-vserver-sysv.postrm ├── util-vserver-sysv.prerm ├── util-vserver.postinst └── util-vserver.postrm ├── distrib ├── .gitignore ├── Makefile.am ├── alpine │ ├── initpost │ └── initpre ├── centos4 │ ├── pkgs │ │ ├── 01 │ │ ├── 02 │ │ └── 03 │ ├── yum.repos.d │ │ └── CentOS-Base.repo │ └── yum │ │ └── yum.conf ├── centos5 │ ├── pkgs │ │ ├── 01 │ │ ├── 02 │ │ └── 03 │ ├── yum.repos.d │ │ └── CentOS-Base.repo │ └── yum │ │ └── yum.conf ├── debian │ └── initpost ├── defaults │ ├── apt.conf │ ├── apt │ │ └── apt.conf │ ├── devs │ └── rpm │ │ └── macros ├── f10 │ ├── pkgs │ │ ├── 01 │ │ ├── 02 │ │ └── 03 │ ├── rpmlist.d │ │ └── 00.lst │ ├── yum.repos.d │ │ ├── fedora-updates-testing.repo │ │ ├── fedora-updates.repo │ │ └── fedora.repo │ └── yum │ │ └── yum.conf ├── f11 │ ├── pkgs │ │ ├── 01 │ │ ├── 02 │ │ └── 03 │ ├── rpmlist.d │ │ └── 00.lst │ ├── yum.repos.d │ │ ├── fedora-updates-testing.repo │ │ ├── fedora-updates.repo │ │ └── fedora.repo │ └── yum │ │ └── yum.conf ├── f12 │ ├── pkgs │ │ ├── 01 │ │ ├── 02 │ │ └── 03 │ ├── rpmlist.d │ │ └── 00.lst │ ├── yum.repos.d │ │ ├── fedora-updates-testing.repo │ │ ├── fedora-updates.repo │ │ └── fedora.repo │ └── yum │ │ └── yum.conf ├── f13 │ ├── pkgs │ │ ├── 01 │ │ ├── 02 │ │ └── 03 │ ├── rpmlist.d │ │ └── 00.lst │ ├── yum.repos.d │ │ ├── fedora-updates-testing.repo │ │ ├── fedora-updates.repo │ │ └── fedora.repo │ └── yum │ │ └── yum.conf ├── f14 │ ├── pkgs │ │ ├── 01 │ │ ├── 02 │ │ └── 03 │ ├── rpmlist.d │ │ └── 00.lst │ ├── yum.repos.d │ │ ├── fedora-updates-testing.repo │ │ ├── fedora-updates.repo │ │ └── fedora.repo │ └── yum │ │ └── yum.conf ├── f7 │ ├── apt │ │ ├── rpmpriorities │ │ └── sources.list │ ├── pkgs │ │ ├── 01 │ │ ├── 02 │ │ └── 03 │ ├── rpmlist.d │ │ └── 00.lst │ ├── yum.repos.d │ │ ├── fedora-development.repo │ │ ├── fedora-updates-testing.repo │ │ ├── fedora-updates.repo │ │ └── fedora.repo │ └── yum │ │ └── yum.conf ├── f8 │ ├── apt │ │ ├── rpmpriorities │ │ └── sources.list │ ├── pkgs │ │ ├── 01 │ │ ├── 02 │ │ └── 03 │ ├── pubkeys │ │ ├── RPM-GPG-KEY-fedora-8-and-9-primary │ │ └── RPM-GPG-KEY-fedora-test-8-and-9-primary │ ├── rpmlist.d │ │ └── 00.lst │ ├── yum.repos.d │ │ ├── fedora-development.repo │ │ ├── fedora-updates-testing.repo │ │ ├── fedora-updates.repo │ │ └── fedora.repo │ └── yum │ │ └── yum.conf ├── f9 │ ├── pkgs │ │ ├── 01 │ │ ├── 02 │ │ └── 03 │ ├── pubkeys │ │ ├── RPM-GPG-KEY-fedora-8-and-9-primary │ │ └── RPM-GPG-KEY-fedora-test-8-and-9-primary │ ├── rpmlist.d │ │ └── 00.lst │ ├── yum.repos.d │ │ ├── fedora-development.repo │ │ ├── fedora-updates-testing.repo │ │ ├── fedora-updates.repo │ │ └── fedora.repo │ └── yum │ │ └── yum.conf ├── fc1 │ ├── apt │ │ ├── rpmpriorities │ │ └── sources.list │ └── pkgs │ │ ├── 01 │ │ └── 02 ├── fc2 │ ├── apt │ │ ├── rpmpriorities │ │ └── sources.list │ └── pkgs │ │ ├── 01 │ │ └── 02 ├── fc3 │ ├── apt │ │ ├── rpmpriorities │ │ └── sources.list │ ├── pkgs │ │ ├── 01 │ │ ├── 02 │ │ └── 03 │ ├── rpmlist.d │ │ └── 00.lst │ ├── yum.repos.d │ │ ├── fedora-devel.repo │ │ ├── fedora-updates-testing.repo │ │ ├── fedora-updates.repo │ │ └── fedora.repo │ └── yum │ │ └── yum.conf ├── fc4 │ ├── apt │ │ ├── rpmpriorities │ │ └── sources.list │ ├── pkgs │ │ ├── 01 │ │ ├── 02 │ │ └── 03 │ ├── rpmlist.d │ │ └── 00.lst │ ├── yum.repos.d │ │ ├── fedora-devel.repo │ │ ├── fedora-updates-testing.repo │ │ ├── fedora-updates.repo │ │ └── fedora.repo │ └── yum │ │ └── yum.conf ├── fc5 │ ├── apt │ │ ├── rpmpriorities │ │ └── sources.list │ ├── pkgs │ │ ├── 01 │ │ ├── 02 │ │ └── 03 │ ├── rpmlist.d │ │ └── 00.lst │ ├── yum.repos.d │ │ ├── fedora-core.repo │ │ ├── fedora-development.repo │ │ ├── fedora-extras-development.repo │ │ ├── fedora-extras.repo │ │ ├── fedora-legacy.repo │ │ ├── fedora-updates-testing.repo │ │ └── fedora-updates.repo │ └── yum │ │ └── yum.conf ├── fc6 │ ├── apt │ │ ├── rpmpriorities │ │ └── sources.list │ ├── pkgs │ │ ├── 01 │ │ ├── 02 │ │ └── 03 │ ├── rpmlist.d │ │ └── 00.lst │ ├── yum.repos.d │ │ ├── fedora-core.repo │ │ ├── fedora-development.repo │ │ ├── fedora-extras-development.repo │ │ ├── fedora-extras.repo │ │ ├── fedora-legacy.repo │ │ ├── fedora-updates-testing.repo │ │ └── fedora-updates.repo │ └── yum │ │ └── yum.conf ├── gentoo │ ├── init-vserver.sh │ ├── initpost │ ├── initpre │ ├── net.vserver │ ├── reboot.sh │ └── shutdown.sh ├── misc │ ├── context.start │ ├── debootstrap.mirror │ ├── debootstrap.uri │ ├── environment │ ├── fstab │ ├── h2ext.desc │ ├── mtab │ ├── vprocunhide-files │ └── vunify-exclude ├── redhat │ ├── initctl │ ├── initpost │ ├── initpre │ └── rc.sysinit ├── rh9 │ ├── apt │ │ ├── rpmpriorities │ │ └── sources.list │ └── pkgs │ │ ├── 01 │ │ └── 02 ├── sl6 │ ├── pkgs │ │ ├── 01 │ │ ├── 02 │ │ └── 03 │ ├── yum.repos.d │ │ └── sl.repo │ └── yum │ │ └── yum.conf ├── suse91 │ ├── apt │ │ ├── rpmpriorities │ │ └── sources.list │ ├── initpost │ ├── pkgs │ │ ├── 01 │ │ └── 02 │ └── rpm │ │ └── macros └── template │ ├── initpost │ └── initpre ├── doc ├── .gitignore ├── Makefile-files ├── compatibility-xhtml.xsl ├── compatibility.css ├── compatibility.dtd ├── compatibility.xml ├── configuration-wiki.xsl ├── configuration-xhtml.xsl ├── configuration.css ├── configuration.dtd ├── configuration.xml ├── configuration.xsd ├── intro.txt └── vunify-verbosity.txt ├── ensc_fmt ├── .gitignore ├── Makefile-files ├── fmt-32.c ├── fmt-64.c ├── fmt-internal.h ├── fmt-tai64n.c ├── fmt.h ├── fmt.hc ├── fmtx-32.c ├── fmtx-64.c └── fmtx.hc ├── ensc_vector ├── .gitignore ├── Makefile-files ├── list-add.c ├── list-at.c ├── list-free.c ├── list-init.c ├── list-insertinternal.c ├── list-internal.h ├── list-search.c ├── list-searchselforg.c ├── list.h ├── list.hc ├── testsuite │ ├── .gitignore │ ├── Makefile-files │ ├── test1.c │ └── test2.c ├── vector-clear.c ├── vector-foreach.c ├── vector-free.c ├── vector-init.c ├── vector-insert.c ├── vector-internal.h ├── vector-popback.c ├── vector-pushback.c ├── vector-resize.c ├── vector-resizeinternal.hc ├── vector-search.c ├── vector-searchselforg.c ├── vector-sort.c ├── vector-unique.c ├── vector-zeroend.c ├── vector.h └── vector.hc ├── ensc_wrappers ├── Makefile-files ├── wrappers-clone.hc ├── wrappers-dirent.hc ├── wrappers-fcntl.hc ├── wrappers-io.hc ├── wrappers-ioctl.hc ├── wrappers-iosock.hc ├── wrappers-mount.hc ├── wrappers-pivot.hc ├── wrappers-resource.hc ├── wrappers-socket.hc ├── wrappers-stat.hc ├── wrappers-stdlib.hc ├── wrappers-string.hc ├── wrappers-termios.hc ├── wrappers-unistd.hc ├── wrappers-vserver.hc ├── wrappers-wait.hc ├── wrappers.h └── wrappers_handler.hc ├── gentoo ├── Makefile-files ├── bash-wrapper ├── util-vserver ├── vprocunhide └── vservers.default ├── kernel ├── cacct_cmd.h ├── context_cmd.h ├── cvirt_cmd.h ├── debug_cmd.h ├── device_cmd.h ├── dlimit_cmd.h ├── inode_cmd.h ├── legacy.h ├── limit_cmd.h ├── monitor.h ├── network.h ├── network_cmd.h ├── sched_cmd.h ├── signal_cmd.h ├── space_cmd.h ├── switch.h └── tag_cmd.h ├── lib ├── .gitignore ├── Makefile-files ├── apidoc │ ├── .gitignore │ ├── Doxyfile.in │ ├── Makefile-files │ ├── list2xxx.descr │ └── list2xxx.syntax ├── bcaps-v13.c ├── bcaps_list-v13.c ├── capabilities.c ├── ccaps-v13.c ├── ccaps_list-v13.c ├── cflags-compat.c ├── cflags-v13.c ├── cflags_list-compat.c ├── cflags_list-v13.c ├── checkconfig.c ├── checkversion.c ├── comparevserverbyid.c ├── createskeleton-full.hc ├── createskeleton-short.hc ├── createskeleton.c ├── exitlikeprocess.c ├── ext2fs.h ├── fmt.h ├── getfilecontext.c ├── getinsecurebcaps.c ├── getkernel.c ├── getnbipv4root.c ├── getprocentry-legacy.c ├── getversion-internal.hc ├── getversion.c ├── getvserverappdir.c ├── getvserverbyctx-compat.hc ├── getvserverbyctx-v13.hc ├── getvserverbyctx.c ├── getvservercfgdir.c ├── getvservercfgstyle.c ├── getvserverctx.c ├── getvservername.c ├── getvservervdir.c ├── getxidtype.c ├── internal.h ├── ioctl-getext2flags.hc ├── ioctl-getfilecontext.hc ├── ioctl-getxflg.hc ├── ioctl-setext2flags.hc ├── ioctl-setfilecontext.hc ├── ioctl-setxflg.hc ├── isdirectory.c ├── isdynamicxid.c ├── isfile.c ├── islink.c ├── issupported.c ├── issupportedstring.c ├── libvserver.ver ├── listparser.hc ├── listparser_uint32.c ├── listparser_uint64.c ├── ncaps-net.c ├── ncaps_list-net.c ├── nflags-net.c ├── nflags_list-net.c ├── nidopt2nid.c ├── parselimit.c ├── personalityflag.c ├── personalityflag_list.c ├── personalitytype.c ├── safechroot-internal.hc ├── syscall-alternative.h ├── syscall-compat.hc ├── syscall-fallback.h ├── syscall-legacy.hc ├── syscall-syscall.c ├── syscall-wrap.h ├── syscall.c ├── syscall_adddlimit-v13.hc ├── syscall_adddlimit.c ├── syscall_cleanupnamespace-v13.hc ├── syscall_cleanupnamespace.c ├── syscall_ctxcreate-v13.hc ├── syscall_ctxcreate-v21.hc ├── syscall_ctxcreate.c ├── syscall_ctxmigrate-v13.hc ├── syscall_ctxmigrate-v21.hc ├── syscall_ctxmigrate.c ├── syscall_ctxstat-v21.hc ├── syscall_ctxstat.c ├── syscall_enternamespace-v13.hc ├── syscall_enternamespace-v21.hc ├── syscall_enternamespace-v23.hc ├── syscall_enternamespace.c ├── syscall_fgetiattr-v22.hc ├── syscall_fgetiattr.c ├── syscall_fsetiattr-v22.hc ├── syscall_fsetiattr.c ├── syscall_getbadness-v23.hc ├── syscall_getbadness.c ├── syscall_getccaps-v13.hc ├── syscall_getccaps-v21.hc ├── syscall_getccaps.c ├── syscall_getcflags-v13.hc ├── syscall_getcflags.c ├── syscall_getdlimit-v13.hc ├── syscall_getdlimit.c ├── syscall_getiattr-fscompat.hc ├── syscall_getiattr-v13.hc ├── syscall_getiattr.c ├── syscall_getncaps-net.hc ├── syscall_getncaps.c ├── syscall_getnflags-net.hc ├── syscall_getnflags.c ├── syscall_getnxinfo-net.hc ├── syscall_getnxinfo.c ├── syscall_getsched-v21.hc ├── syscall_getsched.c ├── syscall_getspacedefault-v23.hc ├── syscall_getspacedefault.c ├── syscall_getspacemask-v21.hc ├── syscall_getspacemask-v23.hc ├── syscall_getspacemask.c ├── syscall_gettasknid-net.hc ├── syscall_gettasknid.c ├── syscall_gettaskxid-oldproc.hc ├── syscall_gettaskxid-v13.hc ├── syscall_gettaskxid.c ├── syscall_getumask-v23.hc ├── syscall_getumask.c ├── syscall_getvci-v21.hc ├── syscall_getvci.c ├── syscall_getvhiname-olduts.hc ├── syscall_getvhiname-v13.hc ├── syscall_getvhiname.c ├── syscall_getvxinfo-oldproc.hc ├── syscall_getvxinfo-v13.hc ├── syscall_getvxinfo.c ├── syscall_kill-v11.hc ├── syscall_kill.c ├── syscall_netadd-net.hc ├── syscall_netadd-netv2.hc ├── syscall_netadd.c ├── syscall_netcreate-net.hc ├── syscall_netcreate.c ├── syscall_netmigrate-net.hc ├── syscall_netmigrate.c ├── syscall_netremove-net.hc ├── syscall_netremove-netv2.hc ├── syscall_netremove.c ├── syscall_remdlimit-v13.hc ├── syscall_remdlimit.c ├── syscall_resetminmax-v21.hc ├── syscall_resetminmax.c ├── syscall_rlimit-v11.hc ├── syscall_rlimit.c ├── syscall_rlimitstat-v21.hc ├── syscall_rlimitstat.c ├── syscall_schedinfo-v21.hc ├── syscall_schedinfo.c ├── syscall_setbadness-v23.hc ├── syscall_setbadness.c ├── syscall_setccaps-v13.hc ├── syscall_setccaps-v21.hc ├── syscall_setccaps.c ├── syscall_setcflags-v13.hc ├── syscall_setcflags.c ├── syscall_setdlimit-v13.hc ├── syscall_setdlimit.c ├── syscall_setiattr-fscompat.hc ├── syscall_setiattr-v13.hc ├── syscall_setiattr.c ├── syscall_setmapping-v21.hc ├── syscall_setmapping.c ├── syscall_setnamespace-v13.hc ├── syscall_setnamespace-v21.hc ├── syscall_setnamespace-v23.hc ├── syscall_setnamespace.c ├── syscall_setncaps-net.hc ├── syscall_setncaps.c ├── syscall_setnflags-net.hc ├── syscall_setnflags.c ├── syscall_setsched-v13.hc ├── syscall_setsched-v13obs.hc ├── syscall_setsched-v21.hc ├── syscall_setsched-v22.hc ├── syscall_setsched.c ├── syscall_setumask-v23.hc ├── syscall_setumask.c ├── syscall_setvhiname-olduts.hc ├── syscall_setvhiname-v13.hc ├── syscall_setvhiname.c ├── syscall_tagcreate.c ├── syscall_tagmigrate-v23.hc ├── syscall_tagmigrate.c ├── syscall_tasktag-v23.hc ├── syscall_tasktag.c ├── syscall_unsetmapping-v21.hc ├── syscall_unsetmapping.c ├── syscall_virtstat-v21.hc ├── syscall_virtstat.c ├── syscall_waitexit-v13.hc ├── syscall_waitexit.c ├── tagopt2tag.c ├── testsuite │ ├── .gitignore │ ├── Makefile-files │ ├── cflags.c │ ├── fmt.c │ ├── parselimit.c │ └── personality.c ├── umask-v23.c ├── umask_list-v23.c ├── util-vserver.pc.subst ├── utils-legacy.h ├── val2text-t2v-uint32.c ├── val2text-t2v-uint64.c ├── val2text-v2t-uint32.c ├── val2text-v2t-uint64.c ├── val2text.hc ├── virtual.h ├── vserver-internal.h ├── vserver.h └── xidopt2xid.c ├── lib_internal ├── .gitignore ├── Makefile-files ├── command-appendparameter.c ├── command-exec.c ├── command-free.c ├── command-init.c ├── command-reset.c ├── command-setparams.c ├── command-wait.c ├── command.h ├── coreassert.h ├── crypto-wrapper-beecrypt.h ├── crypto-wrapper-nss.h ├── crypto-wrapper.h ├── errinfo-writeerrno.c ├── errinfo.h ├── filecfg-iteratemultiline.c ├── filecfg-readentryflag.c ├── filecfg-readentrystr.c ├── filecfg.h ├── jail.h ├── jailintotempdir.c ├── matchlist-appendfiles.c ├── matchlist-compare.c ├── matchlist-destroy.c ├── matchlist-init.c ├── matchlist-initbyvserver.c ├── matchlist-initmanually.c ├── matchlist-initrefserverlist.c ├── matchlist-printid.c ├── matchlist.h ├── matchvserverinfo-free.c ├── matchvserverinfo-init.c ├── mkdir.c ├── pathinfo-append.c ├── pathinfo-test.c ├── pathinfo.h ├── string.h ├── string.hc ├── switchtowatchxid.c ├── sys_clone.h ├── sys_personality.h ├── sys_unshare.h ├── testsuite │ ├── .gitignore │ ├── Makefile-files │ ├── SPEED-RESULTS.txt │ ├── command.c │ ├── copy-check │ ├── copy.c │ ├── crypto-speed.c │ ├── crypto.c │ ├── filecfg-ml.c │ ├── isnumber.c │ ├── matchlist.c │ └── sigbus.c ├── unify-copy.c ├── unify-deunify.c ├── unify-isiunlinkable.c ├── unify-settime.c ├── unify-unify.c ├── unify.h ├── util-canonify.c ├── util-cast.h ├── util-cleanupmount.c ├── util-commonstrings.h ├── util-debug.h ├── util-declarecmd.h ├── util-dimof.h ├── util-dotfile.h ├── util-io.h ├── util-isnumber.c ├── util-isnumber.hc ├── util-isnumberunsigned.c ├── util-lockfile.c ├── util-lockfile.h ├── util-mem.h ├── util-perror.h ├── util-safechdir.c ├── util-safechdir.h ├── util-unixsock.h └── util.h ├── m4 ├── changelog.am ├── ensc_cflags.m4 ├── ensc_changelog.m4 ├── ensc_cxxcompiler.m4 ├── ensc_dietlibc.m4 ├── ensc_dietlibc_compat.m4 ├── ensc_e2fscheck.m4 ├── ensc_initrddir.m4 ├── ensc_pathprog.m4 ├── ensc_personality.m4 ├── ensc_release.m4 ├── ensc_syscall.m4 ├── ensc_syscallnr.m4 ├── ensc_uv_vrootdir.m4 ├── gpgsig.am ├── install-notify.am ├── libsel.am ├── pkgconfig.am ├── release.mk └── validate.am ├── man ├── Makefile-files ├── chbind.8 ├── chcontext.8 ├── distrib-info.8 ├── rebootmgr.8 ├── reducecap.8 ├── vps.8 ├── vpstree.8 ├── vrpm.8 ├── vserver-build.8.pathsubst ├── vserver-copy.8 ├── vserver-stat.8 ├── vserver.8 └── vtop.8 ├── mkrelease ├── pathconfig.h.pathsubst ├── python ├── Makefile-files ├── _libvserver.c ├── ctags-constants.awk └── libvserver.py ├── scripts ├── .gitignore ├── Makefile-files ├── X ├── chbind ├── chcontext ├── functions ├── h2ext-worker ├── legacy │ ├── .gitignore │ ├── distrib-info │ ├── rootshell │ ├── save_s_context │ ├── vps.pathsubst │ ├── vserver │ ├── vserver-copy │ └── vserverkillall ├── pkgmgmt ├── start-vservers ├── util-vserver-vars.pathsubst ├── vapt-get ├── vapt-get-worker ├── vdispatch-conf ├── vemerge ├── vesync ├── vmount ├── vnamespace ├── vpkg ├── vprocunhide ├── vpstree ├── vrpm ├── vrpm-preload ├── vrpm-worker ├── vserver ├── vserver-build ├── vserver-build.apt-rpm ├── vserver-build.clone ├── vserver-build.debootstrap ├── vserver-build.fai ├── vserver-build.functions ├── vserver-build.functions.apt ├── vserver-build.functions.pkgmgmt ├── vserver-build.functions.rpm ├── vserver-build.functions.urpmi ├── vserver-build.functions.yum ├── vserver-build.rpm ├── vserver-build.rsync ├── vserver-build.skeleton ├── vserver-build.template ├── vserver-build.urpmi ├── vserver-build.yum ├── vserver-init.functions ├── vserver-setup.functions ├── vserver-wrapper ├── vserver.delete ├── vserver.functions ├── vserver.start ├── vserver.stop ├── vserver.suexec ├── vservers.grabinfo.sh ├── vshelper.pathsubst ├── vsomething ├── vsysvwrapper ├── vtop ├── vupdateworld ├── vurpm ├── vurpm-worker ├── vyum └── vyum-worker ├── src ├── .gitignore ├── Makefile-files ├── attribute-util.h ├── capability-compat.h ├── capchroot.c ├── chain-echo.c ├── chbind.c ├── chcontext.c ├── check-unixfile.c ├── chroot-sh.c ├── chxid.c ├── compat-pivot_root.h ├── context-sync.hc ├── exec-cd.c ├── exec-remount.c ├── exec-ulimit.c ├── fakerunlevel.c ├── filetime.c ├── fstool.c ├── fstool.h ├── h2ext.c ├── ifspec.c ├── keep-ctx-alive.c ├── listdevip.c ├── lockfile.c ├── lsxid.c ├── mask2prefix.c ├── naddress.c ├── nattribute.c ├── ncontext.c ├── parserpmdump.c ├── readlink.c ├── rebootmgr.c ├── reducecap.c ├── rpm-fake-resolver.c ├── rpm-fake.c ├── save_ctxinfo.c ├── secure-mount.c ├── secure-umount.c ├── setattr.c ├── showattr.c ├── showperm.c ├── sigexec.c ├── stack-start.h ├── testsuite │ ├── .gitignore │ ├── Makefile-files │ ├── chbind-test.c │ ├── chcontext-test.c │ ├── data │ │ ├── rpm-fake-test.inp │ │ └── rpm-fake-test.out │ ├── hashcalc-plain.c │ ├── hashcalc-plain.sh │ ├── hashcalc.c │ ├── hashcalc.sh │ ├── rpm-fake-test.c │ ├── rpm-fake-test.sh │ ├── vunify-functest.c │ ├── vunify-test.sh │ └── vwait-test.sh ├── tunctl.c ├── util.h ├── vattribute.c ├── vclone.c ├── vcontext.c ├── vcopy-init.hc ├── vcopy.c ├── vdevmap.c ├── vdlimit.c ├── vdu.c ├── vhashify-init.hc ├── vhashify.c ├── vhashify.h ├── vkill.c ├── vlimit.c ├── vlogin.c ├── vmemctrl.c ├── vps.c ├── vreboot.c ├── vrsetup.c ├── vsched.c ├── vserver-info.c ├── vserver-stat.c ├── vserver-visitdir.hc ├── vshelper-sync.c ├── vspace.c ├── vsysctl.c ├── vtag.c ├── vuname.c ├── vunify-init.hc ├── vunify.c ├── vunify.h └── vwait.c ├── systemd ├── .gitignore ├── Makefile-files ├── systemd-start ├── systemd-stop ├── systemd-vserver-generator.c ├── util-vserver.service.pathsubst ├── util-vserver.sysctl.pathsubst ├── util-vserver.tmpfiles.pathsubst ├── vprocunhide.service.pathsubst ├── vserver-mark@.target ├── vserver.target └── vserver@.service.pathsubst ├── sysv ├── .gitignore ├── Makefile-files ├── rebootmgr ├── util-vserver ├── v_gated.subst ├── v_httpd.subst ├── v_named.subst ├── v_portmap.subst ├── v_sendmail.subst ├── v_smb.subst ├── v_sshd.subst ├── v_xinetd.subst ├── vprocunhide ├── vservers-default ├── vservers-legacy └── vservers.conf ├── tests ├── .gitignore ├── Makefile-files ├── chrootsafe.c ├── escaperoot.c ├── forkbomb.c ├── getctx.c ├── getinitpid.c ├── testipc.c ├── testlimit.c ├── testopenf.c └── vserver-info.c ├── update-doc ├── util-vserver.spec.in └── vserver-start ├── .gitignore ├── Makefile-files ├── configuration-init.c ├── configuration.c ├── configuration.h ├── defaulttty.c ├── interface-add.c ├── interface-free.hc ├── interface-init.hc ├── interface-print.c ├── interface-read.c ├── interface-remove.c ├── interface.c ├── interface.h ├── main.c ├── mount.c ├── mount.h ├── scriptlets.c ├── undo.c ├── undo.h ├── vserver-start.h ├── vshelper.c └── vshelper.h /.gitignore: -------------------------------------------------------------------------------- 1 | *.a 2 | .*.stamp 3 | .X_*etc-up-to-date 4 | .deps 5 | .fixups 6 | ChangeLog 7 | FEATURES.txt 8 | INSTALL 9 | Makefile 10 | Makefile.in 11 | aclocal.m4 12 | autom4te.cache 13 | compile 14 | config.guess 15 | config.h 16 | config.h.in 17 | config.log 18 | config.status 19 | config.sub 20 | configure 21 | depcomp 22 | install-sh 23 | libtool 24 | ltmain.sh 25 | m4/libtool.m4 26 | m4/ltoptions.m4 27 | m4/ltsugar.m4 28 | m4/ltversion.m4 29 | m4/lt~obsolete.m4 30 | man/vserver-build.8 31 | missing 32 | pathconfig.h 33 | python/.dirstamp 34 | python/.libs/ 35 | python/_libvserver-constants.c 36 | python/python__libvserver_la-_libvserver.lo 37 | src/exec-remount 38 | src/tunctl 39 | stamp-h1 40 | util-vserver-*.tar.* 41 | util-vserver.spec 42 | *.orig 43 | *~ 44 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Enrico Scholz 2 | Daniel Hokka Zakrisson 3 | -------------------------------------------------------------------------------- /Makefile.svn: -------------------------------------------------------------------------------- 1 | default: all 2 | 3 | all: 4 | autoreconf -fi 5 | 6 | -------------------------------------------------------------------------------- /REQUIREMENTS: -------------------------------------------------------------------------------- 1 | Build requirements: 2 | * iproute/iproute2 3 | * iptables 4 | * wget 5 | 6 | Recommended build environment: 7 | * gcc >= 3 8 | * beecrypt-devel 9 | * dietlibc >= 0.25 10 | -------------------------------------------------------------------------------- /THANKS: -------------------------------------------------------------------------------- 1 | I want to thank 2 | 3 | Jacques Gelinas , 4 | who wrote and maintains the 'vserver' package on which util-vserver 5 | is based on 6 | 7 | Sam Vilain, 8 | for providing man-pages and patches used in the Debian package 9 | 10 | Olivier Poitrey 11 | for his work on the XML/XSD based documentation format 12 | 13 | Herbert Poetzl, 14 | for providing the alternative syscall.h implementation 15 | 16 | Daniel Hokka Zakrisson 17 | for his patches which add support for non-legacy network functionality 18 | and much better dlimit support 19 | 20 | Benedikt Böhm 21 | for the much improved Gentoo support 22 | 23 | 24 | all the other people, who contributed to the original 'vserver' package 25 | -------------------------------------------------------------------------------- /contrib/.gitignore: -------------------------------------------------------------------------------- 1 | .manifest.dat.pathsubst.stamp 2 | manifest.dat 3 | -------------------------------------------------------------------------------- /contrib/yum-3.2.29_el66-no-scriptout-exception.patch: -------------------------------------------------------------------------------- 1 | Index: yum-3.2.29/yum/rpmtrans.py 2 | =================================================================== 3 | --- yum-3.2.29.orig/yum/rpmtrans.py 4 | +++ yum-3.2.29/yum/rpmtrans.py 5 | @@ -255,7 +255,10 @@ class RPMTransaction: 6 | def _scriptout(self, data): 7 | msgs = self._scriptOutput() 8 | self.display.scriptout(data, msgs) 9 | - self.base.history.log_scriptlet_output(data, msgs) 10 | + try: 11 | + self.base.history.log_scriptlet_output(data, msgs) 12 | + except: 13 | + self.display.errorlog('could not log scriptlet output') 14 | 15 | def __del__(self): 16 | self._shutdownOutputLogging() 17 | -------------------------------------------------------------------------------- /contrib/yum-3.2.29_el66-releasever.patch: -------------------------------------------------------------------------------- 1 | Index: yum-3.2.29/yum/config.py 2 | =================================================================== 3 | --- yum-3.2.29.orig/yum/config.py 4 | +++ yum-3.2.29/yum/config.py 5 | @@ -911,7 +911,10 @@ def readStartupConfig(configfile, root): 6 | # Stuff this here to avoid later re-parsing 7 | startupconf._parser = parser 8 | # setup the release ver here 9 | - startupconf.releasever = _getsysver(startupconf.installroot, startupconf.distroverpkg) 10 | + try: 11 | + startupconf.releasever = _getsysver(startupconf.installroot, startupconf.distroverpkg) 12 | + except: 13 | + startupconf.releasever = "" 14 | uuidfile = '%s/uuid' % (startupconf.persistdir,) 15 | startupconf.uuid = get_uuid(uuidfile) 16 | 17 | -------------------------------------------------------------------------------- /contrib/yum-3.4.3_el70-no-scriptout-exception.patch: -------------------------------------------------------------------------------- 1 | Index: yum-3.4.3/yum/rpmtrans.py 2 | =================================================================== 3 | --- yum-3.4.3.orig/yum/rpmtrans.py 4 | +++ yum-3.4.3/yum/rpmtrans.py 5 | @@ -255,7 +255,10 @@ class RPMTransaction: 6 | def _scriptout(self, data): 7 | msgs = self._scriptOutput() 8 | self.display.scriptout(data, msgs) 9 | - self.base.history.log_scriptlet_output(data, msgs) 10 | + try: 11 | + self.base.history.log_scriptlet_output(data, msgs) 12 | + except: 13 | + self.display.errorlog('could not log scriptlet output') 14 | 15 | def __del__(self): 16 | self._shutdownOutputLogging() 17 | -------------------------------------------------------------------------------- /contrib/yum-3.4.3_el70-releasever.patch: -------------------------------------------------------------------------------- 1 | Index: yum-3.4.3/yum/config.py 2 | =================================================================== 3 | --- yum-3.4.3.orig/yum/config.py 4 | +++ yum-3.4.3/yum/config.py 5 | @@ -1073,8 +1073,12 @@ def readStartupConfig(configfile, root, 6 | 7 | # setup the release ver here 8 | if releasever is None: 9 | - releasever = _getsysver(startupconf.installroot, 10 | - startupconf.distroverpkg) 11 | + try: 12 | + releasever = _getsysver(startupconf.installroot, 13 | + startupconf.distroverpkg) 14 | + except: 15 | + releasever = "" 16 | + 17 | startupconf.releasever = releasever 18 | 19 | uuidfile = '%s/uuid' % (startupconf.persistdir,) 20 | -------------------------------------------------------------------------------- /debian/changelog.in: -------------------------------------------------------------------------------- 1 | util-vserver (@PACKAGE_VERSION@-1) unstable; urgency=low 2 | 3 | * Initial release 4 | 5 | -- Daniel Hokka Zakrisson @DATE@ 6 | -------------------------------------------------------------------------------- /debian/compat: -------------------------------------------------------------------------------- 1 | 9 2 | -------------------------------------------------------------------------------- /debian/docs: -------------------------------------------------------------------------------- 1 | NEWS 2 | README 3 | -------------------------------------------------------------------------------- /debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # -*- makefile -*- 3 | # Sample debian/rules that uses debhelper. 4 | # 5 | # This file was originally written by Joey Hess and Craig Small. 6 | # As a special exception, when this file is copied by dh-make into a 7 | # dh-make output file, you may use that output file without restriction. 8 | # This special exception was added by Craig Small in version 0.37 of dh-make. 9 | # 10 | # Modified to make a template file for a multi-binary package with separated 11 | # build-arch and build-indep targets by Bill Allombert 2001 12 | 13 | # Uncomment this to turn on verbose mode. 14 | #export DH_VERBOSE=1 15 | 16 | # This has to be exported to make some magic below work. 17 | export DH_OPTIONS 18 | 19 | 20 | %: 21 | dh $@ 22 | 23 | override_dh_auto_configure: 24 | dh_auto_configure -- --with-initrddir=/etc/init.d --enable-release \ 25 | --enable-apis=NOLEGACY --with-initscripts=sysv 26 | 27 | override_dh_auto_test: 28 | 29 | override_dh_auto_install: 30 | dh_auto_install 31 | make DESTDIR=$(CURDIR)/debian/tmp install-distribution 32 | contrib/make-deb-manifest util-vserver debian contrib/manifest.dat files 33 | -------------------------------------------------------------------------------- /debian/util-vserver-build.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | test -d /vservers/.hash || mkdir -m0700 /vservers/.hash 4 | 5 | f="/etc/vservers/.defaults/apps/vunify/hash"; test -e "$f"/method -o -e "$f"/00 || \ 6 | ln -s /vservers/.hash "$f"/00 7 | 8 | /usr/sbin/setattr --barrier /vservers/.hash || : 9 | -------------------------------------------------------------------------------- /debian/util-vserver-legacy.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if test "$1" = configure; then 4 | update-rc.d rebootmgr start 98 2 3 4 5 . 02 0 1 6 . 5 | update-rc.d vservers-legacy start 98 2 3 4 5 . stop 02 0 1 6 . 6 | for i in httpd named portmap sendmail smb sshd xinetd gated; do 7 | update-rc.d v_$i start 98 2 3 4 5 . stop 02 0 1 6 . 8 | done 9 | fi 10 | -------------------------------------------------------------------------------- /debian/util-vserver-legacy.postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if test "$1" = purge; then 4 | update-rc.d rebootmgr remove 5 | update-rc.d vservers-legacy remove 6 | for i in httpd named portmap sendmail smb sshd xinetd gated; do 7 | update-rc.d v_$i remove 8 | done 9 | fi 10 | -------------------------------------------------------------------------------- /debian/util-vserver-legacy.prerm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if test "$1" = remove; then 4 | /etc/init.d/rebootmgr stop >/dev/null 2>&1 || : 5 | for i in httpd named portmap sendmail smb sshd xinetd gated; do 6 | /etc/init.d/v_$i stop >/dev/null 2>&1 || : 7 | done 8 | fi 9 | -------------------------------------------------------------------------------- /debian/util-vserver-sysv.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if test "$1" = configure; then 4 | update-rc.d vprocunhide start 26 2 3 4 5 . stop 74 0 1 6 . 5 | update-rc.d util-vserver start 10 2 3 4 5 . stop 90 0 1 6 . 6 | update-rc.d vservers-default start 98 2 3 4 5 . stop 02 0 1 6 . 7 | fi 8 | -------------------------------------------------------------------------------- /debian/util-vserver-sysv.postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if test "$1" = upgrade; then 4 | /etc/init.d/vprocunhide condrestart > /dev/null 2>&1 5 | fi 6 | 7 | if test "$1" = purge; then 8 | update-rc.d vprocunhide remove 9 | update-rc.d util-vserver remove 10 | update-rc.d vservers-default remove 11 | fi 12 | -------------------------------------------------------------------------------- /debian/util-vserver-sysv.prerm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if test "$1" = remove; then 4 | /etc/init.d/vprocunhide stop > /dev/null 2>&1 5 | fi 6 | -------------------------------------------------------------------------------- /debian/util-vserver.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | test -d /vservers || mkdir -m0000 /vservers 4 | test -d /vservers/.pkg || mkdir -m0755 /vservers/.pkg 5 | 6 | f="/etc/vservers/.defaults/vdirbase"; test -L "$f" -o -e "$f" || ln -s /vservers "$f" 7 | f="/etc/vservers/.defaults/run.rev"; test -L "$f" -o -e "$f" || ln -s /var/run/vservers.rev "$f" 8 | f="/etc/vservers/.defaults/cachebase"; test -L "$f" -o -e "$f" || ln -s /var/cache/vservers "$f" 9 | 10 | /usr/sbin/setattr --barrier /vservers /vservers/.pkg || : 11 | -------------------------------------------------------------------------------- /debian/util-vserver.postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if test "$1" = purge; then 4 | rm -rf /var/cache/vservers/* 2>/dev/null || : 5 | fi 6 | -------------------------------------------------------------------------------- /distrib/.gitignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | Makefile.in 3 | -------------------------------------------------------------------------------- /distrib/centos4/pkgs/01: -------------------------------------------------------------------------------- 1 | glibc 2 | -------------------------------------------------------------------------------- /distrib/centos4/pkgs/02: -------------------------------------------------------------------------------- 1 | --reinstall 2 | 3 | filesystem 4 | -------------------------------------------------------------------------------- /distrib/centos4/pkgs/03: -------------------------------------------------------------------------------- 1 | coreutils 2 | setup 3 | -------------------------------------------------------------------------------- /distrib/centos4/yum/yum.conf: -------------------------------------------------------------------------------- 1 | [main] 2 | cachedir=@YUMCACHEDIR@ 3 | reposdir=@YUMETCDIR@/yum.repos.d 4 | debuglevel=1 5 | logfile=@YUMLOGDIR@/log 6 | lockfile=@YUMLOCKDIR@/yum.pid 7 | pkgpolicy=newest 8 | distroverpkg=centos-release 9 | installonlypkgs= 10 | exactarch=0 11 | -------------------------------------------------------------------------------- /distrib/centos5/pkgs/01: -------------------------------------------------------------------------------- 1 | glibc 2 | -------------------------------------------------------------------------------- /distrib/centos5/pkgs/02: -------------------------------------------------------------------------------- 1 | --reinstall 2 | 3 | filesystem 4 | -------------------------------------------------------------------------------- /distrib/centos5/pkgs/03: -------------------------------------------------------------------------------- 1 | coreutils 2 | setup 3 | -------------------------------------------------------------------------------- /distrib/centos5/yum/yum.conf: -------------------------------------------------------------------------------- 1 | [main] 2 | cachedir=@YUMCACHEDIR@ 3 | reposdir=@YUMETCDIR@/yum.repos.d 4 | debuglevel=1 5 | logfile=@YUMLOGDIR@/log 6 | lockfile=@YUMLOCKDIR@/yum.pid 7 | pkgpolicy=newest 8 | distroverpkg=centos-release 9 | installonlypkgs= 10 | exactarch=0 11 | persistdir=@YUMLIBDIR@ 12 | -------------------------------------------------------------------------------- /distrib/defaults/apt.conf: -------------------------------------------------------------------------------- 1 | RPM { 2 | Ignore { "gpg-pubkey"; }; 3 | } 4 | -------------------------------------------------------------------------------- /distrib/defaults/apt/apt.conf: -------------------------------------------------------------------------------- 1 | // Do not remove 'autogenerated' tags and keep them on an own line 2 | // which can be commented out 3 | 4 | Dir { 5 | Etc "@APTETCDIR@"; // @autogenerated@: APTETCDIR 6 | } 7 | -------------------------------------------------------------------------------- /distrib/defaults/devs: -------------------------------------------------------------------------------- 1 | null c 1 3 666 2 | zero c 1 5 666 3 | full c 1 7 666 4 | random c 1 8 644 5 | urandom c 1 9 644 6 | tty c 5 0 666 7 | ptmx c 5 2 666 8 | fd l /proc/self/fd 777 9 | stdin l fd/0 777 10 | stdout l fd/1 777 11 | stderr l fd/2 777 12 | shm d 1777 13 | -------------------------------------------------------------------------------- /distrib/defaults/rpm/macros: -------------------------------------------------------------------------------- 1 | # Because of https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=52725 2 | # you have to use at least one language beside 'C' 3 | %_install_langs C:de:en:es:fr 4 | %_netsharedpath /dev:/etc/rc.d/init.d/halt:/sbin/new-kernel-pkg:/usr/bin/rhgb-client:/proc:/lib/udev/devices/:/lib/udev/devices/net/:/lib/udev/devices/cpu/:/lib/udev/devices/cpu/0/ 5 | -------------------------------------------------------------------------------- /distrib/f10/pkgs/01: -------------------------------------------------------------------------------- 1 | glibc 2 | -------------------------------------------------------------------------------- /distrib/f10/pkgs/02: -------------------------------------------------------------------------------- 1 | --reinstall 2 | 3 | filesystem 4 | -------------------------------------------------------------------------------- /distrib/f10/pkgs/03: -------------------------------------------------------------------------------- 1 | coreutils 2 | initscripts 3 | -------------------------------------------------------------------------------- /distrib/f10/rpmlist.d/00.lst: -------------------------------------------------------------------------------- 1 | glibc-[0-9]*.rpm 2 | basesystem-*.rpm 3 | bash-[0-9]*.rpm 4 | filesystem-*.rpm 5 | glibc-common-*.rpm 6 | libgcc-[0-9]*.rpm 7 | ncurses-base-[0-9]*.rpm 8 | ncurses-libs-*.rpm 9 | setup-*.rpm 10 | tzdata-*.rpm 11 | -------------------------------------------------------------------------------- /distrib/f10/yum/yum.conf: -------------------------------------------------------------------------------- 1 | [main] 2 | cachedir=@YUMCACHEDIR@ 3 | persistdir=@YUMLIBDIR@ 4 | reposdir=@YUMETCDIR@/yum.repos.d 5 | debuglevel=1 6 | logfile=@YUMLOGDIR@/log 7 | lockfile=@YUMLOCKDIR@/yum.pid 8 | pkgpolicy=newest 9 | distroverpkg=fedora-release 10 | installonlypkgs= 11 | exactarch=0 12 | -------------------------------------------------------------------------------- /distrib/f11/pkgs/01: -------------------------------------------------------------------------------- 1 | glibc 2 | -------------------------------------------------------------------------------- /distrib/f11/pkgs/02: -------------------------------------------------------------------------------- 1 | --reinstall 2 | 3 | filesystem 4 | -------------------------------------------------------------------------------- /distrib/f11/pkgs/03: -------------------------------------------------------------------------------- 1 | coreutils 2 | initscripts 3 | -------------------------------------------------------------------------------- /distrib/f11/rpmlist.d/00.lst: -------------------------------------------------------------------------------- 1 | glibc-[0-9]*.rpm 2 | basesystem-*.rpm 3 | bash-[0-9]*.rpm 4 | filesystem-*.rpm 5 | glibc-common-*.rpm 6 | libgcc-[0-9]*.rpm 7 | ncurses-base-[0-9]*.rpm 8 | ncurses-libs-*.rpm 9 | nss-softokn-freebl-*.rpm 10 | setup-*.rpm 11 | tzdata-*.rpm 12 | -------------------------------------------------------------------------------- /distrib/f11/yum/yum.conf: -------------------------------------------------------------------------------- 1 | [main] 2 | cachedir=@YUMCACHEDIR@ 3 | persistdir=@YUMLIBDIR@ 4 | reposdir=@YUMETCDIR@/yum.repos.d 5 | debuglevel=1 6 | logfile=@YUMLOGDIR@/log 7 | lockfile=@YUMLOCKDIR@/yum.pid 8 | pkgpolicy=newest 9 | distroverpkg=fedora-release 10 | installonlypkgs= 11 | exactarch=0 12 | -------------------------------------------------------------------------------- /distrib/f12/pkgs/01: -------------------------------------------------------------------------------- 1 | glibc 2 | -------------------------------------------------------------------------------- /distrib/f12/pkgs/02: -------------------------------------------------------------------------------- 1 | --reinstall 2 | 3 | filesystem 4 | -------------------------------------------------------------------------------- /distrib/f12/pkgs/03: -------------------------------------------------------------------------------- 1 | coreutils 2 | initscripts 3 | -------------------------------------------------------------------------------- /distrib/f12/rpmlist.d/00.lst: -------------------------------------------------------------------------------- 1 | glibc-[0-9]*.rpm 2 | basesystem-*.rpm 3 | bash-[0-9]*.rpm 4 | filesystem-*.rpm 5 | glibc-common-*.rpm 6 | libgcc-[0-9]*.rpm 7 | ncurses-base-[0-9]*.rpm 8 | ncurses-libs-*.rpm 9 | nss-softokn-freebl-*.rpm 10 | setup-*.rpm 11 | tzdata-*.rpm 12 | -------------------------------------------------------------------------------- /distrib/f12/yum/yum.conf: -------------------------------------------------------------------------------- 1 | [main] 2 | cachedir=@YUMCACHEDIR@ 3 | persistdir=@YUMLIBDIR@ 4 | reposdir=@YUMETCDIR@/yum.repos.d 5 | debuglevel=1 6 | logfile=@YUMLOGDIR@/log 7 | lockfile=@YUMLOCKDIR@/yum.pid 8 | pkgpolicy=newest 9 | distroverpkg=fedora-release 10 | installonlypkgs= 11 | exactarch=0 12 | -------------------------------------------------------------------------------- /distrib/f13/pkgs/01: -------------------------------------------------------------------------------- 1 | glibc 2 | -------------------------------------------------------------------------------- /distrib/f13/pkgs/02: -------------------------------------------------------------------------------- 1 | --reinstall 2 | 3 | filesystem 4 | -------------------------------------------------------------------------------- /distrib/f13/pkgs/03: -------------------------------------------------------------------------------- 1 | coreutils 2 | initscripts 3 | rsyslog 4 | -------------------------------------------------------------------------------- /distrib/f13/rpmlist.d/00.lst: -------------------------------------------------------------------------------- 1 | glibc-[0-9]*.rpm 2 | basesystem-*.rpm 3 | bash-[0-9]*.rpm 4 | filesystem-*.rpm 5 | glibc-common-*.rpm 6 | libgcc-[0-9]*.rpm 7 | ncurses-base-[0-9]*.rpm 8 | ncurses-libs-*.rpm 9 | nss-softokn-freebl-*.rpm 10 | setup-*.rpm 11 | tzdata-*.rpm 12 | -------------------------------------------------------------------------------- /distrib/f13/yum/yum.conf: -------------------------------------------------------------------------------- 1 | [main] 2 | cachedir=@YUMCACHEDIR@ 3 | persistdir=@YUMLIBDIR@ 4 | reposdir=@YUMETCDIR@/yum.repos.d 5 | debuglevel=1 6 | logfile=@YUMLOGDIR@/log 7 | lockfile=@YUMLOCKDIR@/yum.pid 8 | pkgpolicy=newest 9 | distroverpkg=fedora-release 10 | installonlypkgs= 11 | exactarch=0 12 | -------------------------------------------------------------------------------- /distrib/f14/pkgs/01: -------------------------------------------------------------------------------- 1 | glibc 2 | -------------------------------------------------------------------------------- /distrib/f14/pkgs/02: -------------------------------------------------------------------------------- 1 | --reinstall 2 | 3 | filesystem 4 | -------------------------------------------------------------------------------- /distrib/f14/pkgs/03: -------------------------------------------------------------------------------- 1 | coreutils 2 | initscripts 3 | rsyslog 4 | -------------------------------------------------------------------------------- /distrib/f14/rpmlist.d/00.lst: -------------------------------------------------------------------------------- 1 | glibc-[0-9]*.rpm 2 | basesystem-*.rpm 3 | bash-[0-9]*.rpm 4 | filesystem-*.rpm 5 | glibc-common-*.rpm 6 | libgcc-[0-9]*.rpm 7 | ncurses-base-[0-9]*.rpm 8 | ncurses-libs-*.rpm 9 | nss-softokn-freebl-*.rpm 10 | setup-*.rpm 11 | tzdata-*.rpm 12 | -------------------------------------------------------------------------------- /distrib/f14/yum/yum.conf: -------------------------------------------------------------------------------- 1 | [main] 2 | cachedir=@YUMCACHEDIR@ 3 | persistdir=@YUMLIBDIR@ 4 | reposdir=@YUMETCDIR@/yum.repos.d 5 | debuglevel=1 6 | logfile=@YUMLOGDIR@/log 7 | lockfile=@YUMLOCKDIR@/yum.pid 8 | pkgpolicy=newest 9 | distroverpkg=fedora-release 10 | installonlypkgs= 11 | exactarch=0 12 | -------------------------------------------------------------------------------- /distrib/f7/apt/rpmpriorities: -------------------------------------------------------------------------------- 1 | Essential: 2 | basesystem 3 | coreutils 4 | filesystem 5 | glibc 6 | setup 7 | fedora-release 8 | -------------------------------------------------------------------------------- /distrib/f7/apt/sources.list: -------------------------------------------------------------------------------- 1 | # rpm http://ftp.ultra.csn.tu-chemnitz.de/pub/mirror/fedora/core/.apt 3/i386 os patches updates 2 | 3 | # rpm ftp://ftp.ussg.iu.edu/pub/linux/fedora/fedora/fedora 3/i386 os updates 4 | # rpm ftp://ftp.tu-chemnitz.de/pub/linux/fedora/fedora 3/i386 os updates 5 | # rpm http://mirrors.usc.edu/pub/linux/fedora/fedora/fedora 3/i386 os updates 6 | # rpm http://sunsite.informatik.rwth-aachen.de/ftp/pub/Linux/fedora/fedora 3/i386 os updates 7 | # rpm http://download.fedora.us/fedora/fedora 3/i386 os updates 8 | -------------------------------------------------------------------------------- /distrib/f7/pkgs/01: -------------------------------------------------------------------------------- 1 | glibc 2 | -------------------------------------------------------------------------------- /distrib/f7/pkgs/02: -------------------------------------------------------------------------------- 1 | --reinstall 2 | 3 | filesystem 4 | -------------------------------------------------------------------------------- /distrib/f7/pkgs/03: -------------------------------------------------------------------------------- 1 | coreutils 2 | initscripts 3 | -------------------------------------------------------------------------------- /distrib/f7/rpmlist.d/00.lst: -------------------------------------------------------------------------------- 1 | basesystem-*.rpm 2 | filesystem-*.rpm 3 | glibc-common-*.rpm 4 | glibc-[0-9]*.rpm 5 | libgcc-[0-9]*.rpm 6 | setup-*.rpm 7 | tzdata-*.rpm 8 | -------------------------------------------------------------------------------- /distrib/f7/yum.repos.d/fedora-updates.repo: -------------------------------------------------------------------------------- 1 | [updates] 2 | name=Fedora 7 - $basearch - Updates 3 | #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/7/$basearch/ 4 | mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f7&arch=$basearch 5 | enabled=1 6 | gpgcheck=1 7 | gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/releases/7/Everything/$basearch/os/RPM-GPG-KEY-fedora 8 | 9 | [updates-debuginfo] 10 | name=Fedora 7 - $basearch - Updates - Debug 11 | #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/7/$basearch/debug/ 12 | mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-debug-f7&arch=$basearch 13 | enabled=0 14 | gpgcheck=1 15 | gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/releases/7/Everything/$basearch/os/RPM-GPG-KEY-fedora 16 | 17 | [updates-source] 18 | name=Fedora 7 - Updates Source 19 | #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/7/SRPMS/ 20 | mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-source-f7&arch=$basearch 21 | enabled=0 22 | gpgcheck=1 23 | gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/releases/7/Everything/$basearch/os/RPM-GPG-KEY-fedora 24 | -------------------------------------------------------------------------------- /distrib/f7/yum/yum.conf: -------------------------------------------------------------------------------- 1 | [main] 2 | cachedir=@YUMCACHEDIR@ 3 | persistdir=@YUMLIBDIR@ 4 | reposdir=@YUMETCDIR@/yum.repos.d 5 | debuglevel=1 6 | logfile=@YUMLOGDIR@/log 7 | lockfile=@YUMLOCKDIR@/yum.pid 8 | pkgpolicy=newest 9 | distroverpkg=fedora-release 10 | installonlypkgs= 11 | exactarch=0 12 | -------------------------------------------------------------------------------- /distrib/f8/apt/rpmpriorities: -------------------------------------------------------------------------------- 1 | Essential: 2 | basesystem 3 | coreutils 4 | filesystem 5 | glibc 6 | setup 7 | fedora-release 8 | -------------------------------------------------------------------------------- /distrib/f8/apt/sources.list: -------------------------------------------------------------------------------- 1 | # rpm http://ftp.ultra.csn.tu-chemnitz.de/pub/mirror/fedora/core/.apt 3/i386 os patches updates 2 | 3 | # rpm ftp://ftp.ussg.iu.edu/pub/linux/fedora/fedora/fedora 3/i386 os updates 4 | # rpm ftp://ftp.tu-chemnitz.de/pub/linux/fedora/fedora 3/i386 os updates 5 | # rpm http://mirrors.usc.edu/pub/linux/fedora/fedora/fedora 3/i386 os updates 6 | # rpm http://sunsite.informatik.rwth-aachen.de/ftp/pub/Linux/fedora/fedora 3/i386 os updates 7 | # rpm http://download.fedora.us/fedora/fedora 3/i386 os updates 8 | -------------------------------------------------------------------------------- /distrib/f8/pkgs/01: -------------------------------------------------------------------------------- 1 | glibc 2 | -------------------------------------------------------------------------------- /distrib/f8/pkgs/02: -------------------------------------------------------------------------------- 1 | --reinstall 2 | 3 | filesystem 4 | -------------------------------------------------------------------------------- /distrib/f8/pkgs/03: -------------------------------------------------------------------------------- 1 | coreutils 2 | initscripts 3 | -------------------------------------------------------------------------------- /distrib/f8/rpmlist.d/00.lst: -------------------------------------------------------------------------------- 1 | basesystem-*.rpm 2 | filesystem-*.rpm 3 | glibc-common-*.rpm 4 | glibc-[0-9]*.rpm 5 | libgcc-[0-9]*.rpm 6 | setup-*.rpm 7 | tzdata-*.rpm 8 | -------------------------------------------------------------------------------- /distrib/f8/yum/yum.conf: -------------------------------------------------------------------------------- 1 | [main] 2 | cachedir=@YUMCACHEDIR@ 3 | persistdir=@YUMLIBDIR@ 4 | reposdir=@YUMETCDIR@/yum.repos.d 5 | debuglevel=1 6 | logfile=@YUMLOGDIR@/log 7 | lockfile=@YUMLOCKDIR@/yum.pid 8 | pkgpolicy=newest 9 | distroverpkg=fedora-release 10 | installonlypkgs= 11 | exactarch=0 12 | -------------------------------------------------------------------------------- /distrib/f9/pkgs/01: -------------------------------------------------------------------------------- 1 | glibc 2 | -------------------------------------------------------------------------------- /distrib/f9/pkgs/02: -------------------------------------------------------------------------------- 1 | --reinstall 2 | 3 | filesystem 4 | -------------------------------------------------------------------------------- /distrib/f9/pkgs/03: -------------------------------------------------------------------------------- 1 | coreutils 2 | initscripts 3 | -------------------------------------------------------------------------------- /distrib/f9/rpmlist.d/00.lst: -------------------------------------------------------------------------------- 1 | basesystem-*.rpm 2 | filesystem-*.rpm 3 | glibc-common-*.rpm 4 | glibc-[0-9]*.rpm 5 | libgcc-[0-9]*.rpm 6 | setup-*.rpm 7 | tzdata-*.rpm 8 | bash-[0-9]*.rpm 9 | ncurses-libs-*.rpm 10 | ncurses-[0-9]*.rpm 11 | coreutils-[0-9]*.rpm 12 | ncurses-base-[0-9]*.rpm 13 | pam-[0-9]*.rpm 14 | libselinux-[0-9]*.rpm 15 | grep-[0-9]*.rpm 16 | info-[0-9]*.rpm 17 | libacl-[0-9]*.rpm 18 | cracklib-[0-9]*.rpm 19 | cracklib-dicts-[0-9]*.rpm 20 | audit-libs-[0-9]*.rpm 21 | libsepol-[0-9]*.rpm 22 | zlib-[0-9]*.rpm 23 | pcre-[0-9]*.rpm 24 | libattr-[0-9]*.rpm 25 | libstdc++-[0-9]*.rpm 26 | -------------------------------------------------------------------------------- /distrib/f9/yum/yum.conf: -------------------------------------------------------------------------------- 1 | [main] 2 | cachedir=@YUMCACHEDIR@ 3 | persistdir=@YUMLIBDIR@ 4 | reposdir=@YUMETCDIR@/yum.repos.d 5 | debuglevel=1 6 | logfile=@YUMLOGDIR@/log 7 | lockfile=@YUMLOCKDIR@/yum.pid 8 | pkgpolicy=newest 9 | distroverpkg=fedora-release 10 | installonlypkgs= 11 | exactarch=0 12 | -------------------------------------------------------------------------------- /distrib/fc1/apt/rpmpriorities: -------------------------------------------------------------------------------- 1 | Essential: 2 | basesystem 3 | coreutils 4 | filesystem 5 | glibc 6 | setup 7 | fedora-release 8 | -------------------------------------------------------------------------------- /distrib/fc1/apt/sources.list: -------------------------------------------------------------------------------- 1 | # rpm http://ftp.ultra.csn.tu-chemnitz.de/pub/mirror/fedora/core/.apt 1/i386 os patches updates 2 | # rpm-src http://ftp.ultra.csn.tu-chemnitz.de/pub/mirror/fedora/core/.apt 1/i386 os patches updates 3 | 4 | # rpm ftp://ftp.ussg.iu.edu/pub/linux/fedora/fedora/fedora 1/i386 os updates 5 | # rpm ftp://ftp.tu-chemnitz.de/pub/linux/fedora/fedora 1/i386 os updates 6 | # rpm http://mirrors.usc.edu/pub/linux/fedora/fedora 1/i386 os updates 7 | # rpm http://sunsite.informatik.rwth-aachen.de/ftp/pub/Linux/fedora/fedora 1/i386 os updates 8 | # rpm http://download.fedora.us/fedora/fedora 1/i386 os updates 9 | -------------------------------------------------------------------------------- /distrib/fc1/pkgs/01: -------------------------------------------------------------------------------- 1 | glibc 2 | -------------------------------------------------------------------------------- /distrib/fc1/pkgs/02: -------------------------------------------------------------------------------- 1 | --reinstall 2 | 3 | filesystem 4 | -------------------------------------------------------------------------------- /distrib/fc2/apt/rpmpriorities: -------------------------------------------------------------------------------- 1 | Essential: 2 | basesystem 3 | coreutils 4 | filesystem 5 | glibc 6 | setup 7 | fedora-release 8 | -------------------------------------------------------------------------------- /distrib/fc2/apt/sources.list: -------------------------------------------------------------------------------- 1 | # rpm http://ftp.ultra.csn.tu-chemnitz.de/pub/mirror/fedora/core/.apt 2/i386 os patches updates 2 | # rpm-src http://ftp.ultra.csn.tu-chemnitz.de/pub/mirror/fedora/core/.apt 2/i386 os patches updates 3 | 4 | # rpm ftp://ftp.ussg.iu.edu/pub/linux/fedora/fedora/fedora 2/i386 os updates 5 | # rpm ftp://ftp.tu-chemnitz.de/pub/linux/fedora/fedora 2/i386 os updates 6 | # rpm http://mirrors.usc.edu/pub/linux/fedora/fedora/fedora 2/i386 os updates 7 | # rpm http://sunsite.informatik.rwth-aachen.de/ftp/pub/Linux/fedora/fedora 2/i386 os updates 8 | # rpm http://download.fedora.us/fedora/fedora 2/i386 os updates 9 | -------------------------------------------------------------------------------- /distrib/fc2/pkgs/01: -------------------------------------------------------------------------------- 1 | glibc 2 | -------------------------------------------------------------------------------- /distrib/fc2/pkgs/02: -------------------------------------------------------------------------------- 1 | --reinstall 2 | 3 | filesystem 4 | -------------------------------------------------------------------------------- /distrib/fc3/apt/rpmpriorities: -------------------------------------------------------------------------------- 1 | Essential: 2 | basesystem 3 | coreutils 4 | filesystem 5 | glibc 6 | setup 7 | fedora-release 8 | -------------------------------------------------------------------------------- /distrib/fc3/apt/sources.list: -------------------------------------------------------------------------------- 1 | # rpm http://ftp.ultra.csn.tu-chemnitz.de/pub/mirror/fedora/core/.apt 3/i386 os patches updates 2 | 3 | # rpm ftp://ftp.ussg.iu.edu/pub/linux/fedora/fedora/fedora 3/i386 os updates 4 | # rpm ftp://ftp.tu-chemnitz.de/pub/linux/fedora/fedora 3/i386 os updates 5 | # rpm http://mirrors.usc.edu/pub/linux/fedora/fedora/fedora 3/i386 os updates 6 | # rpm http://sunsite.informatik.rwth-aachen.de/ftp/pub/Linux/fedora/fedora 3/i386 os updates 7 | # rpm http://download.fedora.us/fedora/fedora 3/i386 os updates 8 | -------------------------------------------------------------------------------- /distrib/fc3/pkgs/01: -------------------------------------------------------------------------------- 1 | glibc 2 | -------------------------------------------------------------------------------- /distrib/fc3/pkgs/02: -------------------------------------------------------------------------------- 1 | --reinstall 2 | 3 | filesystem 4 | -------------------------------------------------------------------------------- /distrib/fc3/pkgs/03: -------------------------------------------------------------------------------- 1 | coreutils 2 | setup 3 | -------------------------------------------------------------------------------- /distrib/fc3/rpmlist.d/00.lst: -------------------------------------------------------------------------------- 1 | basesystem-*.rpm 2 | filesystem-*.rpm 3 | glibc-common-*.rpm 4 | glibc-[0-9]*.rpm 5 | libgcc-[0-9]*.rpm 6 | setup-*.rpm 7 | tzdata-*.rpm 8 | -------------------------------------------------------------------------------- /distrib/fc3/yum.repos.d/fedora-devel.repo: -------------------------------------------------------------------------------- 1 | [development] 2 | name=Fedora Core 3 - Development Tree 3 | #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/development/$basearch/ 4 | mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-core-rawhide 5 | enabled=0 6 | -------------------------------------------------------------------------------- /distrib/fc3/yum.repos.d/fedora-updates-testing.repo: -------------------------------------------------------------------------------- 1 | [updates-testing] 2 | name=Fedora Core 3 - $basearch - Test Updates 3 | #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/testing/3/$basearch/ 4 | mirrorlist=http://fedora.redhat.com/download/mirrors/updates-testing-fc3 5 | enabled=0 6 | gpgcheck=1 7 | -------------------------------------------------------------------------------- /distrib/fc3/yum.repos.d/fedora-updates.repo: -------------------------------------------------------------------------------- 1 | [updates-released] 2 | name=Fedora Core 3 - $basearch - Released Updates 3 | #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/3/$basearch/ 4 | mirrorlist=http://fedora.redhat.com/download/mirrors/updates-released-fc3 5 | enabled=1 6 | gpgcheck=1 7 | -------------------------------------------------------------------------------- /distrib/fc3/yum.repos.d/fedora.repo: -------------------------------------------------------------------------------- 1 | [base] 2 | name=Fedora Core 3 - $basearch - Base 3 | #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/3/$basearch/os/ 4 | mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-core-3 5 | enabled=1 6 | gpgcheck=1 7 | -------------------------------------------------------------------------------- /distrib/fc3/yum/yum.conf: -------------------------------------------------------------------------------- 1 | [main] 2 | cachedir=@YUMCACHEDIR@ 3 | reposdir=@YUMETCDIR@/yum.repos.d 4 | debuglevel=1 5 | logfile=@YUMLOGDIR@/log 6 | lockfile=@YUMLOCKDIR@/yum.pid 7 | pkgpolicy=newest 8 | distroverpkg=fedora-release 9 | installonlypkgs= 10 | exactarch=0 11 | -------------------------------------------------------------------------------- /distrib/fc4/apt/rpmpriorities: -------------------------------------------------------------------------------- 1 | Essential: 2 | basesystem 3 | coreutils 4 | filesystem 5 | glibc 6 | setup 7 | fedora-release 8 | -------------------------------------------------------------------------------- /distrib/fc4/apt/sources.list: -------------------------------------------------------------------------------- 1 | # rpm http://ftp.ultra.csn.tu-chemnitz.de/pub/mirror/fedora/core/.apt 3/i386 os patches updates 2 | 3 | # rpm ftp://ftp.ussg.iu.edu/pub/linux/fedora/fedora/fedora 3/i386 os updates 4 | # rpm ftp://ftp.tu-chemnitz.de/pub/linux/fedora/fedora 3/i386 os updates 5 | # rpm http://mirrors.usc.edu/pub/linux/fedora/fedora/fedora 3/i386 os updates 6 | # rpm http://sunsite.informatik.rwth-aachen.de/ftp/pub/Linux/fedora/fedora 3/i386 os updates 7 | # rpm http://download.fedora.us/fedora/fedora 3/i386 os updates 8 | -------------------------------------------------------------------------------- /distrib/fc4/pkgs/01: -------------------------------------------------------------------------------- 1 | glibc 2 | -------------------------------------------------------------------------------- /distrib/fc4/pkgs/02: -------------------------------------------------------------------------------- 1 | --reinstall 2 | 3 | filesystem 4 | -------------------------------------------------------------------------------- /distrib/fc4/pkgs/03: -------------------------------------------------------------------------------- 1 | coreutils 2 | setup 3 | -------------------------------------------------------------------------------- /distrib/fc4/rpmlist.d/00.lst: -------------------------------------------------------------------------------- 1 | basesystem-*.rpm 2 | filesystem-*.rpm 3 | glibc-common-*.rpm 4 | glibc-[0-9]*.rpm 5 | libgcc-[0-9]*.rpm 6 | setup-*.rpm 7 | tzdata-*.rpm 8 | -------------------------------------------------------------------------------- /distrib/fc4/yum.repos.d/fedora-devel.repo: -------------------------------------------------------------------------------- 1 | [development] 2 | name=Fedora Core 4 - Development Tree 3 | #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/development/$basearch/ 4 | mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-core-rawhide 5 | enabled=0 6 | -------------------------------------------------------------------------------- /distrib/fc4/yum.repos.d/fedora-updates-testing.repo: -------------------------------------------------------------------------------- 1 | [updates-testing] 2 | name=Fedora Core 4 - $basearch - Test Updates 3 | #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/testing/4/$basearch/ 4 | mirrorlist=http://fedora.redhat.com/download/mirrors/updates-testing-fc4 5 | enabled=0 6 | gpgcheck=1 7 | -------------------------------------------------------------------------------- /distrib/fc4/yum.repos.d/fedora-updates.repo: -------------------------------------------------------------------------------- 1 | [updates-released] 2 | name=Fedora Core 4 - $basearch - Released Updates 3 | #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/4/$basearch/ 4 | mirrorlist=http://fedora.redhat.com/download/mirrors/updates-released-fc4 5 | enabled=1 6 | gpgcheck=1 7 | -------------------------------------------------------------------------------- /distrib/fc4/yum.repos.d/fedora.repo: -------------------------------------------------------------------------------- 1 | [base] 2 | name=Fedora Core 4 - $basearch - Base 3 | #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/4/$basearch/os/ 4 | mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-core-4 5 | enabled=1 6 | gpgcheck=1 7 | -------------------------------------------------------------------------------- /distrib/fc4/yum/yum.conf: -------------------------------------------------------------------------------- 1 | [main] 2 | cachedir=@YUMCACHEDIR@ 3 | reposdir=@YUMETCDIR@/yum.repos.d 4 | debuglevel=1 5 | logfile=@YUMLOGDIR@/log 6 | lockfile=@YUMLOCKDIR@/yum.pid 7 | pkgpolicy=newest 8 | distroverpkg=fedora-release 9 | installonlypkgs= 10 | exactarch=0 11 | -------------------------------------------------------------------------------- /distrib/fc5/apt/rpmpriorities: -------------------------------------------------------------------------------- 1 | Essential: 2 | basesystem 3 | coreutils 4 | filesystem 5 | glibc 6 | setup 7 | fedora-release 8 | -------------------------------------------------------------------------------- /distrib/fc5/apt/sources.list: -------------------------------------------------------------------------------- 1 | # rpm http://ftp.ultra.csn.tu-chemnitz.de/pub/mirror/fedora/core/.apt 3/i386 os patches updates 2 | 3 | # rpm ftp://ftp.ussg.iu.edu/pub/linux/fedora/fedora/fedora 3/i386 os updates 4 | # rpm ftp://ftp.tu-chemnitz.de/pub/linux/fedora/fedora 3/i386 os updates 5 | # rpm http://mirrors.usc.edu/pub/linux/fedora/fedora/fedora 3/i386 os updates 6 | # rpm http://sunsite.informatik.rwth-aachen.de/ftp/pub/Linux/fedora/fedora 3/i386 os updates 7 | # rpm http://download.fedora.us/fedora/fedora 3/i386 os updates 8 | -------------------------------------------------------------------------------- /distrib/fc5/pkgs/01: -------------------------------------------------------------------------------- 1 | glibc 2 | -------------------------------------------------------------------------------- /distrib/fc5/pkgs/02: -------------------------------------------------------------------------------- 1 | --reinstall 2 | 3 | filesystem 4 | -------------------------------------------------------------------------------- /distrib/fc5/pkgs/03: -------------------------------------------------------------------------------- 1 | coreutils 2 | initscripts 3 | -------------------------------------------------------------------------------- /distrib/fc5/rpmlist.d/00.lst: -------------------------------------------------------------------------------- 1 | basesystem-*.rpm 2 | filesystem-*.rpm 3 | glibc-common-*.rpm 4 | glibc-[0-9]*.rpm 5 | libgcc-[0-9]*.rpm 6 | setup-*.rpm 7 | tzdata-*.rpm 8 | -------------------------------------------------------------------------------- /distrib/fc5/yum.repos.d/fedora-core.repo: -------------------------------------------------------------------------------- 1 | [core] 2 | name=Fedora Core 5 - $basearch 3 | #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/5/$basearch/os/ 4 | mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-core-5 5 | enabled=1 6 | gpgcheck=1 7 | gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/core/5/$basearch/os/RPM-GPG-KEY-fedora http://redhat.download.fedoraproject.org/pub/fedora/linux/core/5/$basearch/os/RPM-GPG-KEY 8 | 9 | [core-debuginfo] 10 | name=Fedora Core 5 - $basearch - Debug 11 | baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/5/$basearch/debug/ 12 | enabled=0 13 | gpgcheck=1 14 | gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/core/5/$basearch/os/RPM-GPG-KEY-fedora http://redhat.download.fedoraproject.org/pub/fedora/linux/core/5/$basearch/os/RPM-GPG-KEY 15 | 16 | [core-source] 17 | name=Fedora Core 5 - Source 18 | baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/5/source/SRPMS/ 19 | enabled=0 20 | gpgcheck=1 21 | gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/core/5/$basearch/os/RPM-GPG-KEY-fedora http://redhat.download.fedoraproject.org/pub/fedora/linux/core/5/$basearch/os/RPM-GPG-KEY 22 | -------------------------------------------------------------------------------- /distrib/fc5/yum.repos.d/fedora-extras-development.repo: -------------------------------------------------------------------------------- 1 | [extras-development] 2 | name=Fedora Extras - Development Tree 3 | #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/development/$basearch/ 4 | mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-extras-devel 5 | enabled=0 6 | gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/core/5/$basearch/os/RPM-GPG-KEY-fedora-extras 7 | gpgcheck=1 8 | 9 | [extras-development-debuginfo] 10 | name=Fedora Extras - Development - Debug 11 | baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/development/$basearch/debug/ 12 | enabled=0 13 | gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/core/5/$basearch/os/RPM-GPG-KEY-fedora-extras 14 | gpgcheck=1 15 | 16 | [extras-development-source] 17 | name=Fedora Extras - Development - Source 18 | baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/development/SRPMS/ 19 | enabled=0 20 | gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/core/5/$basearch/os/RPM-GPG-KEY-fedora-extras 21 | gpgcheck=1 22 | -------------------------------------------------------------------------------- /distrib/fc5/yum.repos.d/fedora-extras.repo: -------------------------------------------------------------------------------- 1 | [extras] 2 | name=Fedora Extras 5 - $basearch 3 | #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/5/$basearch/ 4 | mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-extras-5 5 | enabled=1 6 | gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/core/5/$basearch/os/RPM-GPG-KEY-fedora-extras 7 | gpgcheck=1 8 | 9 | [extras-debuginfo] 10 | name=Fedora Extras 5 - $basearch - Debug 11 | baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/5/$basearch/debug/ 12 | enabled=0 13 | gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/core/5/$basearch/os/RPM-GPG-KEY-fedora-extras 14 | gpgcheck=1 15 | 16 | [extras-source] 17 | name=Fedora Extras 5 - Source 18 | baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/5/SRPMS/ 19 | enabled=0 20 | gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/core/5/$basearch/os/RPM-GPG-KEY-fedora-extras 21 | gpgcheck=1 22 | -------------------------------------------------------------------------------- /distrib/fc5/yum.repos.d/fedora-legacy.repo: -------------------------------------------------------------------------------- 1 | [legacy-updates] 2 | name=Fedora Legacy 5 - $basearch - Updates 3 | mirrorlist=http://fedora.redhat.com/download/mirrors/legacy-updates-released-fc5 4 | enabled=0 5 | gpgcheck=1 6 | gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/core/5/$basearch/os/RPM-GPG-KEY-fedora-legacy 7 | 8 | [legacy-testing] 9 | name=Fedora Legacy 5 - $basearch - Updates Testing 10 | mirrorlist=http://fedora.redhat.com/download/mirrors/legacy-updates-testing-fc5 11 | enabled=0 12 | gpgcheck=1 13 | gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/core/5/$basearch/os/RPM-GPG-KEY-fedora-legacy 14 | -------------------------------------------------------------------------------- /distrib/fc5/yum.repos.d/fedora-updates-testing.repo: -------------------------------------------------------------------------------- 1 | [updates-testing] 2 | name=Fedora Core 5 - $basearch - Test Updates 3 | #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/testing/5/$basearch/ 4 | mirrorlist=http://fedora.redhat.com/download/mirrors/updates-testing-fc5 5 | enabled=0 6 | gpgcheck=1 7 | gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/core/5/$basearch/os/RPM-GPG-KEY-fedora-test 8 | 9 | [updates-testing-debuginfo] 10 | name=Fedora Core 5 - $basearch - Test Updates Debug 11 | baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/testing/5/$basearch/debug/ 12 | enabled=0 13 | gpgcheck=1 14 | gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/core/5/$basearch/os/RPM-GPG-KEY-fedora-test 15 | 16 | [updates-testing-source] 17 | name=Fedora Core 5 - Test Updates Source 18 | baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/testing/5/SRPMS/ 19 | enabled=0 20 | gpgcheck=1 21 | gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/core/5/$basearch/os/RPM-GPG-KEY-fedora-test 22 | -------------------------------------------------------------------------------- /distrib/fc5/yum.repos.d/fedora-updates.repo: -------------------------------------------------------------------------------- 1 | [updates] 2 | name=Fedora Core 5 - $basearch - Updates 3 | #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/5/$basearch/ 4 | mirrorlist=http://fedora.redhat.com/download/mirrors/updates-released-fc5 5 | enabled=1 6 | gpgcheck=1 7 | gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/core/5/$basearch/os/RPM-GPG-KEY-fedora 8 | 9 | [updates-debuginfo] 10 | name=Fedora Core 5 - $basearch - Updates - Debug 11 | baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/5/$basearch/debug/ 12 | enabled=0 13 | gpgcheck=1 14 | gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/core/5/$basearch/os/RPM-GPG-KEY-fedora 15 | 16 | [updates-source] 17 | name=Fedora Core 5 - Updates Source 18 | baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/5/SRPMS/ 19 | enabled=0 20 | gpgcheck=1 21 | gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/core/5/$basearch/os/RPM-GPG-KEY-fedora 22 | -------------------------------------------------------------------------------- /distrib/fc5/yum/yum.conf: -------------------------------------------------------------------------------- 1 | [main] 2 | cachedir=@YUMCACHEDIR@ 3 | reposdir=@YUMETCDIR@/yum.repos.d 4 | debuglevel=1 5 | logfile=@YUMLOGDIR@/log 6 | lockfile=@YUMLOCKDIR@/yum.pid 7 | pkgpolicy=newest 8 | distroverpkg=fedora-release 9 | installonlypkgs= 10 | exactarch=0 11 | -------------------------------------------------------------------------------- /distrib/fc6/apt/rpmpriorities: -------------------------------------------------------------------------------- 1 | Essential: 2 | basesystem 3 | coreutils 4 | filesystem 5 | glibc 6 | setup 7 | fedora-release 8 | -------------------------------------------------------------------------------- /distrib/fc6/apt/sources.list: -------------------------------------------------------------------------------- 1 | # rpm http://ftp.ultra.csn.tu-chemnitz.de/pub/mirror/fedora/core/.apt 3/i386 os patches updates 2 | 3 | # rpm ftp://ftp.ussg.iu.edu/pub/linux/fedora/fedora/fedora 3/i386 os updates 4 | # rpm ftp://ftp.tu-chemnitz.de/pub/linux/fedora/fedora 3/i386 os updates 5 | # rpm http://mirrors.usc.edu/pub/linux/fedora/fedora/fedora 3/i386 os updates 6 | # rpm http://sunsite.informatik.rwth-aachen.de/ftp/pub/Linux/fedora/fedora 3/i386 os updates 7 | # rpm http://download.fedora.us/fedora/fedora 3/i386 os updates 8 | -------------------------------------------------------------------------------- /distrib/fc6/pkgs/01: -------------------------------------------------------------------------------- 1 | glibc 2 | -------------------------------------------------------------------------------- /distrib/fc6/pkgs/02: -------------------------------------------------------------------------------- 1 | --reinstall 2 | 3 | filesystem 4 | -------------------------------------------------------------------------------- /distrib/fc6/pkgs/03: -------------------------------------------------------------------------------- 1 | coreutils 2 | initscripts 3 | -------------------------------------------------------------------------------- /distrib/fc6/rpmlist.d/00.lst: -------------------------------------------------------------------------------- 1 | basesystem-*.rpm 2 | filesystem-*.rpm 3 | glibc-common-*.rpm 4 | glibc-[0-9]*.rpm 5 | libgcc-[0-9]*.rpm 6 | setup-*.rpm 7 | tzdata-*.rpm 8 | -------------------------------------------------------------------------------- /distrib/fc6/yum.repos.d/fedora-extras.repo: -------------------------------------------------------------------------------- 1 | [extras] 2 | name=Fedora Extras 6 - $basearch 3 | #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/6/$basearch/ 4 | mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=extras-6&arch=$basearch 5 | enabled=1 6 | gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/core/6/$basearch/os/RPM-GPG-KEY-fedora-extras 7 | gpgcheck=1 8 | 9 | [extras-debuginfo] 10 | name=Fedora Extras 6 - $basearch - Debug 11 | #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/6/$basearch/debug/ 12 | mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=extras-debug-6&arch=$basearch 13 | enabled=0 14 | gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/core/6/$basearch/os/RPM-GPG-KEY-fedora-extras 15 | gpgcheck=1 16 | 17 | [extras-source] 18 | name=Fedora Extras 6 - Source 19 | #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/6/SRPMS/ 20 | mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=extras-source-6&arch=$basearch 21 | enabled=0 22 | gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/core/6/$basearch/os/RPM-GPG-KEY-fedora-extras 23 | gpgcheck=1 24 | -------------------------------------------------------------------------------- /distrib/fc6/yum.repos.d/fedora-legacy.repo: -------------------------------------------------------------------------------- 1 | [legacy-updates] 2 | name=Fedora Legacy 6 - $basearch - Updates 3 | mirrorlist=http://fedora.redhat.com/Download/mirrors/legacy-updates-released-fc6 4 | enabled=0 5 | gpgcheck=1 6 | gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/core/6/$basearch/os/RPM-GPG-KEY-fedora-legacy 7 | 8 | [legacy-testing] 9 | name=Fedora Legacy 6 - $basearch - Updates Testing 10 | mirrorlist=http://fedora.redhat.com/Download/mirrors/legacy-updates-testing-fc6 11 | enabled=0 12 | gpgcheck=1 13 | gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/core/6/$basearch/os/RPM-GPG-KEY-fedora-legacy 14 | -------------------------------------------------------------------------------- /distrib/fc6/yum.repos.d/fedora-updates-testing.repo: -------------------------------------------------------------------------------- 1 | [updates-testing] 2 | name=Fedora Core 6 - $basearch - Test Updates 3 | #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/testing/6/$basearch/ 4 | mirrorlist=http://fedora.redhat.com/Download/mirrors/updates-testing-fc6 5 | enabled=0 6 | gpgcheck=1 7 | gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/core/6/$basearch/os/RPM-GPG-KEY-fedora-test 8 | 9 | [updates-testing-debuginfo] 10 | name=Fedora Core 6 - $basearch - Test Updates Debug 11 | #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/testing/6/$basearch/debug/ 12 | mirrorlist=http://fedora.redhat.com/Download/mirrors/updates-testing-debug-fc6 13 | enabled=0 14 | gpgcheck=1 15 | gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/core/6/$basearch/os/RPM-GPG-KEY-fedora-test 16 | 17 | [updates-testing-source] 18 | name=Fedora Core 6 - Test Updates Source 19 | #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/testing/6/SRPMS/ 20 | mirrorlist=http://fedora.redhat.com/Download/mirrors/updates-testing-source-fc6 21 | enabled=0 22 | gpgcheck=1 23 | gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/core/6/$basearch/os/RPM-GPG-KEY-fedora-test 24 | -------------------------------------------------------------------------------- /distrib/fc6/yum.repos.d/fedora-updates.repo: -------------------------------------------------------------------------------- 1 | [updates] 2 | name=Fedora Core 6 - $basearch - Updates 3 | #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/6/$basearch/ 4 | mirrorlist=http://fedora.redhat.com/Download/mirrors/updates-released-fc6 5 | enabled=1 6 | gpgcheck=1 7 | gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/core/6/$basearch/os/RPM-GPG-KEY-fedora 8 | 9 | [updates-debuginfo] 10 | name=Fedora Core 6 - $basearch - Updates - Debug 11 | #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/6/$basearch/debug/ 12 | mirrorlist=http://fedora.redhat.com/Download/mirrors/updates-released-debug-fc6 13 | enabled=0 14 | gpgcheck=1 15 | gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/core/6/$basearch/os/RPM-GPG-KEY-fedora 16 | 17 | [updates-source] 18 | name=Fedora Core 6 - Updates Source 19 | #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/6/SRPMS/ 20 | mirrorlist=http://fedora.redhat.com/Download/mirrors/updates-released-source-fc6 21 | enabled=0 22 | gpgcheck=1 23 | gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/core/6/$basearch/os/RPM-GPG-KEY-fedora 24 | -------------------------------------------------------------------------------- /distrib/fc6/yum/yum.conf: -------------------------------------------------------------------------------- 1 | [main] 2 | cachedir=@YUMCACHEDIR@ 3 | reposdir=@YUMETCDIR@/yum.repos.d 4 | debuglevel=1 5 | logfile=@YUMLOGDIR@/log 6 | lockfile=@YUMLOCKDIR@/yum.pid 7 | pkgpolicy=newest 8 | distroverpkg=fedora-release 9 | installonlypkgs= 10 | exactarch=0 11 | -------------------------------------------------------------------------------- /distrib/gentoo/init-vserver.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (C) 2006 Benedikt Boehm 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; version 2 of the License. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License 15 | # along with this program; if not, write to the Free Software 16 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | # 19 | # BIG FAT WARNING: 20 | # 21 | # Do not remove this file if you are using gentoo init style! 22 | # Your vserver will not boot anymore! 23 | # 24 | # You have been warned... 25 | 26 | # Force TERM=linux for baselayout-2 27 | 28 | RUNLEVEL=1 /sbin/rc sysinit || exit 1 29 | /sbin/rc boot || exit 1 30 | /sbin/rc ${1:-default} 31 | exit 0 32 | -------------------------------------------------------------------------------- /distrib/gentoo/net.vserver: -------------------------------------------------------------------------------- 1 | #!/sbin/runscript 2 | # Copyright 1999-2007 Gentoo Foundation 3 | # Distributed under the terms of the GNU General Public License v2 4 | # $Header: $ 5 | 6 | depend() { 7 | provide net 8 | } 9 | 10 | start() { 11 | return 0 12 | } 13 | 14 | stop() { 15 | return 0 16 | } 17 | -------------------------------------------------------------------------------- /distrib/gentoo/reboot.sh: -------------------------------------------------------------------------------- 1 | # Copyright 1999-2006 Gentoo Foundation 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | # gentoo init style needs this (and nothing else) 5 | exit 0 6 | -------------------------------------------------------------------------------- /distrib/gentoo/shutdown.sh: -------------------------------------------------------------------------------- 1 | # Copyright 1999-2006 Gentoo Foundation 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | # gentoo init style needs this (and nothing else) 5 | exit 0 6 | -------------------------------------------------------------------------------- /distrib/misc/context.start: -------------------------------------------------------------------------------- 1 | 40000 2 | -------------------------------------------------------------------------------- /distrib/misc/debootstrap.mirror: -------------------------------------------------------------------------------- 1 | http://ftp.debian.org/debian 2 | -------------------------------------------------------------------------------- /distrib/misc/debootstrap.uri: -------------------------------------------------------------------------------- 1 | http://ftp.debian.org/debian/pool/main/d/debootstrap/debootstrap_1.0.92~bpo9+1_all.deb 2 | -------------------------------------------------------------------------------- /distrib/misc/environment: -------------------------------------------------------------------------------- 1 | PATH=/bin:/usr/bin:/sbin:/usr/sbin 2 | -------------------------------------------------------------------------------- /distrib/misc/fstab: -------------------------------------------------------------------------------- 1 | none /proc proc defaults 0 0 2 | none /tmp tmpfs size=16m,mode=1777 0 0 3 | none /dev/pts devpts gid=5,mode=620 0 0 4 | -------------------------------------------------------------------------------- /distrib/misc/h2ext.desc: -------------------------------------------------------------------------------- 1 | # Borrowed from file(1) 2 | # gzip (GNU zip, not to be confused with [Info-ZIP/PKWARE] zip archiver) 3 | 0 string \037\213 gzip -d -c 1 4 | # tar posix 5 | 257 string ustar\0 tar -x --numeric-owner 0 6 | # tar gnu 7 | 257 string ustar\040\040\0 tar -x --numeric-owner 0 8 | # cpio 9 | 0 short 070707 cpio -i --numeric-uid-gid 0 10 | # cpio swapped 11 | 0 short 0143561 cpio -i --numeric-uid-gid 0 12 | # bzip2 13 | 0 string BZh bzip2 -d -c 1 14 | # dump/restore new-fs big and little endian 15 | 24 belong 60012 restore -rf - 0 16 | 24 lelong 60012 restore -rf - 0 17 | # dump/restore old-fs big and little endian 18 | 24 belong 60011 restore -rf - 0 19 | 24 lelong 60011 restore -rf - 0 20 | # xz 21 | 0 string \375\67zXZ\0 xz -d -c 1 22 | -------------------------------------------------------------------------------- /distrib/misc/mtab: -------------------------------------------------------------------------------- 1 | /dev/hdv1 / ufs defaults 0 0 2 | -------------------------------------------------------------------------------- /distrib/misc/vprocunhide-files: -------------------------------------------------------------------------------- 1 | /proc/net/ 2 | -/proc/net/rpc/ 3 | -/proc/net/ip_conntrack 4 | -/proc/net/ip_conntrack_expect 5 | -/proc/net/nf_conntrack 6 | -/proc/net/nf_conntrack_expect 7 | /proc/sys/ 8 | -/proc/sys/debug/ 9 | -/proc/sys/dev/ 10 | /proc/sysvipc/ 11 | /proc/tty/ 12 | /proc/cpuinfo 13 | /proc/crypto 14 | /proc/devices 15 | /proc/execdomains 16 | /proc/filesystems 17 | /proc/interrupts 18 | /proc/iomem 19 | /proc/ioports 20 | /proc/kcore 21 | /proc/kmsg 22 | /proc/ksyms 23 | /proc/loadavg 24 | /proc/locks 25 | /proc/meminfo 26 | /proc/misc 27 | /proc/modules 28 | /proc/pci 29 | /proc/slabinfo 30 | /proc/stat 31 | /proc/swaps 32 | /proc/uptime 33 | -/proc/cmdline 34 | /proc/version 35 | -------------------------------------------------------------------------------- /distrib/misc/vunify-exclude: -------------------------------------------------------------------------------- 1 | /.rpmdb 2 | /dev 3 | ~/etc/shadow 4 | ~/etc/passwd 5 | ~/etc/group 6 | +/etc/termcap 7 | +/etc/gconf 8 | +/etc/gconf/schemas 9 | /etc/gconf/* 10 | /etc/* 11 | /home 12 | /proc 13 | /mnt 14 | +/root/.ssh 15 | ~/root/.ssh/id* 16 | -/root/.ssh/* 17 | +/root/.gnupg 18 | ~/root/.gnupg/secring* 19 | -/root/.gnupg/* 20 | -/root/* 21 | /selinux 22 | /sys 23 | ~/tmp/* 24 | /tmp 25 | ~/var/tmp/* 26 | /var 27 | /*/ls-R 28 | -------------------------------------------------------------------------------- /distrib/redhat/initctl: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if kill -s 0 -- 1 > /dev/null 2>&1; then 4 | exec /sbin/initctl "$@" 5 | else 6 | # Ignore... 7 | exit 0 8 | fi 9 | -------------------------------------------------------------------------------- /distrib/redhat/initpre: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | # Copyright (C) 2003 Enrico Scholz 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; version 2 of the License. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License 15 | # along with this program; if not, write to the Free Software 16 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | vdir=$1/vdir 19 | . "$2" 20 | 21 | ## Fix/workaround the misclassification of %_netsharedpath's parent directories 22 | mkdir -p "$vdir"/{etc/rc.d/init.d,/sbin,/usr/bin} 23 | 24 | ## Workaround broken kernel %post scripts 25 | ln -s ../bin/true "$vdir"/sbin/new-kernel-pkg 26 | -------------------------------------------------------------------------------- /distrib/redhat/rc.sysinit: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | rm -f /var/lock/subsys/* /var/run/* /var/run/*/* 2>/dev/null 4 | true 5 | -------------------------------------------------------------------------------- /distrib/rh9/apt/rpmpriorities: -------------------------------------------------------------------------------- 1 | Essential: 2 | basesystem 3 | coreutils 4 | filesystem 5 | glibc 6 | setup 7 | redhat-release 8 | -------------------------------------------------------------------------------- /distrib/rh9/apt/sources.list: -------------------------------------------------------------------------------- 1 | # rpm http://ftp.ultra.csn.tu-chemnitz.de/pub/mirror/RedHat/.apt redhat/9 os errata 2 | # rpm-src http://ftp.ultra.csn.tu-chemnitz.de/pub/mirror/RedHat/.apt redhat/9 os errata 3 | 4 | # rpm ftp://ftp.tu-chemnitz.de/pub/linux/fedora/redhat 9/i386 os updates 5 | # rpm ftp://ftp.ussg.iu.edu/pub/linux/fedora/fedora/redhat 9/i386 os updates 6 | # rpm http://mirrors.usc.edu/pub/linux/fedora/redhat 9/i386 os updates 7 | # rpm http://sunsite.informatik.rwth-aachen.de/ftp/pub/Linux/fedora/redhat 9/i386 os updates 8 | -------------------------------------------------------------------------------- /distrib/rh9/pkgs/01: -------------------------------------------------------------------------------- 1 | glibc 2 | -------------------------------------------------------------------------------- /distrib/rh9/pkgs/02: -------------------------------------------------------------------------------- 1 | --reinstall 2 | 3 | filesystem 4 | -------------------------------------------------------------------------------- /distrib/sl6/pkgs/01: -------------------------------------------------------------------------------- 1 | glibc 2 | -------------------------------------------------------------------------------- /distrib/sl6/pkgs/02: -------------------------------------------------------------------------------- 1 | --reinstall 2 | 3 | filesystem 4 | -------------------------------------------------------------------------------- /distrib/sl6/pkgs/03: -------------------------------------------------------------------------------- 1 | coreutils 2 | setup 3 | initscripts 4 | rsyslog 5 | -------------------------------------------------------------------------------- /distrib/sl6/yum/yum.conf: -------------------------------------------------------------------------------- 1 | [main] 2 | cachedir=@YUMCACHEDIR@ 3 | reposdir=@YUMETCDIR@/yum.repos.d 4 | debuglevel=1 5 | logfile=@YUMLOGDIR@/log 6 | lockfile=@YUMLOCKDIR@/yum.pid 7 | pkgpolicy=newest 8 | distroverpkg=sl-release 9 | installonlypkgs= 10 | exactarch=0 11 | persistdir=@YUMLIBDIR@ 12 | -------------------------------------------------------------------------------- /distrib/suse91/apt/rpmpriorities: -------------------------------------------------------------------------------- 1 | Essential: 2 | aaa_base 3 | -------------------------------------------------------------------------------- /distrib/suse91/apt/sources.list: -------------------------------------------------------------------------------- 1 | # rpm http://ftp.tu-chemnitz.de/pub/linux/suse/apt/SuSE 9.1-i386 base 2 | -------------------------------------------------------------------------------- /distrib/suse91/initpost: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | vdir=$1/vdir 4 | . "$2" 5 | -------------------------------------------------------------------------------- /distrib/suse91/pkgs/01: -------------------------------------------------------------------------------- 1 | aaa_base 2 | -------------------------------------------------------------------------------- /distrib/suse91/pkgs/02: -------------------------------------------------------------------------------- 1 | --reinstall 2 | filesystem 3 | pam 4 | -------------------------------------------------------------------------------- /distrib/suse91/rpm/macros: -------------------------------------------------------------------------------- 1 | # Because of https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=52725 2 | # you have to use at least one language beside 'C' 3 | %_install_langs C:de:en:es:fr 4 | %_netsharedpath /dev:/proc 5 | -------------------------------------------------------------------------------- /distrib/template/initpost: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | # Copyright (C) 2005 Enrico Scholz 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; version 2 of the License. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License 15 | # along with this program; if not, write to the Free Software 16 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | ## Called as: initpost 19 | 20 | . "$2" 21 | 22 | true 23 | -------------------------------------------------------------------------------- /distrib/template/initpre: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | # Copyright (C) 2005 Enrico Scholz 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; version 2 of the License. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License 15 | # along with this program; if not, write to the Free Software 16 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | ## Called as: initpre 19 | 20 | . "$2" 21 | 22 | true 23 | -------------------------------------------------------------------------------- /doc/.gitignore: -------------------------------------------------------------------------------- 1 | compatibility.html 2 | configuration.html 3 | -------------------------------------------------------------------------------- /doc/compatibility.css: -------------------------------------------------------------------------------- 1 | div.program 2 | { 3 | margin: 0.5ex; 4 | padding: 0.5ex; 5 | } 6 | 7 | div.program div.name 8 | { 9 | font-weight: bold; 10 | } 11 | 12 | div.program div.name, 13 | div.program div.clicompat, 14 | div.program div.funccompat 15 | { 16 | } 17 | 18 | div.program div.clicompat, 19 | div.program div.funccompat 20 | { 21 | margin-left: 1em; 22 | } 23 | 24 | div.clicompat div.text, 25 | div.funccompat div.text 26 | { 27 | margin-left: 1em; 28 | } 29 | -------------------------------------------------------------------------------- /doc/compatibility.dtd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 15 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /doc/configuration.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-size: 12pt; 3 | background-color: white; 4 | margin: 10px; 5 | } 6 | 7 | span.directory { 8 | //text-decoration: underline; 9 | } 10 | 11 | 12 | span.symlink:after { 13 | content: " [symlink]"; 14 | font-size: 8pt; 15 | font-style: normal; 16 | } 17 | 18 | span.symlink { 19 | text-decoration: none; 20 | font-style: italic; 21 | } 22 | 23 | span.script:after { 24 | content: " [script]"; 25 | font-size: 8pt; 26 | font-style: normal; 27 | } 28 | 29 | span.script { 30 | color: gray; 31 | } 32 | 33 | span.symbolic:before { content: "<"; } 34 | span.symbolic:after { content: ">"; } 35 | 36 | span.symbolic { 37 | font-style: italic; 38 | text-decoration: none; 39 | } 40 | 41 | div.description { 42 | background-color: #ffffdd; 43 | } 44 | 45 | 46 | div.elements { 47 | padding-left: 1em; 48 | } 49 | 50 | dd.elements { 51 | } 52 | 53 | dt.elements { 54 | } 55 | -------------------------------------------------------------------------------- /doc/intro.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linux-vserver/util-vserver/c0e9636939d3fe05745cdf27cdec9d1669c89a8b/doc/intro.txt -------------------------------------------------------------------------------- /doc/vunify-verbosity.txt: -------------------------------------------------------------------------------- 1 | >=1 2 | -- 3 | * skipping of normal, non-unified files 4 | * general progress-messages 5 | 6 | >=2 7 | --- 8 | * deunify/unify messages 9 | * skip-reason 10 | * more detailed progress-messages 11 | 12 | >=3 13 | -- 14 | * skipping of already unified files 15 | 16 | >=4 17 | -- 18 | * source of unification; when verbosity==4 -> vserver-id, else 19 | physical path 20 | 21 | >=6 22 | --- 23 | * skipping of dirs and dotfiles 24 | -------------------------------------------------------------------------------- /ensc_fmt/.gitignore: -------------------------------------------------------------------------------- 1 | .deps 2 | .dirstamp 3 | .libs 4 | *.lo 5 | -------------------------------------------------------------------------------- /ensc_fmt/Makefile-files: -------------------------------------------------------------------------------- 1 | ## $Id$ --*- makefile -*-- 2 | 3 | ## Copyright (C) 2004 Enrico Scholz 4 | ## 5 | ## This program is free software; you can redistribute it and/or modify 6 | ## it under the terms of the GNU General Public License as published by 7 | ## the Free Software Foundation; version 2 of the License. 8 | ## 9 | ## This program is distributed in the hope that it will be useful, 10 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | ## GNU General Public License for more details. 13 | ## 14 | ## You should have received a copy of the GNU General Public License 15 | ## along with this program; if not, write to the Free Software 16 | ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | ensc_fmt_SRCS = \ 19 | ensc_fmt/fmt-32.c \ 20 | ensc_fmt/fmt-64.c \ 21 | ensc_fmt/fmtx-32.c \ 22 | ensc_fmt/fmtx-64.c \ 23 | ensc_fmt/fmt-tai64n.c \ 24 | ensc_fmt/fmt.h \ 25 | ensc_fmt/fmt.hc \ 26 | ensc_fmt/fmtx.hc \ 27 | ensc_fmt/fmt-internal.h 28 | -------------------------------------------------------------------------------- /ensc_fmt/fmt-64.c: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2003 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #define FMT_BITSIZE 64 24 | #include "fmt.hc" 25 | 26 | #if __WORDSIZE==64 27 | size_t FMT_P(ulong_base)(char *ptr, unsigned long val, char base) ALIASFUNC(uint64_base); 28 | size_t FMT_P( long_base)(char *ptr, long val, char base) ALIASFUNC( int64_base); 29 | #endif 30 | -------------------------------------------------------------------------------- /ensc_fmt/fmtx-64.c: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2003 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #define FMT_BITSIZE 64 24 | #include "fmtx.hc" 25 | 26 | #if __WORDSIZE==FMT_BITSIZE 27 | size_t FMT_P(xulong)(char *ptr, unsigned long val) ALIASFUNC(xuint64); 28 | size_t FMT_P( xlong)(char *ptr, long val) ALIASFUNC( xint64); 29 | #endif 30 | -------------------------------------------------------------------------------- /ensc_vector/.gitignore: -------------------------------------------------------------------------------- 1 | .deps 2 | .dirstamp 3 | -------------------------------------------------------------------------------- /ensc_vector/list-add.c: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2005 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | // 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #include "list.h" 24 | #include "list-internal.h" 25 | 26 | 27 | void * 28 | List_add(struct List *list, void const *data) 29 | { 30 | return List_insertInternal(list, data, &list->root, 0)->data; 31 | } 32 | -------------------------------------------------------------------------------- /ensc_vector/list-at.c: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2005 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | // 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #include "list.h" 24 | #include "list-internal.h" 25 | 26 | void const * 27 | List_at_const(struct List const *l, size_t idx) 28 | { 29 | struct ListItem const *itm = l->root; 30 | 31 | for (; itm!=0 && idx>0; --idx) 32 | itm = itm->next; 33 | 34 | if (itm!=0) return itm->data; 35 | else return 0; 36 | } 37 | -------------------------------------------------------------------------------- /ensc_vector/list-init.c: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2005 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | // 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #include "list.h" 24 | 25 | void 26 | List_init(struct List *list, size_t elem_size) 27 | { 28 | list->root = 0; 29 | list->count = 0; 30 | list->elem_size = elem_size; 31 | } 32 | -------------------------------------------------------------------------------- /ensc_vector/list.hc: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2005 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | // 18 | 19 | static inline UNUSED void * 20 | List_at(struct List *list, size_t idx) 21 | { 22 | return (void *)(List_at_const(list, idx)); 23 | } 24 | -------------------------------------------------------------------------------- /ensc_vector/testsuite/.gitignore: -------------------------------------------------------------------------------- 1 | .deps 2 | .dirstamp 3 | .libs 4 | test1 5 | test2 6 | -------------------------------------------------------------------------------- /ensc_vector/vector-clear.c: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #include "vector.h" 24 | #include 25 | 26 | void 27 | Vector_clear(struct Vector *vec) 28 | { 29 | assert(vec!=0); 30 | vec->count = 0; 31 | } 32 | -------------------------------------------------------------------------------- /ensc_vector/vector-foreach.c: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #include "vector.h" 24 | 25 | void 26 | Vector_foreach(struct Vector *vec, void (*func)(void *, void *), void *data) 27 | { 28 | char * ptr = Vector_begin(vec); 29 | char * const end = Vector_end(vec); 30 | size_t const step = vec->elem_size; 31 | 32 | for (; ptr 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #include "vector.h" 24 | #include 25 | 26 | void 27 | Vector_init(struct Vector *vec, size_t elem_size) 28 | { 29 | assert(vec!=0); 30 | assert(elem_size!=0); 31 | 32 | vec->elem_size = elem_size; 33 | vec->data = 0; 34 | vec->count = 0; 35 | vec->allocated = 0; 36 | } 37 | -------------------------------------------------------------------------------- /ensc_vector/vector-internal.h: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifndef H_UTIL_VSERVER_SRC_VECTOR_VECTOR_INTERNAL_H 20 | #define H_UTIL_VSERVER_SRC_VECTOR_VECTOR_INTERNAL_H 21 | 22 | #ifndef VECTOR_SET_THRESHOLD 23 | # define VECTOR_SET_THRESHOLD 20/16 24 | #endif 25 | 26 | #ifndef VECTOR_DEC_THRESHOLD 27 | # define VECTOR_DEC_THRESHOLD 24/16 28 | #endif 29 | 30 | 31 | 32 | #endif // H_UTIL_VSERVER_SRC_VECTOR_VECTOR_INTERNAL_H 33 | -------------------------------------------------------------------------------- /ensc_vector/vector-popback.c: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #include "vector.h" 24 | #include 25 | 26 | void 27 | Vector_popback(struct Vector *vec) 28 | { 29 | assert(vec->count>0); 30 | 31 | if (vec->count>0) --vec->count; 32 | } 33 | -------------------------------------------------------------------------------- /ensc_vector/vector-pushback.c: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #include "vector.h" 24 | #include "vector-resizeinternal.hc" 25 | 26 | void * 27 | Vector_pushback(struct Vector *vec) 28 | { 29 | ++vec->count; 30 | if (vec->allocatedcount) 31 | Vector_resizeInternal(vec); 32 | 33 | return (char *)(vec->data) + ((vec->count-1) * vec->elem_size); 34 | } 35 | -------------------------------------------------------------------------------- /ensc_vector/vector-resize.c: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #include "vector.h" 24 | #include "vector-resizeinternal.hc" 25 | 26 | void 27 | Vector_resize(struct Vector *vec) 28 | { 29 | if (vec->allocated * VECTOR_DEC_THRESHOLD > vec->count+1) 30 | Vector_resizeInternal(vec); 31 | } 32 | -------------------------------------------------------------------------------- /ensc_vector/vector-sort.c: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #include "vector.h" 24 | 25 | #include 26 | #include 27 | 28 | void 29 | Vector_sort(struct Vector *vec, int (*compare)(const void *, const void *)) 30 | { 31 | if (vec->count==0) return; 32 | 33 | qsort(vec->data, vec->count, vec->elem_size, compare); 34 | } 35 | -------------------------------------------------------------------------------- /ensc_wrappers/wrappers-clone.hc: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifndef H_ENSC_IN_WRAPPERS_H 20 | # error wrappers_handler.hc can not be used in this way 21 | #endif 22 | 23 | #include 24 | 25 | inline static WRAPPER_DECL pid_t 26 | Eclone(uint64_t flags, void *child_stack) 27 | { 28 | pid_t res; 29 | res = sys_clone(flags, child_stack); 30 | FatalErrnoError(res==-1, "clone()"); 31 | return res; 32 | } 33 | -------------------------------------------------------------------------------- /ensc_wrappers/wrappers-pivot.hc: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifndef H_ENSC_IN_WRAPPERS_H 20 | # error wrappers_handler.hc can not be used in this way 21 | #endif 22 | 23 | inline static WRAPPER_DECL void 24 | Epivot_root(const char *new_root, const char *put_old) 25 | { 26 | FatalErrnoError(pivot_root(new_root, put_old)==-1, "pivot_root()"); 27 | } 28 | -------------------------------------------------------------------------------- /ensc_wrappers/wrappers-string.hc: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2005 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | #ifndef H_ENSC_IN_WRAPPERS_H 19 | # error wrappers_handler.hc can not be used in this way 20 | #endif 21 | 22 | /*@unused@*/ 23 | inline static WRAPPER_DECL char * 24 | Estrdup(char const *s) 25 | { 26 | register char *res = strdup(s); 27 | FatalErrnoError(res==0, "strdup()"); 28 | return res; 29 | } 30 | -------------------------------------------------------------------------------- /ensc_wrappers/wrappers-wait.hc: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifndef H_ENSC_IN_WRAPPERS_H 20 | # error wrappers_handler.hc can not be used in this way 21 | #endif 22 | 23 | inline static WRAPPER_DECL pid_t 24 | Ewait4(pid_t pid, int *status, int options, 25 | struct rusage *rusage) 26 | { 27 | pid_t res; 28 | res = wait4(pid, status, options, rusage); 29 | FatalErrnoError(res==-1, "wait4()"); 30 | return res; 31 | } 32 | -------------------------------------------------------------------------------- /gentoo/vprocunhide: -------------------------------------------------------------------------------- 1 | #!/sbin/runscript 2 | # Copyright 1999-2005 Gentoo Foundation 3 | # Distributed under the terms of the GNU General Public License v2 4 | 5 | start() { 6 | : ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars} 7 | if [ ! -e ${UTIL_VSERVER_VARS} ]; then 8 | eerror "Cannot find util-vserver installation" 9 | eerror "(the file '$UTIL_VSERVER_VARS' would be expected)" 10 | return 1 11 | fi 12 | 13 | . ${UTIL_VSERVER_VARS} 14 | 15 | ebegin "Fixing /proc entries visibility" 16 | ${_VPROCUNHIDE} 17 | eend $? 18 | } 19 | 20 | # vim:ts=4:filetype=gentoo-init-d 21 | -------------------------------------------------------------------------------- /gentoo/vservers.default: -------------------------------------------------------------------------------- 1 | #!/sbin/runscript 2 | # Copyright 1999-2005 Gentoo Foundation 3 | # Distributed under the terms of the GNU General Public License v2 4 | 5 | depend() { 6 | need util-vserver vprocunhide 7 | } 8 | 9 | start() { 10 | : ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars} 11 | if [ ! -e ${UTIL_VSERVER_VARS} ]; then 12 | eerror "Cannot find util-vserver installation" 13 | eerror "(the file '$UTIL_VSERVER_VARS' would be expected)" 14 | return 1 15 | fi 16 | . ${UTIL_VSERVER_VARS} 17 | MARK=${SVCNAME#vservers.} $_VSERVER_WRAPPER start 18 | } 19 | 20 | stop() { 21 | : ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars} 22 | if [ ! -e ${UTIL_VSERVER_VARS} ]; then 23 | eerror "Cannot find util-vserver installation" 24 | eerror "(the file '$UTIL_VSERVER_VARS' would be expected)" 25 | return 1 26 | fi 27 | . ${UTIL_VSERVER_VARS} 28 | MARK=${SVCNAME#vservers.} $_VSERVER_WRAPPER stop 29 | } 30 | 31 | 32 | 33 | # vim:ts=4:filetype=gentoo-init-d 34 | -------------------------------------------------------------------------------- /kernel/cacct_cmd.h: -------------------------------------------------------------------------------- 1 | #ifndef _VX_CACCT_CMD_H 2 | #define _VX_CACCT_CMD_H 3 | 4 | 5 | /* virtual host info name commands */ 6 | 7 | #define VCMD_sock_stat VC_CMD(VSTAT, 5, 0) 8 | 9 | struct vcmd_sock_stat_v0 { 10 | uint32_t field; 11 | uint32_t count[3]; 12 | uint64_t total[3]; 13 | }; 14 | 15 | 16 | #endif /* _VX_CACCT_CMD_H */ 17 | -------------------------------------------------------------------------------- /kernel/cvirt_cmd.h: -------------------------------------------------------------------------------- 1 | #ifndef _VX_CVIRT_CMD_H 2 | #define _VX_CVIRT_CMD_H 3 | 4 | 5 | /* virtual host info name commands */ 6 | 7 | #define VCMD_set_vhi_name VC_CMD(VHOST, 1, 0) 8 | #define VCMD_get_vhi_name VC_CMD(VHOST, 2, 0) 9 | 10 | struct vcmd_vhi_name_v0 { 11 | uint32_t field; 12 | char name[65]; 13 | }; 14 | 15 | 16 | enum vhi_name_field { 17 | VHIN_CONTEXT=0, 18 | VHIN_SYSNAME, 19 | VHIN_NODENAME, 20 | VHIN_RELEASE, 21 | VHIN_VERSION, 22 | VHIN_MACHINE, 23 | VHIN_DOMAINNAME, 24 | }; 25 | 26 | 27 | 28 | #define VCMD_virt_stat VC_CMD(VSTAT, 3, 0) 29 | 30 | struct vcmd_virt_stat_v0 { 31 | uint64_t offset; 32 | uint64_t uptime; 33 | uint32_t nr_threads; 34 | uint32_t nr_running; 35 | uint32_t nr_uninterruptible; 36 | uint32_t nr_onhold; 37 | uint32_t nr_forks; 38 | uint32_t load[3]; 39 | }; 40 | 41 | #endif /* _VX_CVIRT_CMD_H */ 42 | -------------------------------------------------------------------------------- /kernel/debug_cmd.h: -------------------------------------------------------------------------------- 1 | #ifndef _VX_DEBUG_CMD_H 2 | #define _VX_DEBUG_CMD_H 3 | 4 | 5 | /* debug commands */ 6 | 7 | #define VCMD_dump_history VC_CMD(DEBUG, 1, 0) 8 | 9 | #define VCMD_read_history VC_CMD(DEBUG, 5, 0) 10 | #define VCMD_read_monitor VC_CMD(DEBUG, 6, 0) 11 | 12 | struct vcmd_read_history_v0 { 13 | uint32_t index; 14 | uint32_t count; 15 | char *data; 16 | }; 17 | 18 | struct vcmd_read_monitor_v0 { 19 | uint32_t index; 20 | uint32_t count; 21 | char *data; 22 | }; 23 | 24 | 25 | #endif /* _VX_DEBUG_CMD_H */ 26 | -------------------------------------------------------------------------------- /kernel/device_cmd.h: -------------------------------------------------------------------------------- 1 | #ifndef _VX_DEVICE_CMD_H 2 | #define _VX_DEVICE_CMD_H 3 | 4 | 5 | /* device vserver commands */ 6 | 7 | #define VCMD_set_mapping VC_CMD(DEVICE, 1, 0) 8 | #define VCMD_unset_mapping VC_CMD(DEVICE, 2, 0) 9 | 10 | struct vcmd_set_mapping_v0 { 11 | const char *device; 12 | const char *target; 13 | uint32_t flags; 14 | }; 15 | 16 | 17 | #endif /* _VX_DEVICE_CMD_H */ 18 | -------------------------------------------------------------------------------- /kernel/dlimit_cmd.h: -------------------------------------------------------------------------------- 1 | #ifndef _VX_DLIMIT_CMD_H 2 | #define _VX_DLIMIT_CMD_H 3 | 4 | 5 | /* dlimit vserver commands */ 6 | 7 | #define VCMD_add_dlimit VC_CMD(DLIMIT, 1, 0) 8 | #define VCMD_rem_dlimit VC_CMD(DLIMIT, 2, 0) 9 | 10 | #define VCMD_set_dlimit VC_CMD(DLIMIT, 5, 0) 11 | #define VCMD_get_dlimit VC_CMD(DLIMIT, 6, 0) 12 | 13 | struct vcmd_ctx_dlimit_base_v0 { 14 | const char *name; 15 | uint32_t flags; 16 | }; 17 | 18 | struct vcmd_ctx_dlimit_v0 { 19 | const char *name; 20 | uint32_t space_used; /* used space in kbytes */ 21 | uint32_t space_total; /* maximum space in kbytes */ 22 | uint32_t inodes_used; /* used inodes */ 23 | uint32_t inodes_total; /* maximum inodes */ 24 | uint32_t reserved; /* reserved for root in % */ 25 | uint32_t flags; 26 | }; 27 | 28 | #define CDLIM_UNSET ((uint32_t)0UL) 29 | #define CDLIM_INFINITY ((uint32_t)~0UL) 30 | #define CDLIM_KEEP ((uint32_t)~1UL) 31 | 32 | #endif /* _VX_DLIMIT_CMD_H */ 33 | -------------------------------------------------------------------------------- /kernel/inode_cmd.h: -------------------------------------------------------------------------------- 1 | #ifndef _VX_INODE_CMD_H 2 | #define _VX_INODE_CMD_H 3 | 4 | 5 | /* inode vserver commands */ 6 | 7 | #define VCMD_get_iattr VC_CMD(INODE, 1, 1) 8 | #define VCMD_set_iattr VC_CMD(INODE, 2, 1) 9 | 10 | #define VCMD_fget_iattr VC_CMD(INODE, 3, 0) 11 | #define VCMD_fset_iattr VC_CMD(INODE, 4, 0) 12 | 13 | struct vcmd_ctx_iattr_v1 { 14 | const char *name; 15 | uint32_t xid; 16 | uint32_t flags; 17 | uint32_t mask; 18 | }; 19 | 20 | struct vcmd_ctx_fiattr_v0 { 21 | uint32_t xid; 22 | uint32_t flags; 23 | uint32_t mask; 24 | }; 25 | 26 | 27 | #endif /* _VX_INODE_CMD_H */ 28 | -------------------------------------------------------------------------------- /kernel/limit_cmd.h: -------------------------------------------------------------------------------- 1 | #ifndef _VX_LIMIT_CMD_H 2 | #define _VX_LIMIT_CMD_H 3 | 4 | 5 | /* rlimit vserver commands */ 6 | 7 | #define VCMD_get_rlimit VC_CMD(RLIMIT, 1, 0) 8 | #define VCMD_set_rlimit VC_CMD(RLIMIT, 2, 0) 9 | #define VCMD_get_rlimit_mask VC_CMD(RLIMIT, 3, 0) 10 | #define VCMD_reset_hits VC_CMD(RLIMIT, 7, 0) 11 | #define VCMD_reset_minmax VC_CMD(RLIMIT, 9, 0) 12 | 13 | struct vcmd_ctx_rlimit_v0 { 14 | uint32_t id; 15 | uint64_t minimum; 16 | uint64_t softlimit; 17 | uint64_t maximum; 18 | }; 19 | 20 | struct vcmd_ctx_rlimit_mask_v0 { 21 | uint32_t minimum; 22 | uint32_t softlimit; 23 | uint32_t maximum; 24 | }; 25 | 26 | #define VCMD_rlimit_stat VC_CMD(VSTAT, 1, 0) 27 | 28 | struct vcmd_rlimit_stat_v0 { 29 | uint32_t id; 30 | uint32_t hits; 31 | uint64_t value; 32 | uint64_t minimum; 33 | uint64_t maximum; 34 | }; 35 | 36 | #define CRLIM_UNSET (0ULL) 37 | #define CRLIM_INFINITY (~0ULL) 38 | #define CRLIM_KEEP (~1ULL) 39 | 40 | #endif /* _VX_LIMIT_CMD_H */ 41 | -------------------------------------------------------------------------------- /kernel/network.h: -------------------------------------------------------------------------------- 1 | #ifndef _VX_NETWORK_H 2 | #define _VX_NETWORK_H 3 | 4 | #include 5 | 6 | 7 | #define MAX_N_CONTEXT 65535 /* Arbitrary limit */ 8 | 9 | #define NB_IPV4ROOT 16 10 | 11 | 12 | /* network flags */ 13 | 14 | #define NXF_INFO_PRIVATE 0x00000008 15 | 16 | #define NXF_SINGLE_IP 0x00000100 17 | 18 | #define NXF_HIDE_NETIF 0x02000000 19 | 20 | #define NXF_STATE_SETUP (1ULL << 32) 21 | #define NXF_STATE_ADMIN (1ULL << 34) 22 | 23 | #define NXF_SC_HELPER (1ULL << 36) 24 | #define NXF_PERSISTENT (1ULL << 38) 25 | 26 | #define NXF_ONE_TIME (0x0005ULL << 32) 27 | 28 | #define NXF_INIT_SET (NXF_STATE_ADMIN) 29 | 30 | 31 | /* address types */ 32 | 33 | #define NXA_TYPE_IPV4 0x0001 34 | #define NXA_TYPE_IPV6 0x0002 35 | 36 | #define NXA_TYPE_NONE 0x0000 37 | #define NXA_TYPE_ANY 0x00FF 38 | 39 | #define NXA_TYPE_ADDR 0x0003 40 | #define NXA_TYPE_MASK 0x0013 41 | #define NXA_TYPE_RANGE 0x0023 42 | 43 | #define NXA_MOD_BCAST 0x0100 44 | #define NXA_MOD_LBACK 0x0200 45 | 46 | 47 | #else /* _VX_NETWORK_H */ 48 | #warning duplicate inclusion 49 | #endif /* _VX_NETWORK_H */ 50 | -------------------------------------------------------------------------------- /kernel/signal_cmd.h: -------------------------------------------------------------------------------- 1 | #ifndef _VX_SIGNAL_CMD_H 2 | #define _VX_SIGNAL_CMD_H 3 | 4 | 5 | /* signalling vserver commands */ 6 | 7 | #define VCMD_ctx_kill VC_CMD(PROCTRL, 1, 0) 8 | #define VCMD_wait_exit VC_CMD(EVENT, 99, 0) 9 | 10 | struct vcmd_ctx_kill_v0 { 11 | int32_t pid; 12 | int32_t sig; 13 | }; 14 | 15 | struct vcmd_wait_exit_v0 { 16 | int32_t reboot_cmd; 17 | int32_t exit_code; 18 | }; 19 | 20 | 21 | /* process alteration commands */ 22 | 23 | #define VCMD_get_pflags VC_CMD(PROCALT, 5, 0) 24 | #define VCMD_set_pflags VC_CMD(PROCALT, 6, 0) 25 | 26 | struct vcmd_pflags_v0 { 27 | uint32_t flagword; 28 | uint32_t mask; 29 | }; 30 | 31 | #endif /* _VX_SIGNAL_CMD_H */ 32 | -------------------------------------------------------------------------------- /kernel/space_cmd.h: -------------------------------------------------------------------------------- 1 | #ifndef _VX_SPACE_CMD_H 2 | #define _VX_SPACE_CMD_H 3 | 4 | 5 | #define VCMD_enter_space_v0 VC_CMD(PROCALT, 1, 0) 6 | #define VCMD_enter_space_v1 VC_CMD(PROCALT, 1, 1) 7 | #define VCMD_enter_space VC_CMD(PROCALT, 1, 2) 8 | 9 | /* XXX: This is not available in recent kernels */ 10 | #define VCMD_cleanup_namespace VC_CMD(PROCALT, 2, 0) 11 | 12 | #define VCMD_set_space_v0 VC_CMD(PROCALT, 3, 0) 13 | #define VCMD_set_space_v1 VC_CMD(PROCALT, 3, 1) 14 | #define VCMD_set_space VC_CMD(PROCALT, 3, 2) 15 | 16 | #define VCMD_get_space_mask_v0 VC_CMD(PROCALT, 4, 0) 17 | 18 | #define VCMD_get_space_mask VC_CMD(VSPACE, 0, 1) 19 | #define VCMD_get_space_default VC_CMD(VSPACE, 1, 0) 20 | 21 | 22 | struct vcmd_space_mask_v1 { 23 | uint64_t mask; 24 | }; 25 | 26 | struct vcmd_space_mask_v2 { 27 | uint64_t mask; 28 | uint32_t index; 29 | }; 30 | 31 | 32 | #endif /* _VX_SPACE_CMD_H */ 33 | -------------------------------------------------------------------------------- /kernel/tag_cmd.h: -------------------------------------------------------------------------------- 1 | #ifndef _VX_TAG_CMD_H 2 | #define _VX_TAG_CMD_H 3 | 4 | 5 | /* vinfo commands */ 6 | 7 | #define VCMD_task_tag VC_CMD(VINFO, 3, 0) 8 | 9 | 10 | /* context commands */ 11 | 12 | #define VCMD_tag_migrate VC_CMD(TAGMIG, 1, 0) 13 | 14 | #endif /* _VX_TAG_CMD_H */ 15 | -------------------------------------------------------------------------------- /lib/.gitignore: -------------------------------------------------------------------------------- 1 | *.la 2 | *.lo 3 | .buexcl 4 | .deps 5 | .dirstamp 6 | .libs 7 | util-vserver.pc 8 | *.a 9 | -------------------------------------------------------------------------------- /lib/apidoc/.gitignore: -------------------------------------------------------------------------------- 1 | .apidoc 2 | Doxyfile 3 | html 4 | latex 5 | man 6 | -------------------------------------------------------------------------------- /lib/apidoc/list2xxx.descr: -------------------------------------------------------------------------------- 1 | When the \c `~' prefix is used, the bits will be unset, and the \c `^' 2 | prefix specifies a bitnumber instead of a bitmask. A `~' after another 3 | `~' will cancel both ones. The special values for \c NAME will be 4 | recognized case insensitively. 5 | -------------------------------------------------------------------------------- /lib/apidoc/list2xxx.syntax: -------------------------------------------------------------------------------- 1 | LIST <- ELEM | ELEM ',' LIST 2 | ELEM <- '~' ELEM | MASK | NAME 3 | MASK <- NUMBER | '^' NUMBER 4 | NUMBER <- 0[0-7]* | [1-9][0-9]* | 0x[0-9,a-f]+ 5 | NAME <- | "all" | "any" | "none" 6 | -------------------------------------------------------------------------------- /lib/createskeleton-short.hc: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | #include 19 | #include 20 | 21 | static inline int 22 | vc_createSkeleton_short(char const *id, int flags) 23 | { 24 | size_t l = strlen(id); 25 | char buf[sizeof(CONFDIR "/") + l]; 26 | 27 | memcpy(buf, CONFDIR "/", sizeof(CONFDIR "/")-1); 28 | memcpy(buf+sizeof(CONFDIR "/")-1, id, l+1); 29 | 30 | return vc_createSkeleton_full(buf, id, flags); 31 | } 32 | -------------------------------------------------------------------------------- /lib/ext2fs.h: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2003 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifndef H_UTIL_VSERVER_SRC_EXT2FS_H 20 | #define H_UTIL_VSERVER_SRC_EXT2FS_H 21 | 22 | #ifdef ENSC_HAVE_EXT2FS_EXT2_FS_H 23 | # include 24 | #elif defined(ENSC_HAVE_LINUX_EXT2_FS_H) 25 | # include 26 | #else 27 | # error Do not know how to include 28 | #endif 29 | 30 | #endif // H_UTIL_VSERVER_SRC_EXT2FS_H 31 | -------------------------------------------------------------------------------- /lib/fmt.h: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifndef H_UTIL_VSERVER_LIB_FMT_H 20 | #define H_UTIL_VSERVER_LIB_FMT_H 21 | 22 | #include "../ensc_fmt/fmt.h" 23 | 24 | #endif // H_UTIL_VSERVER_LIB_FMT_H 25 | -------------------------------------------------------------------------------- /lib/getnbipv4root.c: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #include "vserver.h" 24 | #include "virtual.h" 25 | 26 | size_t 27 | vc_get_nb_ipv4root() 28 | { 29 | return NB_IPV4ROOT; 30 | } 31 | -------------------------------------------------------------------------------- /lib/getversion.c: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c++ -*-- 2 | 3 | // Copyright (C) 2003 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #include "vserver-internal.h" 24 | #include "getversion-internal.hc" 25 | 26 | int 27 | vc_get_version() 28 | { 29 | return vc_get_version_internal(VC_CAT_COMPAT); 30 | } 31 | -------------------------------------------------------------------------------- /lib/ioctl-setfilecontext.hc: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #include "vserver.h" 24 | #include "ext2fs.h" 25 | 26 | #include 27 | 28 | static inline ALWAYSINLINE int 29 | vc_X_set_filecontext(int fd, xid_t ctx) 30 | { 31 | int c = ctx; 32 | int rc = ioctl(fd, EXT2_IOC_SETCONTEXT, &c); 33 | 34 | ENSC_FIX_IOCTL(rc); 35 | 36 | return rc; 37 | } 38 | -------------------------------------------------------------------------------- /lib/isdynamicxid.c: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #include "vserver.h" 24 | #include "virtual.h" 25 | 26 | bool 27 | vc_is_dynamic_xid(xid_t xid) 28 | { 29 | return vc_getXIDType(xid) == vcTYPE_DYNAMIC; 30 | } 31 | -------------------------------------------------------------------------------- /lib/islink.c: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #include "internal.h" 24 | 25 | #include 26 | #include 27 | #include 28 | 29 | bool 30 | utilvserver_isLink(char const *path) 31 | { 32 | struct stat st; 33 | if (lstat(path, &st)==-1) return false; 34 | 35 | return S_ISLNK(st.st_mode); 36 | } 37 | -------------------------------------------------------------------------------- /lib/libvserver.ver: -------------------------------------------------------------------------------- 1 | VSERVER_0_30_215 { 2 | global: *; 3 | }; 4 | 5 | VSERVER_0_30_216 { 6 | } VSERVER_0_30_215; 7 | -------------------------------------------------------------------------------- /lib/listparser_uint32.c: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #include "internal.h" 24 | #include "listparser.hc" 25 | 26 | LISTPARSER(uint_least32_t, uint32) 27 | -------------------------------------------------------------------------------- /lib/listparser_uint64.c: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #include "internal.h" 24 | #include "listparser.hc" 25 | 26 | LISTPARSER(uint_least64_t, uint64) 27 | -------------------------------------------------------------------------------- /lib/syscall-alternative.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linux-vserver/util-vserver/c0e9636939d3fe05745cdf27cdec9d1669c89a8b/lib/syscall-alternative.h -------------------------------------------------------------------------------- /lib/syscall-syscall.c: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #include "vserver-internal.h" 24 | 25 | #if 0 26 | int 27 | vc_syscall(uint32_t cmd, xid_t xid, void *data) __attribute__((__alias__("vserver"))); 28 | #else 29 | int 30 | vc_syscall(uint32_t cmd, xid_t xid, void *data) 31 | { 32 | return vserver(cmd, xid, data); 33 | } 34 | #endif 35 | -------------------------------------------------------------------------------- /lib/syscall_cleanupnamespace-v13.hc: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #include "vserver.h" 24 | 25 | static inline ALWAYSINLINE int 26 | vc_cleanup_namespace_v13(int UNUSED tmp) 27 | { 28 | return vserver(VCMD_cleanup_namespace, 0, 0); 29 | } 30 | -------------------------------------------------------------------------------- /lib/syscall_cleanupnamespace.c: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c++ -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #include "vserver.h" 24 | #include "virtual.h" 25 | 26 | #include "vserver-internal.h" 27 | 28 | #ifdef VC_ENABLE_API_V13 29 | # include "syscall_cleanupnamespace-v13.hc" 30 | #endif 31 | 32 | int 33 | vc_cleanup_namespace() 34 | { 35 | CALL_VC(CALL_VC_V13(vc_cleanup_namespace,0)); 36 | } 37 | -------------------------------------------------------------------------------- /lib/syscall_ctxmigrate-v13.hc: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | static inline ALWAYSINLINE int 24 | vc_ctx_migrate_v13(xid_t xid) 25 | { 26 | return vserver(VCMD_ctx_migrate_v0, CTX_USER2KERNEL(xid), NULL); 27 | } 28 | -------------------------------------------------------------------------------- /lib/syscall_ctxmigrate-v21.hc: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // Copyright (C) 2006 Daniel Hokka Zakrisson 5 | // 6 | // This program is free software; you can redistribute it and/or modify 7 | // it under the terms of the GNU General Public License as published by 8 | // the Free Software Foundation; version 2 of the License. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU General Public License 16 | // along with this program; if not, write to the Free Software 17 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | 20 | #ifdef HAVE_CONFIG_H 21 | # include 22 | #endif 23 | 24 | static inline ALWAYSINLINE int 25 | vc_ctx_migrate_spaces(xid_t xid, uint_least64_t flags) 26 | { 27 | struct vcmd_ctx_migrate data = { .flagword = flags }; 28 | 29 | return vserver(VCMD_ctx_migrate_v1, CTX_USER2KERNEL(xid), &data); 30 | } 31 | -------------------------------------------------------------------------------- /lib/syscall_fsetiattr-v22.hc: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c++ -*-- 2 | 3 | // Copyright (C) 2007 Daniel Hokka Zakrisson 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | static inline ALWAYSINLINE int 24 | vc_fset_iattr_v22(int fd, xid_t ctx, uint_least32_t flags, 25 | uint_least32_t mask) 26 | { 27 | struct vcmd_ctx_fiattr_v0 data = { 28 | .xid = ctx, 29 | .flags = flags, 30 | .mask = mask 31 | }; 32 | 33 | return vserver(VCMD_fset_iattr, fd, &data); 34 | } 35 | -------------------------------------------------------------------------------- /lib/syscall_getbadness-v23.hc: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c++ -*-- 2 | 3 | // Copyright (C) 2007 Daniel Hokka Zakrisson 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | static inline ALWAYSINLINE int 24 | vc_get_badness_v23(xid_t xid, int64_t *badness) 25 | { 26 | struct vcmd_badness_v0 data; 27 | int ret; 28 | ret = vserver(VCMD_get_badness, xid, &data); 29 | if (ret) 30 | return ret; 31 | *badness = data.bias; 32 | return 0; 33 | } 34 | -------------------------------------------------------------------------------- /lib/syscall_getncaps-net.hc: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | static inline ALWAYSINLINE int 24 | vc_get_ncaps_net(nid_t nid, struct vc_net_caps *caps) 25 | { 26 | struct vcmd_net_caps_v0 k_caps; 27 | int res; 28 | 29 | res = vserver(VCMD_get_ncaps, NID_USER2KERNEL(nid), &k_caps); 30 | caps->ncaps = k_caps.ncaps; 31 | caps->cmask = k_caps.cmask; 32 | 33 | return res; 34 | } 35 | -------------------------------------------------------------------------------- /lib/syscall_getnxinfo-net.hc: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | static inline ALWAYSINLINE int 24 | vc_get_nx_info_net(nid_t nid, struct vc_nx_info *info) 25 | { 26 | struct vcmd_nx_info_v0 res; 27 | int rc; 28 | 29 | rc = vserver(VCMD_nx_info, NID_USER2KERNEL(nid), &res); 30 | if (rc==-1) return -1; 31 | 32 | info->nid = NID_KERNEL2USER(res.nid); 33 | return rc; 34 | } 35 | -------------------------------------------------------------------------------- /lib/syscall_getsched.c: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2007 Daniel Hokka Zakrisson 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #include "vserver.h" 24 | #include "vserver-internal.h" 25 | #include "virtual.h" 26 | 27 | #if defined(VC_ENABLE_API_V21) 28 | # include "syscall_getsched-v21.hc" 29 | #endif 30 | 31 | #if defined(VC_ENABLE_API_V21) 32 | int 33 | vc_get_sched(xid_t xid, struct vc_set_sched *sched) 34 | { 35 | CALL_VC(CALL_VC_V21(vc_get_sched, xid, sched)); 36 | } 37 | #endif 38 | -------------------------------------------------------------------------------- /lib/syscall_getspacedefault-v23.hc: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2008 Daniel Hokka Zakrisson 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | static inline ALWAYSINLINE uint_least64_t 24 | vc_get_space_default_v23(int UNUSED tmp) 25 | { 26 | struct vcmd_space_mask_v1 data = { .mask = 0 }; 27 | int ret = vserver(VCMD_get_space_default, 0, &data); 28 | if (ret) 29 | return ret; 30 | return data.mask & ~(CLONE_NEWNS|CLONE_FS); 31 | } 32 | -------------------------------------------------------------------------------- /lib/syscall_getspacedefault.c: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2008 Daniel Hokka Zakrisson 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #include "vserver.h" 24 | #include "vserver-internal.h" 25 | #include "virtual.h" 26 | 27 | #if defined(VC_ENABLE_API_V23) 28 | # include "syscall_getspacedefault-v23.hc" 29 | #endif 30 | 31 | #if defined(VC_ENABLE_API_V23) 32 | uint_least64_t 33 | vc_get_space_default() 34 | { 35 | CALL_VC(CALL_VC_V23P(vc_get_space_default, 0)); 36 | } 37 | #endif 38 | -------------------------------------------------------------------------------- /lib/syscall_gettasknid-net.hc: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | static inline ALWAYSINLINE nid_t 24 | vc_get_task_nid_net(pid_t pid) 25 | { 26 | nid_t res=vserver(VCMD_task_nid, pid, 0); 27 | return NID_KERNEL2USER(res); 28 | } 29 | -------------------------------------------------------------------------------- /lib/syscall_gettasknid.c: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #include "vserver.h" 24 | #include "virtual.h" 25 | #include "vserver-internal.h" 26 | 27 | #ifdef VC_ENABLE_API_NET 28 | # include "syscall_gettasknid-net.hc" 29 | #endif 30 | 31 | #ifdef VC_ENABLE_API_NET 32 | nid_t 33 | vc_get_task_nid(pid_t pid) 34 | { 35 | CALL_VC(CALL_VC_NET(vc_get_task_nid, pid)); 36 | } 37 | #endif 38 | -------------------------------------------------------------------------------- /lib/syscall_gettaskxid-v13.hc: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | static inline ALWAYSINLINE xid_t 24 | vc_get_task_xid_v13(pid_t pid) 25 | { 26 | xid_t res=vserver(VCMD_task_xid, pid, 0); 27 | return CTX_KERNEL2USER(res); 28 | } 29 | -------------------------------------------------------------------------------- /lib/syscall_getumask-v23.hc: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2011 Asbjorn Sannes 2 | // 3 | // This program is free software; you can redistribute it and/or modify 4 | // it under the terms of the GNU General Public License as published by 5 | // the Free Software Foundation; version 2 of the License. 6 | // 7 | // This program is distributed in the hope that it will be useful, 8 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | // GNU General Public License for more details. 11 | // 12 | // You should have received a copy of the GNU General Public License 13 | // along with this program; if not, write to the Free Software 14 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 15 | 16 | #ifdef HAVE_CONFIG_H 17 | # include 18 | #endif 19 | 20 | static inline ALWAYSINLINE int 21 | vc_get_umask_v23(xid_t xid, struct vc_umask *umask) 22 | { 23 | int res; 24 | struct vcmd_umask data; 25 | res = vserver(VCMD_get_umask, CTX_USER2KERNEL(xid), &data); 26 | umask->umask = data.umask; 27 | umask->mask = data.mask; 28 | return res; 29 | } 30 | -------------------------------------------------------------------------------- /lib/syscall_getvci-v21.hc: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c++ -*-- 2 | 3 | // Copyright (C) 2006 Daniel Hokka Zakrisson 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | static inline ALWAYSINLINE vc_vci_t 24 | vc_get_vci_v21(int UNUSED tmp) 25 | { 26 | return vserver(VCMD_get_vci, 0, 0); 27 | } 28 | -------------------------------------------------------------------------------- /lib/syscall_getvci.c: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c++ -*-- 2 | 3 | // Copyright (C) 2006 Daniel Hokka Zakrisson 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #include "vserver.h" 24 | #include "vserver-internal.h" 25 | #include "virtual.h" 26 | 27 | #if defined(VC_ENABLE_API_V21) 28 | # include "syscall_getvci-v21.hc" 29 | #endif 30 | 31 | #if defined(VC_ENABLE_API_V21) 32 | 33 | vc_vci_t 34 | vc_get_vci() 35 | { 36 | CALL_VC(CALL_VC_V21(vc_get_vci, 0)); 37 | } 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /lib/syscall_getvxinfo-oldproc.hc: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | static inline ALWAYSINLINE int 24 | vc_get_vx_info_oldproc(xid_t UNUSED xid, struct vc_vx_info UNUSED *info) 25 | { 26 | // TODO: ??? 27 | errno = ENOSYS; 28 | return -1; 29 | } 30 | -------------------------------------------------------------------------------- /lib/syscall_kill-v11.hc: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c++ -*-- 2 | 3 | // Copyright (C) 2003 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | static inline ALWAYSINLINE int 24 | vc_ctx_kill_v11(xid_t ctx, pid_t pid, int sig) 25 | { 26 | struct vcmd_ctx_kill_v0 param = { .pid = 0 }; 27 | param.pid = pid; 28 | param.sig = sig; 29 | 30 | return vserver(VCMD_ctx_kill, CTX_USER2KERNEL(ctx), ¶m); 31 | } 32 | -------------------------------------------------------------------------------- /lib/syscall_netcreate-net.hc: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | static inline ALWAYSINLINE nid_t 24 | vc_net_create_net(nid_t nid) 25 | { 26 | nid_t res = vserver(VCMD_net_create, NID_USER2KERNEL(nid), 0); 27 | 28 | return NID_KERNEL2USER(res); 29 | } 30 | -------------------------------------------------------------------------------- /lib/syscall_netmigrate-net.hc: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | static inline ALWAYSINLINE int 24 | vc_net_migrate_net(nid_t nid) 25 | { 26 | return vserver(VCMD_net_migrate, NID_USER2KERNEL(nid), 0); 27 | } 28 | -------------------------------------------------------------------------------- /lib/syscall_resetminmax-v21.hc: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c++ -*-- 2 | 3 | // Copyright (C) 2006 Daniel Hokka Zakrisson 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | static inline ALWAYSINLINE int 24 | vc_reset_minmax_v21(xid_t ctx) 25 | { 26 | return vserver(VCMD_reset_minmax, CTX_USER2KERNEL(ctx), 0); 27 | } 28 | -------------------------------------------------------------------------------- /lib/syscall_setbadness-v23.hc: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c++ -*-- 2 | 3 | // Copyright (C) 2007 Daniel Hokka Zakrisson 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | static inline ALWAYSINLINE int 24 | vc_set_badness_v23(xid_t xid, int64_t badness) 25 | { 26 | struct vcmd_badness_v0 data = { 27 | .bias = badness, 28 | }; 29 | return vserver(VCMD_set_badness, xid, &data); 30 | } 31 | -------------------------------------------------------------------------------- /lib/syscall_setncaps-net.hc: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | static inline ALWAYSINLINE int 24 | vc_set_ncaps_net(nid_t nid, struct vc_net_caps const *caps) 25 | { 26 | struct vcmd_net_caps_v0 k_caps; 27 | 28 | k_caps.ncaps = caps->ncaps; 29 | k_caps.cmask = caps->cmask; 30 | 31 | return vserver(VCMD_set_ncaps, NID_USER2KERNEL(nid), &k_caps); 32 | } 33 | -------------------------------------------------------------------------------- /lib/syscall_setumask-v23.hc: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2011 Asbjorn Sannes 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | #ifdef HAVE_CONFIG_H 19 | # include 20 | #endif 21 | 22 | static inline ALWAYSINLINE int 23 | vc_set_umask_v23(xid_t xid, struct vc_umask const *umask) 24 | { 25 | struct vcmd_umask data = { 26 | .umask = umask->umask, 27 | .mask = umask->mask, 28 | }; 29 | return vserver(VCMD_set_umask, CTX_USER2KERNEL(xid), &data); 30 | } 31 | -------------------------------------------------------------------------------- /lib/syscall_tagcreate.c: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c++ -*-- 2 | 3 | // Copyright (C) 2007 Daniel Hokka Zakrisson 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #include "vserver.h" 24 | #include "virtual.h" 25 | #include "vserver-internal.h" 26 | 27 | #if defined(VC_ENABLE_API_V23) 28 | # include "syscall_tagmigrate-v23.hc" 29 | #endif 30 | 31 | #if defined(VC_ENABLE_API_V23) 32 | 33 | int 34 | vc_tag_create(tag_t tag) 35 | { 36 | CALL_VC(CALL_VC_TAG(vc_tag_migrate, tag)); 37 | } 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /lib/syscall_tagmigrate-v23.hc: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c++ -*-- 2 | 3 | // Copyright (C) 2007 Daniel Hokka Zakrisson 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | static inline ALWAYSINLINE int 24 | vc_tag_migrate_tag(tag_t tag) 25 | { 26 | tag_t res = vserver(VCMD_tag_migrate, TAG_USER2KERNEL(tag), NULL); 27 | return TAG_KERNEL2USER(res); 28 | } 29 | -------------------------------------------------------------------------------- /lib/syscall_tagmigrate.c: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c++ -*-- 2 | 3 | // Copyright (C) 2007 Daniel Hokka Zakrisson 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #include "vserver.h" 24 | #include "virtual.h" 25 | #include "vserver-internal.h" 26 | 27 | #if defined(VC_ENABLE_API_V23) 28 | # include "syscall_tagmigrate-v23.hc" 29 | #endif 30 | 31 | #if defined(VC_ENABLE_API_V23) 32 | 33 | int 34 | vc_tag_migrate(tag_t tag) 35 | { 36 | CALL_VC(CALL_VC_TAG(vc_tag_migrate, tag)); 37 | } 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /lib/syscall_tasktag-v23.hc: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c++ -*-- 2 | 3 | // Copyright (C) 2007 Daniel Hokka Zakrisson 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | static inline ALWAYSINLINE tag_t 24 | vc_get_task_tag_tag(pid_t pid) 25 | { 26 | return vserver(VCMD_task_tag, pid, NULL); 27 | } 28 | -------------------------------------------------------------------------------- /lib/syscall_tasktag.c: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c++ -*-- 2 | 3 | // Copyright (C) 2007 Daniel Hokka Zakrisson 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #include "vserver.h" 24 | #include "virtual.h" 25 | #include "vserver-internal.h" 26 | 27 | #if defined(VC_ENABLE_API_V23) 28 | # include "syscall_tasktag-v23.hc" 29 | #endif 30 | 31 | #if defined(VC_ENABLE_API_V23) 32 | 33 | tag_t 34 | vc_get_task_tag(pid_t pid) 35 | { 36 | CALL_VC(CALL_VC_TAG(vc_get_task_tag, pid)); 37 | } 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /lib/syscall_waitexit-v13.hc: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c++ -*-- 2 | 3 | // Copyright (C) 2003 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | static inline ALWAYSINLINE int 24 | vc_wait_exit_v13b(xid_t ctx) 25 | { 26 | struct vcmd_wait_exit_v0 param = { .reboot_cmd = 0, .exit_code = 0 }; 27 | 28 | return vserver(VCMD_wait_exit, CTX_USER2KERNEL(ctx), ¶m); 29 | } 30 | -------------------------------------------------------------------------------- /lib/testsuite/.gitignore: -------------------------------------------------------------------------------- 1 | .deps 2 | .dirstamp 3 | .gdb_history 4 | .libs 5 | cflags 6 | flags 7 | fmt 8 | parselimit 9 | personality 10 | -------------------------------------------------------------------------------- /lib/util-vserver.pc.subst: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: @PACKAGE@ 7 | Description: vserver libraries 8 | Version: @VERSION@ 9 | Requires: 10 | Libs: @libflags@-lvserver 11 | Cflags: @incflags@ 12 | -------------------------------------------------------------------------------- /lib/val2text-t2v-uint32.c: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #include "internal.h" 24 | #include "val2text.hc" 25 | 26 | TEXT2VAL(uint_least32_t, uint32) 27 | -------------------------------------------------------------------------------- /lib/val2text-t2v-uint64.c: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #include "internal.h" 24 | #include "val2text.hc" 25 | 26 | TEXT2VAL(uint_least64_t, uint64) 27 | -------------------------------------------------------------------------------- /lib/val2text-v2t-uint32.c: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #include "internal.h" 24 | #include "val2text.hc" 25 | 26 | VAL2TEXT(uint_least32_t, uint32) 27 | -------------------------------------------------------------------------------- /lib/val2text-v2t-uint64.c: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #include "internal.h" 24 | #include "val2text.hc" 25 | 26 | VAL2TEXT(uint_least64_t, uint64) 27 | -------------------------------------------------------------------------------- /lib_internal/.gitignore: -------------------------------------------------------------------------------- 1 | .deps 2 | .dirstamp 3 | *.a 4 | -------------------------------------------------------------------------------- /lib_internal/command-free.c: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #include "command.h" 24 | 25 | void 26 | Command_free(struct Command *cmd) 27 | { 28 | if (cmd->params_style_==parVEC) 29 | Vector_free(&cmd->params.v); 30 | } 31 | -------------------------------------------------------------------------------- /lib_internal/command-init.c: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #include "command.h" 24 | 25 | void 26 | Command_init(struct Command *cmd) 27 | { 28 | cmd->filename = 0; 29 | cmd->pid = -1; 30 | cmd->rc = -1; 31 | cmd->err = 0; 32 | cmd->params_style_ = parNONE; 33 | } 34 | -------------------------------------------------------------------------------- /lib_internal/command-reset.c: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #include "command.h" 24 | 25 | void 26 | Command_reset(struct Command *cmd) 27 | { 28 | cmd->pid = -1; 29 | cmd->rc = -1; 30 | cmd->err = 0; 31 | } 32 | -------------------------------------------------------------------------------- /lib_internal/jail.h: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifndef H_UTIL_VSERVER_LIB_INTERNAL_JAIL_H 20 | #define H_UTIL_VSERVER_LIB_INTERNAL_JAIL_H 21 | 22 | #include 23 | 24 | bool jailIntoTempDir(char const **err_pos); 25 | 26 | #endif // H_UTIL_VSERVER_LIB_INTERNAL_JAIL_H 27 | -------------------------------------------------------------------------------- /lib_internal/matchlist-destroy.c: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #include "matchlist.h" 24 | 25 | void 26 | MatchList_destroy(struct MatchList *list) 27 | { 28 | size_t i; 29 | 30 | String_free(&list->id); 31 | free(list->data); 32 | 33 | for (i=0; ibuf_count; ++i) 34 | free((void *)(list->buf[i])); 35 | 36 | free(list->buf); 37 | } 38 | -------------------------------------------------------------------------------- /lib_internal/matchvserverinfo-free.c: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2005 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #include "matchlist.h" 24 | #include "util.h" 25 | 26 | void 27 | MatchVserverInfo_free(struct MatchVserverInfo *info) 28 | { 29 | String_free(&info->vdir); 30 | String_free(&info->appdir); 31 | } 32 | -------------------------------------------------------------------------------- /lib_internal/testsuite/.gitignore: -------------------------------------------------------------------------------- 1 | .deps 2 | .dirstamp 3 | .libs 4 | .libs 5 | .nfs0* 6 | command 7 | copy 8 | filecfg-ml 9 | isnumber 10 | isnumber-gnu 11 | sigbus 12 | sigbus-gnu 13 | matchlist 14 | matchlist-gnu 15 | -------------------------------------------------------------------------------- /lib_internal/util-debug.h: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifndef H_UTIL_VSERVER_LIB_INTERNAL_UTIL_DEBUG_H 20 | #define H_UTIL_VSERVER_LIB_INTERNAL_UTIL_DEBUG_H 21 | 22 | #ifdef ENSC_ENABLE_DPRINTF 23 | # include 24 | # define DPRINTF(FMT,...) printf(FMT, __VA_ARGS__) 25 | #else 26 | # define DPRINTF(FMT,...) do {} while(0) 27 | #endif 28 | 29 | 30 | #endif // H_UTIL_VSERVER_LIB_INTERNAL_UTIL_DEBUG_H 31 | -------------------------------------------------------------------------------- /lib_internal/util-declarecmd.h: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifndef H_UTILVSERVER_LIB_INTERNAL_UTIL_DECLARECMD_H 20 | #define H_UTILVSERVER_LIB_INTERNAL_UTIL_DECLARECMD_H 21 | 22 | #define VSERVER_DECLARE_CMD(CMD) \ 23 | char buf[strlen(CMD)+1]; \ 24 | memcpy(buf, (CMD), strlen(CMD)+1); \ 25 | CMD = basename(buf); 26 | 27 | #endif // H_UTILVSERVER_LIB_INTERNAL_UTIL_DECLARECMD_H 28 | -------------------------------------------------------------------------------- /lib_internal/util-dimof.h: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifndef H_UTILVSERVER_LIB_INTERNAL_UTIL_DIMOF_H 20 | #define H_UTILVSERVER_LIB_INTERNAL_UTIL_DIMOF_H 21 | 22 | #define DIM_OF(X) (sizeof(X)/sizeof((X)[0])) 23 | 24 | #endif // H_UTILVSERVER_LIB_INTERNAL_UTIL_DIMOF_H 25 | -------------------------------------------------------------------------------- /lib_internal/util-dotfile.h: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifndef H_UTIL_VSERVER_LIB_INTERNAL_UTIL_DOTFILE_H 20 | #define H_UTIL_VSERVER_LIB_INTERNAL_UTIL_DOTFILE_H 21 | 22 | #include 23 | 24 | static inline UNUSED ALWAYSINLINE bool 25 | isDotfile(char const *d) 26 | { 27 | return d[0]=='.' && (d[1]=='\0' || (d[1]=='.' && d[2]=='\0')); 28 | } 29 | 30 | #endif // H_UTIL_VSERVER_LIB_INTERNAL_UTIL_DOTFILE_H 31 | -------------------------------------------------------------------------------- /lib_internal/util-lockfile.h: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifndef H_UTIL_VSERVER_LIB_INTERNAL_UTIL_LOCKFILE_H 20 | #define H_UTIL_VSERVER_LIB_INTERNAL_UTIL_LOCKFILE_H 21 | 22 | #include 23 | 24 | struct ErrorInformation; 25 | 26 | bool lockfile(int *fd, char const *filename, int op, 27 | long timeout, 28 | struct ErrorInformation *err); 29 | 30 | #endif // H_UTIL_VSERVER_LIB_INTERNAL_UTIL_LOCKFILE_H 31 | -------------------------------------------------------------------------------- /lib_internal/util-mem.h: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifndef H_UTIL_VSERVER_LIB_INTERNAL_UTIL_MEM_H 20 | #define H_UTIL_VSERVER_LIB_INTERNAL_UTIL_MEM_H 21 | 22 | #include 23 | #include 24 | 25 | inline static void * 26 | Xmemcpy(void * restrict dst, void const * restrict src, size_t len) 27 | { 28 | return (char *)(memcpy(dst, src, len))+len; 29 | } 30 | 31 | #endif // H_UTIL_VSERVER_LIB_INTERNAL_UTIL_MEM_H 32 | -------------------------------------------------------------------------------- /m4/changelog.am: -------------------------------------------------------------------------------- 1 | ## $Id$ ---*- makefile -*--- 2 | 3 | ## Copyright (C) 2002 Enrico Scholz 4 | ## 5 | ## This program is free software; you can redistribute it and/or modify 6 | ## it under the terms of the GNU General Public License as published by 7 | ## the Free Software Foundation; version 2 of the License. 8 | ## 9 | ## This program is distributed in the hope that it will be useful, 10 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | ## GNU General Public License for more details. 13 | ## 14 | ## You should have received a copy of the GNU General Public License 15 | ## along with this program; if not, write to the Free Software 16 | ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | ## 18 | 19 | ChangeLog.sed: 20 | test "$(srcdir)" != "." 21 | 22 | if HAVE_GIT2CL 23 | ChangeLog: Makefile 24 | if test "$(srcdir)" = "." -a -d .git; then \ 25 | $(GIT2CL) > $@; \ 26 | fi 27 | endif 28 | 29 | .PHONY: ChangeLog 30 | -------------------------------------------------------------------------------- /m4/ensc_changelog.m4: -------------------------------------------------------------------------------- 1 | dnl $Id$ 2 | 3 | dnl Copyright (C) 2002, 2003, 2009 4 | dnl Enrico Scholz 5 | dnl 6 | dnl This program is free software; you can redistribute it and/or modify 7 | dnl it under the terms of the GNU General Public License as published by 8 | dnl the Free Software Foundation; version 2 and/or 3 of the License. 9 | dnl 10 | dnl This program is distributed in the hope that it will be useful, 11 | dnl but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | dnl GNU General Public License for more details. 14 | dnl 15 | dnl You should have received a copy of the GNU General Public License 16 | dnl along with this program; if not, write to the Free Software 17 | dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | dnl Usage: ENSC_CHANGELOG() 20 | 21 | AC_DEFUN([ENSC_CHANGELOG], 22 | [ 23 | AC_CHECK_PROGS(GIT2CL, [git2cl]) 24 | AM_CONDITIONAL(HAVE_GIT2CL, [test x"$GIT2CL" != x]) 25 | ]) 26 | -------------------------------------------------------------------------------- /m4/gpgsig.am: -------------------------------------------------------------------------------- 1 | ## $Id$ 2 | 3 | ## Copyright (C) 2002, 2004, 2009 4 | ## Enrico Scholz 5 | ## 6 | ## This program is free software; you can redistribute it and/or modify 7 | ## it under the terms of the GNU General Public License as published by 8 | ## the Free Software Foundation; version 2 and/or 3 of the License. 9 | ## 10 | ## This program is distributed in the hope that it will be useful, 11 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ## GNU General Public License for more details. 14 | ## 15 | ## You should have received a copy of the GNU General Public License 16 | ## along with this program; if not, write to the Free Software 17 | ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | gpgsig: 20 | gpgkey=$(GPG_KEY); \ 21 | gpg $${gpgkey:+--default-key "$$gpgkey"} --armor --detach-sign $(distdir).tar.xz 22 | -------------------------------------------------------------------------------- /m4/validate.am: -------------------------------------------------------------------------------- 1 | ## $Id$ ---*- makefile -*--- 2 | 3 | ## Copyright (C) 2002, 2003, 2004, 2009 4 | ## Enrico Scholz 5 | ## 6 | ## This program is free software; you can redistribute it and/or modify 7 | ## it under the terms of the GNU General Public License as published by 8 | ## the Free Software Foundation; version 2 and/or 3 of the License. 9 | ## 10 | ## This program is distributed in the hope that it will be useful, 11 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ## GNU General Public License for more details. 14 | ## 15 | ## You should have received a copy of the GNU General Public License 16 | ## along with this program; if not, write to the Free Software 17 | ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | ## 19 | 20 | $(BUILT_SOURCES) config.h: .X$(subst /,_,$(sysconfdir))-up-to-date 21 | 22 | distclean-local: distclean-uptodate 23 | 24 | distclean-uptodate: 25 | @rm -f .*-up-to-date 26 | 27 | .%-up-to-date: 28 | @rm -f .*-up-to-date 29 | @$(MAKE) -s clean 30 | @touch -t 197001020000 '$@' 31 | @$(MAKE) -s $(BUILT_SOURCES) 32 | -------------------------------------------------------------------------------- /man/vps.8: -------------------------------------------------------------------------------- 1 | .TH "vps" "8" "0.1.0" "Klavs Klavsen " "System Administration" 2 | .SH "NAME" 3 | .LP 4 | vps \- The vps utility is simply a wrapper for the ps program. 5 | .SH "SYNTAX" 6 | .LP 7 | vps [\fIoptions\fP] 8 | 9 | .SH "DESCRIPTION" 10 | .LP 11 | vps \- The vps utility is simply a wrapper for the ps program, that enables ps to show you the all the processes on the system, instead of only the ones in the current s_context (see cat /proc/self/status). 12 | .SH "OPTIONS" 13 | .LP 14 | .TP 15 | See man ps. 16 | .SH "FILES" 17 | .LP 18 | \fI/usr/sbin/vps\fP 19 | 20 | 21 | .SH "EXAMPLES" 22 | .LP 23 | Please contribute some, if you feel it's important. 24 | .SH "AUTHORS" 25 | .LP 26 | This Man page was written by Klavs Klavsen and based upon the helpful output from the program itself and the documentation on the Virtual Server site 27 | .SH "SEE ALSO" 28 | .LP 29 | chcontext(8) rebootmgr(8) reducecap(8) 30 | chbind(8) vpstree(8) vrpm(8) vserver(8) 31 | vserver\-stat(8) vtop(8) 32 | -------------------------------------------------------------------------------- /man/vpstree.8: -------------------------------------------------------------------------------- 1 | .TH "vpstree" "8" "0.1.0" "Klavs Klavsen " "System Administration" 2 | .SH "NAME" 3 | .LP 4 | vpstree \- The vpstree utility is simply a wrapper for the pstree program. 5 | .SH "SYNTAX" 6 | .LP 7 | vpstree [\fIoptions\fP] 8 | 9 | .SH "DESCRIPTION" 10 | .LP 11 | vpstree \- The vpstree utility is simply a wrapper for the pstree program, that enables pstree to show you the all the processes on the system, instead of only the ones in the current s_context (see cat /proc/self/status). 12 | .SH "OPTIONS" 13 | .LP 14 | .TP 15 | See man pstree. 16 | .SH "FILES" 17 | .LP 18 | \fI/usr/sbin/vpstree\fP 19 | 20 | 21 | .SH "EXAMPLES" 22 | .LP 23 | Please contribute some, if you feel it's important. 24 | .SH "AUTHORS" 25 | .LP 26 | This Man page was written by Klavs Klavsen and based upon the helpful output from the program itself and the documentation on the Virtual Server site 27 | .SH "SEE ALSO" 28 | .LP 29 | chcontext(8) rebootmgr(8) reducecap(8) 30 | chbind(8) vps(8) vrpm(8) vserver(8) 31 | vserver\-stat(8) vtop(8) 32 | -------------------------------------------------------------------------------- /man/vtop.8: -------------------------------------------------------------------------------- 1 | .TH "vtop" "8" "0.1.0" "Klavs Klavsen " "System Administration" 2 | .SH "NAME" 3 | .LP 4 | vtop \- The vtop utility is simply a wrapper for the top program. 5 | .SH "SYNTAX" 6 | .LP 7 | vtop [\fIoptions\fP] 8 | 9 | .SH "DESCRIPTION" 10 | .LP 11 | vtop \- The vtop utility is simply a wrapper for the top program, that enables top to show you the all the processes on the system, instead of only the ones in the current s_context (see cat /proc/self/status). 12 | .SH "OPTIONS" 13 | .LP 14 | .TP 15 | See man top. 16 | .SH "FILES" 17 | .LP 18 | \fI/usr/sbin/vtop\fP 19 | 20 | 21 | .SH "EXAMPLES" 22 | .LP 23 | Please contribute some, if you feel it's important. 24 | .SH "AUTHORS" 25 | .LP 26 | This Man page was written by Klavs Klavsen and based upon the helpful output from the program itself and the documentation on the Virtual Server site 27 | .SH "SEE ALSO" 28 | .LP 29 | chcontext(8) rebootmgr(8) reducecap(8) 30 | chbind(8) vps(8) vrpm(8) vserver(8) 31 | vserver\-stat(8) vpstree(8) 32 | -------------------------------------------------------------------------------- /mkrelease: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | proj="util-vserver" 4 | roroot="http://git.linux-vserver.org/git/${proj}.git" 5 | 6 | usage() { 7 | echo "Usage: mkrelease" 8 | } 9 | 10 | die() { 11 | echo $1 12 | exit ${2:-1} 13 | } 14 | 15 | curdir="$PWD" 16 | 17 | TMP=`mktemp -d` 18 | cd "$TMP" 19 | git clone ${roroot} || die "git clone failed" 20 | cd ${proj} 21 | 22 | ver=`grep AC_INIT configure.ac | awk '{ print $2 }'` 23 | ver=${ver/,} 24 | 25 | echo ">>> create release tag" 26 | 27 | (cd "$curdir" && git tag -s "$ver") || die "git tag failed" 28 | 29 | echo ">>> bootstrap sources" 30 | 31 | make -f Makefile.svn || die "make failed" 32 | 33 | echo ">>> create release tarball" 34 | 35 | ./configure --sysconfdir=/etc --prefix=/usr --localstatedir=/var || die "configure failed" 36 | make dist || die "make dist failed" 37 | 38 | for i in *.tar.bz2; do 39 | gpg --detach-sign --armor $i || die "signing failed" 40 | done 41 | 42 | echo ">>> uploading tarball and signature" 43 | 44 | scp -p *.tar.bz2* ftp.linux-vserver.org:/var/ftp/pub/utils/util-vserver || die "scp failed" 45 | 46 | echo ">>> updating documentation" 47 | 48 | read -p "Documentation directory (e.g. $HOME/cvs/uv-www/doc):" DOCDIR 49 | ./update-doc "$DOCDIR" 50 | 51 | cd / 52 | rm -fr "$TMP" 53 | -------------------------------------------------------------------------------- /python/ctags-constants.awk: -------------------------------------------------------------------------------- 1 | (($2 == "macro" || $2 == "enumerator") && $1 ~ /^(vc|VC|CLONE)/ && 2 | $1 !~ /^VC_ATTR_/) { 3 | printf " PyModule_AddLongLongConstant(mod, \"%s\", %s);\n", $1, $1 4 | } 5 | -------------------------------------------------------------------------------- /scripts/.gitignore: -------------------------------------------------------------------------------- 1 | .gdb_history 2 | .*.stamp 3 | util-vserver-vars 4 | vps 5 | -------------------------------------------------------------------------------- /scripts/h2ext-worker: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # $Id$ 3 | 4 | # Copyright (C) 2007 Daniel Hokka Zakrisson 5 | # 6 | # This program is free software; you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation; version 2 of the License. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | # set -e 20 | 21 | : ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars} 22 | test -e "$UTIL_VSERVER_VARS" || { 23 | echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2 24 | exit 1 25 | } 26 | . "$UTIL_VSERVER_VARS" 27 | 28 | eval command=( $1 ) 29 | exec "${command[@]}" 30 | -------------------------------------------------------------------------------- /scripts/legacy/.gitignore: -------------------------------------------------------------------------------- 1 | .vps.pathsubst.stamp 2 | vps 3 | -------------------------------------------------------------------------------- /src/.gitignore: -------------------------------------------------------------------------------- 1 | .buexcl 2 | .deps 3 | .dirstamp 4 | .gdb_history 5 | .libs 6 | capchroot 7 | chain-echo 8 | chbind 9 | chbind-compat 10 | chcontext 11 | chcontext-compat 12 | check-unixfile 13 | chroot-cat 14 | chroot-rm 15 | chroot-sh 16 | chxid 17 | clearenv 18 | enter-namespace 19 | exec-cd 20 | exec-ulimit 21 | fakerunlevel 22 | filetime 23 | h2ext 24 | ifspec 25 | keep-ctx-alive 26 | listdevip 27 | lockfile 28 | lsxid 29 | mask2prefix 30 | naddress 31 | nattribute 32 | ncontext 33 | new-namespace 34 | parserpmdump 35 | pipe-sync 36 | readlink 37 | rebootmgr 38 | reducecap 39 | rpm-fake-resolver 40 | rpm-fake.la 41 | save_ctxinfo 42 | secure-mount 43 | setattr 44 | setctxlimit 45 | showattr 46 | showperm 47 | sigexec 48 | src_rpm_fake_la-rpm-fake.lo 49 | vattribute 50 | vbuild 51 | vcheck 52 | vclone 53 | vcontext 54 | vcopy 55 | vdevmap 56 | vdlimit 57 | vdu 58 | vfiles 59 | vhashify 60 | vkill 61 | vlimit 62 | vmemctrl 63 | vnamespace 64 | vps 65 | vreboot 66 | vrsetup 67 | vsched 68 | vschedule 69 | vserver-info 70 | vserver-stat 71 | vshelper-sync 72 | vspace 73 | vsysctl 74 | vtag 75 | vuname 76 | vunify 77 | vwait 78 | -------------------------------------------------------------------------------- /src/stack-start.h: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c++ -*-- 2 | 3 | // Copyright (C) 2003 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifndef H_UTIL_VSERVER_SRC_STACK_START_H 20 | #define H_UTIL_VSERVER_SRC_STACK_START_H 21 | 22 | #ifdef HAVE_GROWING_STACK 23 | # define STACK_START(PTR) (PTR) 24 | #else 25 | # define STACK_START(PTR) ((PTR)+sizeof(PTR)/sizeof(PTR[0])-1) 26 | #endif 27 | 28 | #endif // H_UTIL_VSERVER_SRC_STACK_START_H 29 | -------------------------------------------------------------------------------- /src/testsuite/.gitignore: -------------------------------------------------------------------------------- 1 | .deps 2 | .dirstamp 3 | .libs 4 | chbind-test 5 | chcontext-test 6 | hashcalc 7 | hashcalc-plain 8 | rpm-fake-test 9 | vunify-functest 10 | -------------------------------------------------------------------------------- /src/testsuite/chbind-test.c: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #define ENSC_TESTSUITE 1 24 | #define main fake_main 25 | #include "src/chbind.c" 26 | #undef main 27 | 28 | int main() 29 | { 30 | if (0) fake_main(0,0); 31 | test(); 32 | 33 | return EXIT_SUCCESS; 34 | } 35 | -------------------------------------------------------------------------------- /src/testsuite/chcontext-test.c: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #define ENSC_TESTSUITE 1 24 | #define main fake_main 25 | #include "src/chcontext.c" 26 | #undef main 27 | 28 | int main() 29 | { 30 | if (0) fake_main(0,0); 31 | test(); 32 | 33 | return EXIT_SUCCESS; 34 | } 35 | -------------------------------------------------------------------------------- /src/testsuite/data/rpm-fake-test.inp: -------------------------------------------------------------------------------- 1 | Proot 2 | Groot 3 | Pbar 4 | Gbar 5 | Pfoo 6 | Gfoo 7 | Pnobody 8 | Gnobody 9 | Cp 10 | Cg 11 | Pfoo 12 | Gfoo 13 | Pnobody 14 | Gnobody 15 | -------------------------------------------------------------------------------- /src/testsuite/data/rpm-fake-test.out: -------------------------------------------------------------------------------- 1 | P(root) = 0 2 | G(root) = 0 3 | P(bar) = 501 4 | G(bar) = 501 5 | P(foo) = 500 6 | G(foo) = 500 7 | P(nobody) = (null) 8 | G(nobody) = (null) 9 | P(foo) = 500 10 | G(foo) = 500 11 | P(nobody) = (null) 12 | G(nobody) = (null) 13 | s_context: 49171 [ -16365] 14 | -------------------------------------------------------------------------------- /src/testsuite/hashcalc-plain.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | # Copyright (C) 2006 Enrico Scholz 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; version 2 of the License. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License 15 | # along with this program; if not, write to the Free Software 16 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | hashcalc=${builddir:-.}/src/testsuite/hashcalc-plain \ 19 | exec ${srcdir:-.}/src/testsuite/hashcalc.sh 20 | -------------------------------------------------------------------------------- /src/testsuite/rpm-fake-test.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | : ${srcdir=.} 4 | : ${builddir=.} 5 | : ${srctestsuitedir=./src/testsuite} 6 | : ${srcdatadir=$srctestsuitedir/data} 7 | : ${tmptopdir=/var/tmp} 8 | 9 | abssrcdir=$(cd $srcdir && pwd) 10 | absbuilddir=$(cd $builddir && pwd) 11 | 12 | DEBUG='strace -E' 13 | 14 | set -e 15 | 16 | tmpdir=$(mktemp -d /var/tmp/rpm-fake-test.XXXXXX) 17 | trap "rm -rf $tmpdir" EXIT 18 | 19 | mkdir -p $tmpdir/{etc,bin} 20 | cat <$tmpdir/etc/passwd 21 | root:x:0:0:root:/root:/bin/bash 22 | foo:x:500:500:foo:/:/bin/false 23 | bar:x:501:501:bar:/:/bin/false 24 | EOF 25 | 26 | cat <$tmpdir/etc/group 27 | root:x:0:root 28 | foo:x:500:foo 29 | bar:x:501:bar 30 | EOF 31 | 32 | chmod +rx $tmpdir 33 | 34 | RPM_FAKE_RESOLVER_UID=1000 \ 35 | RPM_FAKE_RESOLVER_GID=1000 \ 36 | RPM_FAKE_CTX=-1 \ 37 | RPM_FAKE_RESOLVER=$(pwd)/src/rpm-fake-resolver \ 38 | RPM_FAKE_CHROOT=$tmpdir \ 39 | RPM_FAKE_NAMESPACE_MOUNTS=/proc \ 40 | LD_PRELOAD=$(pwd)/src/.libs/rpm-fake.so \ 41 | ./src/testsuite/rpm-fake-test <$srcdir/src/testsuite/data/rpm-fake-test.inp 42 | -------------------------------------------------------------------------------- /src/testsuite/vunify-functest.c: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2003 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #include "lib_internal/matchlist.h" 24 | 25 | int wrapper_exit_code = 1; 26 | extern void PathInfo_test(); 27 | 28 | int main() 29 | { 30 | PathInfo_test(); 31 | return 0; 32 | } 33 | -------------------------------------------------------------------------------- /src/testsuite/vunify-test.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | : ${srcdir=.} 4 | : ${tmptopdir=/var/tmp} 5 | 6 | set -e 7 | 8 | tmpdir=$(mktemp -d /var/tmp/vunify-test.XXXXXX) 9 | trap "rm -rf $tmpdir" EXIT 10 | 11 | function createFiles 12 | { 13 | local base=$1 14 | shift 15 | 16 | local idx=0 17 | local i 18 | for i; do 19 | echo $i >$base$idx 20 | let ++idx 21 | done 22 | } 23 | 24 | function createSet 25 | { 26 | local base=$1 27 | 28 | createFiles a/$base a b c d 29 | createFiles b/$base a b c 30 | createFiles c/$base XX XX 31 | 32 | ln a/${base}3 b/${base}3 33 | } 34 | 35 | pushd $tmpdir &>/dev/null 36 | mkdir -p {a,b,c}{/etc/sysconfig,/usr/lib,/usr/local/lib/foobar,/var/run} 37 | 38 | createSet etc/CFG 39 | createSet etc/sysconfig/CFG 40 | 41 | createSet usr/PROG 42 | createSet usr/lib/PROG 43 | 44 | createSet usr/local/lib/LOCAL 45 | createSet usr/local/lib/foobar/LOCAL 46 | 47 | createSet var/TEMP 48 | createSet var/run/TEMP 49 | popd &>/dev/null 50 | 51 | 52 | $D ./src/vunify -n --manually $tmpdir/a '' $tmpdir/b '' >/dev/null 53 | $D ./src/vunify -n --manually $tmpdir/a '' $tmpdir/c '' >/dev/null 54 | -------------------------------------------------------------------------------- /src/util.h: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifndef H_UTILVSERVER_SRC_UTIL_H 20 | #define H_UTILVSERVER_SRC_UTIL_H 21 | 22 | #include 23 | 24 | #endif // H_UTILVSERVER_SRC_UTIL_H 25 | -------------------------------------------------------------------------------- /systemd/.gitignore: -------------------------------------------------------------------------------- 1 | /systemd-vserver-generator 2 | /util-vserver.sysctl 3 | /util-vserver.tmpfiles 4 | /vserver@.service 5 | -------------------------------------------------------------------------------- /systemd/systemd-start: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | : ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars} 4 | test -e "$UTIL_VSERVER_VARS" || { 5 | echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2 6 | exit 1 7 | } 8 | . "$UTIL_VSERVER_VARS" 9 | . "$_LIB_VSERVER_FUNCTIONS" 10 | 11 | handleDeviceMap --set 0 "$__CONFDIR/.defaults/apps/vdevmap" 12 | -------------------------------------------------------------------------------- /systemd/systemd-stop: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | : ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars} 4 | test -e "$UTIL_VSERVER_VARS" || { 5 | echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2 6 | exit 1 7 | } 8 | . "$UTIL_VSERVER_VARS" 9 | 10 | $_VSOMETHING vserver --running -- stop 11 | -------------------------------------------------------------------------------- /systemd/util-vserver.service.pathsubst: -------------------------------------------------------------------------------- 1 | [Unit] 2 | After = network-online.target 3 | Wants = network-online.target 4 | 5 | [Service] 6 | RemainAfterExit = yes 7 | ExecStart = @PKGLIBEXECDIR@/systemd-start 8 | ExecStop = @PKGLIBEXECDIR@/systemd-stop 9 | -------------------------------------------------------------------------------- /systemd/util-vserver.sysctl.pathsubst: -------------------------------------------------------------------------------- 1 | kernel.vshelper = @VSHELPER@ 2 | -------------------------------------------------------------------------------- /systemd/util-vserver.tmpfiles.pathsubst: -------------------------------------------------------------------------------- 1 | d @VSHELPERSTATEDIR@ 0755 root root 2 | d @PKGSTATEDIR@ 0755 root root 3 | d @PKGSTATEDIR@.rev 0755 root root 4 | -------------------------------------------------------------------------------- /systemd/vprocunhide.service.pathsubst: -------------------------------------------------------------------------------- 1 | [Unit] 2 | 3 | [Service] 4 | RemainAfterExit = yes 5 | ExecStart = @PKGLIBEXECDIR@/vprocunhide 6 | -------------------------------------------------------------------------------- /systemd/vserver-mark@.target: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description = Target for vservers tagged with '%I' 3 | 4 | [Install] 5 | WantedBy = vserver.target 6 | -------------------------------------------------------------------------------- /systemd/vserver.target: -------------------------------------------------------------------------------- 1 | # This file is part of util-vserver 2 | 3 | [Unit] 4 | Description = vserver 5 | 6 | [Install] 7 | WantedBy=multi-user.target 8 | -------------------------------------------------------------------------------- /systemd/vserver@.service.pathsubst: -------------------------------------------------------------------------------- 1 | # This file is part of util-vserver 2 | 3 | [Unit] 4 | Description = vserver '%I' 5 | After = vprocunhide.service util-vserver.service 6 | Wants = vprocunhide.service util-vserver.service 7 | 8 | [Service] 9 | Type = oneshot 10 | ExecStart = @SBINDIR@/vserver %I start 11 | ExecStop = @SBINDIR@/vserver %I stop 12 | RemainAfterExit = yes 13 | -------------------------------------------------------------------------------- /sysv/.gitignore: -------------------------------------------------------------------------------- 1 | rebootmgr 2 | v_gated 3 | v_httpd 4 | v_named 5 | v_portmap 6 | v_sendmail 7 | v_smb 8 | v_sshd 9 | v_xinetd 10 | vservers 11 | -------------------------------------------------------------------------------- /sysv/v_gated.subst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # chkconfig: - 32 75 3 | # description: Wrapper to start gated bound to a single IP 4 | 5 | # normally, you will need /etc/vservices/gated.conf 6 | # with the following line 7 | # IP=0.0.0.0 8 | # so gated is started without restriction even if you 9 | # restart it from an ssh session, itself "chbounded" to a single 10 | # IP. 11 | USR_LIB_VSERVER=/usr/lib/util-vserver 12 | exec $USR_LIB_VSERVER/vsysvwrapper gated $* 13 | 14 | -------------------------------------------------------------------------------- /sysv/v_httpd.subst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # chkconfig: - 85 15 3 | # description: Wrapper to start httpd bound to a single IP 4 | USR_LIB_VSERVER=/usr/lib/util-vserver 5 | exec $USR_LIB_VSERVER/vsysvwrapper httpd $* 6 | 7 | -------------------------------------------------------------------------------- /sysv/v_named.subst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # chkconfig: - 55 45 3 | # description: Wrapper to start named bound to a single IP 4 | USR_LIB_VSERVER=/usr/lib/util-vserver 5 | exec $USR_LIB_VSERVER/vsysvwrapper named $* 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /sysv/v_portmap.subst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # chkconfig: - 91 35 3 | # description: Wrapper to start portmap bound to a single IP 4 | USR_LIB_VSERVER=/usr/lib/util-vserver 5 | exec $USR_LIB_VSERVER/vsysvwrapper portmap $* 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /sysv/v_sendmail.subst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # chkconfig: - 80 30 3 | # description: Wrapper to start sendmail bound to a single IP 4 | USR_LIB_VSERVER=/usr/lib/util-vserver 5 | exec $USR_LIB_VSERVER/vsysvwrapper sendmail $* 6 | 7 | -------------------------------------------------------------------------------- /sysv/v_smb.subst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # chkconfig: - 91 35 3 | # description: Wrapper to start smb bound to a single IP 4 | USR_LIB_VSERVER=/usr/lib/util-vserver 5 | exec $USR_LIB_VSERVER/vsysvwrapper smb $* 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /sysv/v_sshd.subst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # chkconfig: - 55 25 3 | # description: Wrapper to start sshd bound to a single IP 4 | USR_LIB_VSERVER=/usr/lib/util-vserver 5 | exec $USR_LIB_VSERVER/vsysvwrapper sshd $* 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /sysv/v_xinetd.subst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # chkconfig: - 56 50 3 | # description: Wrapper to start xinetd bound to a single IP 4 | USR_LIB_VSERVER=/usr/lib/util-vserver 5 | exec $USR_LIB_VSERVER/vsysvwrapper xinetd $* 6 | 7 | -------------------------------------------------------------------------------- /sysv/vservers.conf: -------------------------------------------------------------------------------- 1 | # Configuration file for the vservers service 2 | # BACKGROUND=yes 3 | # start the vservers on tty9, in background so the rest of the 4 | # boot process end early 5 | BACKGROUND=no 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/.gitignore: -------------------------------------------------------------------------------- 1 | .deps 2 | .dirstamp 3 | .libs 4 | chrootsafe 5 | escaperoot 6 | forkbomb 7 | getctx 8 | getinitpid 9 | testipc 10 | testlimit 11 | testopenf 12 | vserver-info 13 | -------------------------------------------------------------------------------- /update-doc: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | test -n "$1" || { 4 | echo "No target directory given; aborting...">&2 5 | exit 1 6 | } 7 | 8 | test -d "$1"/CVS || { 9 | echo "Target directory does not seem to be CVS managed; aborting..." >&2 10 | exit 1 11 | } 12 | 13 | tmp=$(mktemp -d /tmp/uv.XXXXXX)/doc || exit 1 14 | trap "rm -rf $tmp" EXIT 15 | 16 | mkdir -p "$tmp"/{apidoc/html,conf} 17 | install -p -m644 doc/*.css doc/*.html "$tmp"/conf/ 18 | install -p -m644 lib/apidoc/latex/refman.pdf "$tmp"/apidoc/refman.pdf 19 | install -p -m644 lib/apidoc/html/*.{css,html,png} "$tmp"/apidoc/html/ 20 | 21 | rsync -av --delete --exclude=lt2004 --exclude=virtual-servers.pdf --exclude=css \ 22 | --exclude=img --exclude=CVS --exclude=.symlinks --exclude=.htaccess "$tmp"/ "$1"/ 23 | -------------------------------------------------------------------------------- /vserver-start/.gitignore: -------------------------------------------------------------------------------- 1 | .deps 2 | .dirstamp 3 | .libs 4 | vserver.start.bin 5 | -------------------------------------------------------------------------------- /vserver-start/interface-free.hc: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | static inline UNUSED void 19 | Iface_free(struct Interface *iface) 20 | { 21 | free(const_cast(char *)(iface->name)); 22 | free(const_cast(char *)(iface->scope)); 23 | free(const_cast(char *)(iface->dev)); 24 | free(const_cast(char *)(iface->mac)); 25 | } 26 | -------------------------------------------------------------------------------- /vserver-start/interface-init.hc: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | #include 19 | 20 | static inline UNUSED void 21 | Iface_init(struct Interface *iface) 22 | { 23 | memset(&iface->addr, 0, sizeof (iface->addr)); 24 | iface->name = 0; 25 | iface->scope = 0; 26 | iface->dev = 0; 27 | iface->mac = 0; 28 | iface->nodev = false; 29 | iface->direct = false; 30 | iface->up = true; 31 | } 32 | -------------------------------------------------------------------------------- /vserver-start/interface-print.c: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #include "interface.h" 24 | 25 | void 26 | Iface_print(struct Interface const UNUSED *iface, int UNUSED fd) 27 | { 28 | 29 | } 30 | -------------------------------------------------------------------------------- /vserver-start/interface-remove.c: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #include "interface.h" 24 | 25 | bool 26 | Iface_remove(struct Interface const UNUSED *iface) 27 | { 28 | return true; 29 | } 30 | -------------------------------------------------------------------------------- /vserver-start/mount.h: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifndef H_UTIL_VSERVER_VSERVER_START_MOUNT_H 20 | #define H_UTIL_VSERVER_VSERVER_START_MOUNT_H 21 | 22 | #include 23 | 24 | struct Configuration; 25 | void mountVserver(struct Configuration const *cfg); 26 | 27 | #endif // H_UTIL_VSERVER_VSERVER_START_MOUNT_H 28 | -------------------------------------------------------------------------------- /vserver-start/undo.h: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifndef H_UTIL_VSERVER_VSERVER_START_UNDO_H 20 | #define H_UTIL_VSERVER_VSERVER_START_UNDO_H 21 | 22 | typedef void (*ExitFunction)(void const *); 23 | 24 | void Undo_init(); 25 | void Undo_addTask(ExitFunction fn, void const *args); 26 | void Undo_detach(); 27 | 28 | #endif // H_UTIL_VSERVER_VSERVER_START_UNDO_H 29 | -------------------------------------------------------------------------------- /vserver-start/vshelper.h: -------------------------------------------------------------------------------- 1 | // $Id$ --*- c -*-- 2 | 3 | // Copyright (C) 2004 Enrico Scholz 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; version 2 of the License. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | 18 | 19 | #ifndef H_UTIL_VSERVER_VSERVER_START_VSHELPER_H 20 | #define H_UTIL_VSERVER_VSERVER_START_VSHELPER_H 21 | 22 | void Vshelper_doSanityCheck(); 23 | 24 | 25 | #endif // H_UTIL_VSERVER_VSERVER_START_VSHELPER_H 26 | --------------------------------------------------------------------------------