summaryrefslogtreecommitdiff
path: root/vzctl
diff options
context:
space:
mode:
authorChristian Heim <phreak@gentoo.org>2006-08-27 09:51:02 +0000
committerChristian Heim <phreak@gentoo.org>2006-08-27 09:51:02 +0000
commite849133271f1273b78ae058d1b0f102e1dd8ba94 (patch)
tree79458a774934c3e10feac60aebeb3f3d456c674c /vzctl
parentRemoving Bertl's experimental patches for now. (diff)
downloadmisc-e849133271f1273b78ae058d1b0f102e1dd8ba94.tar.gz
misc-e849133271f1273b78ae058d1b0f102e1dd8ba94.tar.bz2
misc-e849133271f1273b78ae058d1b0f102e1dd8ba94.zip
Adding patchset for vzctl-3.0.11.
svn path=/; revision=435
Diffstat (limited to 'vzctl')
-rw-r--r--vzctl/patches/3.0.11/000_README66
-rw-r--r--vzctl/patches/3.0.11/005_all_library-rework.patch246
-rw-r--r--vzctl/patches/3.0.11/010_all_dev-nul.patch23
-rw-r--r--vzctl/patches/3.0.11/015_all_fix-cast-pointers.patch34
-rw-r--r--vzctl/patches/3.0.11/020_all_memleak-realloc.patch121
-rw-r--r--vzctl/patches/3.0.11/025_all_off-by-one.patch23
-rw-r--r--vzctl/patches/3.0.11/030_all_vzctl-sprintf-snprintf.patch107
-rw-r--r--vzctl/patches/3.0.11/035_all_remove-vename-on-destroy.patch35
-rw-r--r--vzctl/patches/3.0.11/040_all_segfault-long-opts.patch25
-rw-r--r--vzctl/patches/3.0.11/045_all_vzctl-enter-exit-msg.patch26
-rw-r--r--vzctl/patches/3.0.11/050_all_vzctl-enter-forward-msg-from-child.patch38
-rw-r--r--vzctl/patches/3.0.11/200_all_incorrect-spelling.patch76
-rw-r--r--vzctl/patches/3.0.11/205_all_ve-light.conf-sample.patch27
-rw-r--r--vzctl/patches/3.0.11/210_all_vzctl-3.0.11-vzctl.8.patch22
-rw-r--r--vzctl/patches/3.0.11/215_all_vzmigrate-mawk.patch25
15 files changed, 894 insertions, 0 deletions
diff --git a/vzctl/patches/3.0.11/000_README b/vzctl/patches/3.0.11/000_README
new file mode 100644
index 0000000..8b2b709
--- /dev/null
+++ b/vzctl/patches/3.0.11/000_README
@@ -0,0 +1,66 @@
+Numbering scheme
+--------------------------------------
+FIXES
+000_all - 195_all
+
+FEATURES/MINOR FIXES (config/manpages)
+200_all - 395_all
+
+Patch descriptions:
+--------------------------------------
+
+Patch: 005_all_library-rework.patch
+From: Dmitry V. Levin <ldv@altlinux.org>
+Desc: Rework libraries to support ld --as-needed and prelink.
+
+Patch: 010_all_dev-nul.patch
+From: Kirill Korotaev <dev@openvz.org>
+Desc: Fix misprints in distro scripts (/dev/nul vs. /dev/null)
+
+Patch: 015_all_fix-cast-pointers.patch
+From: Dmitry V. Levin <ldv@altlinux.org>
+Desc: vzlist: Fix cast from pointer to integer of different size warnings
+
+Patch: 020_all_memleak-realloc.patch
+From: Igor Sukhih <igor@openvz.org>
+Desc: Fixed memory leaks in realloc()
+
+Patch: 025_all_off-by-one.patch
+From: Dmitry V. Levin <ldv@altlinux.org>
+Desc: vzctl enter: Fix off-by-one error which resulted to uninitialized PATH.
+
+Patch: 030_all_vzctl-sprintf-snprintf.patch
+From: Igor Sukhih <igor@openvz.org>
+Desc: Replace sprintf() -> snprintf() to avoid possible buffer overflow.
+
+Patch: 035_all_remove-vename-on-destroy.patch
+From: Igor Sukhih <igor@openvz.org>
+Desc: Remove VE name information on destroy
+
+Patch: 040_all_segfault-long-opts.patch
+From: Dmitry V. Levin <ldv@altlinux.org>
+Desc: arpsend: Fix segfault when parsing long options
+
+Patch: 045_all_vzctl-enter-exit-msg.patch
+From: Igor Sukhih <igor@openvz.org>
+Desc: vzctl enter: fixed print exit message.
+
+Patch: 050_all_vzctl-enter-forward-msg-from-child.patch
+From: Dmitry V. Levin <ldv@altlinux.org>
+Desc: vzctl enter: Forward error messages from child process.
+
+Patch: 200_all_incorrect-spelling.patch
+From: Kirill Korotaev <dev@openvz.org>
+Desc: Fix misprints in distro scripts.
+
+Patch: 205_all_ve-light.conf-sample.patch
+From: Igor Sukhih <igor@openvz.org>
+Desc: Increase dgramrcvbuf and othersockbuf in ve-light.conf-sample.
+
+Patch: 210_all_vzctl-3.0.11-vzctl.8.patch
+From: Igor Sukhih <igor@openvz.org>
+Desc: Added --name description to vzctl.8.
+
+Patch: 215_all_vzmigrate-mawk.patch
+From: Kirill Korotaev <dev@openvz.org>
+Desc: Fix vzmigrate to work with mawk (not gawk only).
diff --git a/vzctl/patches/3.0.11/005_all_library-rework.patch b/vzctl/patches/3.0.11/005_all_library-rework.patch
new file mode 100644
index 0000000..7ad678c
--- /dev/null
+++ b/vzctl/patches/3.0.11/005_all_library-rework.patch
@@ -0,0 +1,246 @@
+Index: vzctl-3.0.11/src/Makefile
+===================================================================
+--- vzctl-3.0.11.orig/src/Makefile
++++ vzctl-3.0.11/src/Makefile
+@@ -17,7 +17,7 @@
+ INSTALL = install
+ PREFIX = /usr
+ SBINDIR = $(PREFIX)/sbin
+- LIBDIR = $(PREFIX)/lib/vzctl/lib
++ LIBDIR = $(PREFIX)/lib
+ CONFDIR = /etc/vz
+ GLBCONFIG = $(CONFDIR)/vz.conf
+ VPSCONFDIR = $(CONFDIR)/conf
+@@ -33,7 +33,7 @@ NETSCRIPTDIR = /etc/sysconfig/network-sc
+ VZDUMPDIR = $(VZDIR)/dump
+ VEIPDUMPDIR = /var/lib/vzctl/veip
+ LOGRDIR = /etc/logrotate.d
+- LIB_VER = 0.0.2
++ LIB_VER = 0.0.3
+
+ export LD_LIBRARY_PATH=.
+ CC = gcc
+@@ -43,13 +43,14 @@ SHAREDLIB_CFLAGS = -fPIC
+ INC = -I ../include
+ ARCH ?= $(shell uname -m)
+
+-OBJ_libvzctl = lib/env.lo lib/ub.lo lib/net.lo lib/logger.lo lib/exec.lo \
++OBJ_libvzctl = lib/env.lo lib/ub.lo lib/net.lo lib/exec.lo \
+ lib/cap.lo lib/cpu.lo lib/res.lo lib/util.lo lib/dist.lo lib/list.lo \
+ lib/script.lo lib/dev.lo lib/config.lo lib/lock.lo lib/quota.lo \
+ lib/modules.lo lib/iptables.lo lib/fs.lo lib/create.lo lib/readelf.lo \
+ lib/cpt.lo lib/destroy.lo lib/vps_configure.lo lib/meminfo.lo \
+ lib/veth.lo
+ OBJ_simfs=lib/fs_simfs.lo
++OBJ_logger = lib/logger.lo
+ OBJ_vzctl = vzctl.o vzctl-actions.o modules.o enter.o
+ OBJ_vzlist = vzlist.o
+ OBJ_arp = arpsend.o
+@@ -59,17 +60,17 @@ OBJ_cfgvalidate = vzcfgvalidate.o valida
+ OBJ_calc = vzcalc.o
+ OBJ = $(OBJ_vzctl) $(OBJ_vzlist) $(OBJ_arp) $(OBJ_split) $(OBJ_memcheck) \
+ $(OBJ_cfgvalidate) $(OBJ_calc)
+-LOBJ = $(OBJ_libvzctl) $(OBJ_simfs)
++LOBJ = $(OBJ_libvzctl) $(OBJ_simfs) $(OBJ_logger)
+ LIB_vzctl = libvzctl.so.$(LIB_VER)
+ LIB_simfs = libvzctl-simfs.so.$(LIB_VER)
++LIB_logger = libvzlogger.so.$(LIB_VER)
+ LIB_fs = $(LIB_simfs)
+
+-LDFLAGS += -Wl,-rpath=$(LIBDIR)
+ LIBSCRIPTS = vps-create vps-postcreate vps-net_add vps-net_del vps-stop \
+ vps-functions
+
+ PROGS = vzctl vzlist arpsend vzsplit vzcfgvalidate vzmemcheck vzcalc
+-LIBS = $(LIB_vzctl) $(LIB_fs)
++LIBS = $(LIB_vzctl) $(LIB_fs) $(LIB_logger)
+
+ INITSCRIPTS = vz
+ CRONSCRIPTS = vpsreboot vpsnetclean
+@@ -102,23 +103,26 @@ check-version:
+ %.lo: %.c
+ $(CC) -c $(CFLAGS) $(SHAREDLIB_CFLAGS) $(INC) $< -o $@
+
+-$(LIB_fs) : $(OBJ_simfs) lib/logger.lo
+- $(CC) $(CFLAGS) $(INC) $(LDFLAGS) $^ -shared -o $@
++$(LIB_logger) : $(OBJ_logger)
++ $(CC) $(CFLAGS) $(INC) $(LDFLAGS) $^ -shared -Wl,-soname,$@ -o $@
+
+-libvzctl.a: $(OBJ_libvzctl) $(LIB_fs)
++$(LIB_fs) : $(OBJ_simfs) $(LIB_logger)
++ $(CC) $(CFLAGS) $(INC) $(LDFLAGS) $^ -shared -Wl,-soname,$@ -o $@
++
++$(LIB_vzctl) : $(OBJ_libvzctl) $(LIB_fs) $(LIB_logger)
++ $(CC) $(CFLAGS) $(INC) $(LDFLAGS) $^ $(LD_FLAGS) -shared -Wl,-soname,$@ -o $@
++
++libvzctl.a: $(OBJ_libvzctl) $(OBJ_simfs) $(OBJ_logger)
+ ar scq $@ $+
+ ranlib $@
+
+-$(LIB_vzctl) : $(LIB_fs) $(OBJ_libvzctl)
+- $(CC) $(CFLAGS) $(INC) $(LDFLAGS) $^ $(LD_FLAGS) -shared -o $@
+-
+ vzctl-static: $(OBJ_vzctl) libvzctl.a
+ $(CC) $(CFLAGS) $(INC) $(LDFLAGS) $^ -rdynamic -ldl -lutil -o $@
+
+-vzctl: check-version $(OBJ_vzctl) $(LIB_vzctl) $(LIB_fs)
+- $(CC) $(CFLAGS) $(INC) $(LDFLAGS) $(OBJ_vzctl) $(LIB_vzctl) $(LIB_fs) -ldl -lutil -o $@
++vzctl: check-version $(OBJ_vzctl) $(LIB_vzctl) $(LIB_fs) $(LIB_logger)
++ $(CC) $(CFLAGS) $(INC) $(LDFLAGS) $(OBJ_vzctl) $(LIB_vzctl) $(LIB_fs) $(LIB_logger) -ldl -lutil -o $@
+
+-vzlist: $(OBJ_vzlist) $(LIB_vzctl) $(LIB_fs)
++vzlist: $(OBJ_vzlist) $(LIB_vzctl) $(LIB_logger)
+ $(CC) $(CFLAGS) $(INC) $(LDFLAGS) $^ -o $@
+
+ arpsend: $(OBJ_arp)
+@@ -127,10 +131,10 @@ arpsend: $(OBJ_arp)
+ vzsplit: $(OBJ_split)
+ $(CC) $(CFLAGS) $(INC) $(LDFLAGS) $^ -o $@
+
+-vzmemcheck: $(OBJ_memcheck) $(LIB_vzctl)
++vzmemcheck: $(OBJ_memcheck) $(LIB_vzctl) $(LIB_logger)
+ $(CC) $(CFLAGS) $(INC) $(LDFLAGS) $^ -o $@
+
+-vzcfgvalidate: $(OBJ_cfgvalidate) $(LIB_vzctl)
++vzcfgvalidate: $(OBJ_cfgvalidate) $(LIB_vzctl) $(LIB_logger)
+ $(CC) $(CFLAGS) $(INC) $(LDFLAGS) $^ -o $@
+
+ vzcalc: $(OBJ_calc) $(LIB_vzctl)
+@@ -145,6 +149,7 @@ install-lib: $(LIB_vzctl) $(LIB_fs)
+ $(INSTALL) -d $(DESTDIR)$(LIBSCRIPTSDIR)
+ $(INSTALL) $(LIB_vzctl) $(DESTDIR)$(LIBDIR)/$(LIB_vzctl)
+ $(INSTALL) $(LIB_fs) $(DESTDIR)$(LIBDIR)/$(LIB_fs)
++ $(INSTALL) $(LIB_logger) $(DESTDIR)$(LIBDIR)/$(LIB_logger)
+ for file in $(LIBSCRIPTS); do \
+ $(INSTALL) -m 755 ../etc/$$file $(DESTDIR)$(LIBSCRIPTSDIR)/$$file; \
+ done
+@@ -208,7 +213,7 @@ inst-dirs:
+ install: $(PROGS) inst-dirs install-lib inst-sbin inst-scripts \
+ inst-netscripts inst-configs inst-initd inst-cron
+ clean:
+- rm -f *.o lib/*.lo $(PROGS) $(LIB_vzctl) $(LIB_fs) $(LIB_fs) .depend
++ rm -f *.o lib/*.lo $(PROGS) $(LIB_vzctl) $(LIB_fs) $(LIB_logger) .depend
+
+ .depend:: $(OBJ:.o=.c) $(LOBJ:.lo=.c)
+ $(CC) -M $(FLAGS) $(DEPFLAGS) $(INC) $^ >.depend
+Index: vzctl-3.0.11/src/lib/logger.c
+===================================================================
+--- vzctl-3.0.11.orig/src/lib/logger.c
++++ vzctl-3.0.11/src/lib/logger.c
+@@ -30,7 +30,7 @@
+ #include "types.h"
+ #include "logger.h"
+
+-extern log_param g_log;
++LOG_DATA
+
+ static inline void get_date(char *buf, int len)
+ {
+Index: vzctl-3.0.11/src/vzcalc.c
+===================================================================
+--- vzctl-3.0.11.orig/src/vzcalc.c
++++ vzctl-3.0.11/src/vzcalc.c
+@@ -27,8 +27,6 @@
+ #include "config.h"
+ #include "util.h"
+
+-LOG_DATA
+-
+ void usage()
+ {
+ printf("Usage: vzcalc [-v] <veid>\n");
+Index: vzctl-3.0.11/src/vzcfgvalidate.c
+===================================================================
+--- vzctl-3.0.11.orig/src/vzcfgvalidate.c
++++ vzctl-3.0.11/src/vzcfgvalidate.c
+@@ -26,8 +26,6 @@
+ #include "validate.h"
+ #include "logger.h"
+
+-log_param g_log;
+-
+ void usage()
+ {
+ printf("Usage: vzcfgvalidate [-r|-i] <configfile>\n");
+Index: vzctl-3.0.11/src/vzctl.c
+===================================================================
+--- vzctl-3.0.11.orig/src/vzctl.c
++++ vzctl-3.0.11/src/vzctl.c
+@@ -32,8 +32,6 @@
+ #include "util.h"
+ #include "modules.h"
+
+-LOG_DATA
+-
+ struct mod_action g_action;
+ char *_proc_title;
+ int _proc_title_len;
+Index: vzctl-3.0.11/src/vzlist.c
+===================================================================
+--- vzctl-3.0.11.orig/src/vzlist.c
++++ vzctl-3.0.11/src/vzlist.c
+@@ -42,7 +42,6 @@
+ #include "util.h"
+ #include "types.h"
+
+-LOG_DATA
+ static struct Cveinfo *veinfo = NULL;
+ static int n_veinfo = 0;
+
+Index: vzctl-3.0.11/src/vzmemcheck.c
+===================================================================
+--- vzctl-3.0.11.orig/src/vzmemcheck.c
++++ vzctl-3.0.11/src/vzmemcheck.c
+@@ -29,8 +29,6 @@
+ #include "util.h"
+ #include "logger.h"
+
+-LOG_DATA
+-
+ void usage()
+ {
+ printf("Usage: vzmemcheck [-v] [-A]\n");
+Index: vzctl-3.0.11/vzctl.spec
+===================================================================
+--- vzctl-3.0.11.orig/vzctl.spec
++++ vzctl-3.0.11/vzctl.spec
+@@ -5,9 +5,10 @@
+ %define _dumpdir %{_vzdir}/dump
+ %define _cachedir %{_vzdir}/template/cache
+ %define _veipdir /var/lib/vzctl/veip
+-%define _libdir /usr/lib/vzctl
++%define _libvzdir /usr/lib/vzctl
++%define _libscriptdir %{_libvzdir}/scripts
+ %define _configdir /etc/vz
+-%define _scriptdir /usr/share/vzctl//scripts
++%define _scriptdir /usr/share/vzctl/scripts
+ %define _vpsconfdir /etc/sysconfig/vz-scripts
+ %define _netdir /etc/sysconfig/network-scripts
+ %define _logrdir /etc/logrotate.d
+@@ -156,13 +157,17 @@ Virtual Private Servers control API libr
+
+ %files lib
+ %defattr(-,root,root)
+-%dir %{_libdir}/lib
+-%attr(755,root,root) %{_libdir}/lib/libvzctl.so.*
+-%attr(755,root,root) %{_libdir}/lib/libvzctl-simfs.so.*
+-%attr(755,root,root) %{_libdir}/scripts/vps-stop
+-%attr(755,root,root) %{_libdir}/scripts/vps-functions
+-%attr(755,root,root) %{_libdir}/scripts/vps-net_add
+-%attr(755,root,root) %{_libdir}/scripts/vps-net_del
+-%attr(755,root,root) %{_libdir}/scripts/vps-create
+-%attr(755,root,root) %{_libdir}/scripts/vps-postcreate
++%attr(755,root,root) %{_libdir}/libvzlogger.so.*
++%attr(755,root,root) %{_libdir}/libvzctl.so.*
++%attr(755,root,root) %{_libdir}/libvzctl-simfs.so.*
++%dir %{_libvzdir}
++%dir %{_libscriptdir}
++%attr(755,root,root) %{_libscriptdir}/vps-stop
++%attr(755,root,root) %{_libscriptdir}/vps-functions
++%attr(755,root,root) %{_libscriptdir}/vps-net_add
++%attr(755,root,root) %{_libscriptdir}/vps-net_del
++%attr(755,root,root) %{_libscriptdir}/vps-create
++%attr(755,root,root) %{_libscriptdir}/vps-postcreate
+
++%post lib -p /sbin/ldconfig
++%postun lib -p /sbin/ldconfig
diff --git a/vzctl/patches/3.0.11/010_all_dev-nul.patch b/vzctl/patches/3.0.11/010_all_dev-nul.patch
new file mode 100644
index 0000000..02145ef
--- /dev/null
+++ b/vzctl/patches/3.0.11/010_all_dev-nul.patch
@@ -0,0 +1,23 @@
+From: Kirill Korotaev <dev@openvz.org>
+Date: Tue, 22 Aug 2006 10:29:52 +0000 (+0400)
+Subject: Fix misprints in distro scripts
+X-Git-Url: http://git.openvz.org/?p=vzctl;a=commitdiff;h=6b349c3d3adea85c73452d269a8278d86a35795f
+
+text misprints and /dev/nul fixes.
+
+http://bugzilla.openvz.org/show_bug.cgi?id=228
+---
+
+Index: vzctl-3.0.11/etc/dists/scripts/debian-add_ip.sh
+===================================================================
+--- vzctl-3.0.11.orig/etc/dists/scripts/debian-add_ip.sh
++++ vzctl-3.0.11/etc/dists/scripts/debian-add_ip.sh
+@@ -82,7 +82,7 @@ d
+ wq" | ed ${CFGFILE}.bak >/dev/null 2>&1
+ echo -e "/iface ${iface}\\>
+ .,+3d
+-wq" | ed ${CFGFILE}.bak >/dev/nul 2>&1
++wq" | ed ${CFGFILE}.bak >/dev/null 2>&1
+ }
+
+ function get_all_aliasid()
diff --git a/vzctl/patches/3.0.11/015_all_fix-cast-pointers.patch b/vzctl/patches/3.0.11/015_all_fix-cast-pointers.patch
new file mode 100644
index 0000000..86f6dd8
--- /dev/null
+++ b/vzctl/patches/3.0.11/015_all_fix-cast-pointers.patch
@@ -0,0 +1,34 @@
+From: Dmitry V. Levin <ldv@altlinux.org>
+Date: Fri, 25 Aug 2006 08:03:34 +0000 (+0400)
+Subject: vzlist: Fix cast from pointer to integer of different size warnings
+X-Git-Url: http://git.openvz.org/?p=vzctl;a=commitdiff;h=3a772bf0e3145a1c255d823bca4f4cea6e035f7f
+
+vzlist: Fix cast from pointer to integer of different size warnings
+id_search_fn(): Take veid by reference like in veid_search_fn().
+find_ve(): Pass veid by reference like in check_veid_restr().
+
+Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
+---
+
+Index: vzctl-3.0.11/src/vzlist.c
+===================================================================
+--- vzctl-3.0.11.orig/src/vzlist.c
++++ vzctl-3.0.11/src/vzlist.c
+@@ -607,7 +607,7 @@ void usage()
+
+ int id_search_fn(const void* val1, const void* val2)
+ {
+- return ((int)val1 - ((struct Cveinfo*)val2)->veid);
++ return (*(int *)val1 - ((struct Cveinfo*)val2)->veid);
+ }
+
+ int veid_search_fn(const void* val1, const void* val2)
+@@ -708,7 +708,7 @@ void add_elem(struct Cveinfo *ve)
+
+ inline struct Cveinfo *find_ve(int veid)
+ {
+- return (struct Cveinfo *) bsearch((void*)veid, veinfo, n_veinfo,
++ return (struct Cveinfo *) bsearch(&veid, veinfo, n_veinfo,
+ sizeof(struct Cveinfo), id_search_fn);
+ }
+
diff --git a/vzctl/patches/3.0.11/020_all_memleak-realloc.patch b/vzctl/patches/3.0.11/020_all_memleak-realloc.patch
new file mode 100644
index 0000000..98ae0e5
--- /dev/null
+++ b/vzctl/patches/3.0.11/020_all_memleak-realloc.patch
@@ -0,0 +1,121 @@
+From: Igor Sukhih <igor@openvz.org>
+Date: Tue, 22 Aug 2006 13:39:35 +0000 (+0400)
+Subject: Fixed memory leaks in realloc()
+X-Git-Url: http://git.openvz.org/?p=vzctl;a=commitdiff;h=48bada8af358255c7b54f437ba0002eabf0df368
+
+Fixed memory leaks in realloc()
+---
+
+Index: vzctl-3.0.11/src/lib/list.c
+===================================================================
+--- vzctl-3.0.11.orig/src/lib/list.c
++++ vzctl-3.0.11/src/lib/list.c
+@@ -24,7 +24,7 @@
+
+ char *list2str_c(char *name, char c, list_head_t *head)
+ {
+- char *buf = NULL;
++ char *buf = NULL, *tmp;
+ int buf_len, len, r;
+ char *sp, *ep;
+ const int delta = 256;
+@@ -61,9 +61,12 @@ char *list2str_c(char *name, char c, lis
+ int cur_len = sp - buf;
+
+ buf_len += delta > len ? delta : len + 1;
+- buf = realloc(buf, buf_len);
+- if (buf == NULL)
++ tmp = realloc(buf, buf_len);
++ if (tmp == NULL) {
++ free(buf);
+ return NULL;
++ }
++ buf = tmp;
+ ep = buf + buf_len;
+ sp = buf + cur_len;
+ }
+Index: vzctl-3.0.11/src/lib/net.c
+===================================================================
+--- vzctl-3.0.11.orig/src/lib/net.c
++++ vzctl-3.0.11/src/lib/net.c
+@@ -349,7 +349,7 @@ static inline int get_vps_ip_ioctl(vps_h
+ {
+ int ret = -1;
+ struct vzlist_veipv4ctl veip;
+- uint32_t *addr;
++ uint32_t *addr, *tmp;
+ char buf[16];
+ int i;
+
+@@ -366,9 +366,12 @@ static inline int get_vps_ip_ioctl(vps_h
+ else if (ret <= veip.num)
+ break;
+ veip.num = ret;
+- addr = realloc(addr, veip.num * sizeof(*veip.ip));
+- if (addr == NULL)
+- return -1;
++ tmp = realloc(addr, veip.num * sizeof(*veip.ip));
++ if (tmp == NULL) {
++ ret = -1;
++ goto out;
++ }
++ addr = tmp;
+ }
+ if (ret > 0) {
+ for (i = ret - 1; i >= 0; i--) {
+Index: vzctl-3.0.11/src/lib/script.c
+===================================================================
+--- vzctl-3.0.11.orig/src/lib/script.c
++++ vzctl-3.0.11/src/lib/script.c
+@@ -42,7 +42,7 @@ static char *envp_bash[] = {"HOME=/", "T
+ int read_script(const char *fname, char *include, char **buf)
+ {
+ struct stat st;
+- char *p = NULL;
++ char *tmp, *p = NULL;
+ int fd, len = 0;
+ char *inc;
+
+@@ -74,9 +74,10 @@ int read_script(const char *fname, char
+ goto err;
+ }
+ if (*buf != NULL) {
+- *buf = realloc(*buf, st.st_size + len + 2);
+- if (*buf == NULL)
++ tmp = realloc(*buf, st.st_size + len + 2);
++ if (tmp == NULL)
+ goto err;
++ *buf = tmp;
+ p = *buf + len;
+ } else {
+ *buf = malloc(st.st_size + 2);
+Index: vzctl-3.0.11/src/vzlist.c
+===================================================================
+--- vzctl-3.0.11.orig/src/vzlist.c
++++ vzctl-3.0.11/src/vzlist.c
+@@ -581,11 +581,13 @@ void *x_malloc(int size)
+
+ void *x_realloc(void *ptr, int size)
+ {
+- if ((ptr = realloc(ptr, size)) == NULL) {
++ void *tmp;
++
++ if ((tmp = realloc(ptr, size)) == NULL) {
+ printf("Error: unable to allocate %d bytes\n", size);
+ exit(1);
+ }
+- return ptr;
++ return tmp;
+ }
+
+ void usage()
+@@ -1637,5 +1639,9 @@ int main(int argc, char **argv)
+ return ret;
+ print_ve();
+ free_veinfo();
++ if (host_pattern != NULL) free(host_pattern);
++ if (name_pattern != NULL) free(name_pattern);
++ if (f_order != NULL) free(f_order);
++
+ return 0;
+ }
diff --git a/vzctl/patches/3.0.11/025_all_off-by-one.patch b/vzctl/patches/3.0.11/025_all_off-by-one.patch
new file mode 100644
index 0000000..58e4de2
--- /dev/null
+++ b/vzctl/patches/3.0.11/025_all_off-by-one.patch
@@ -0,0 +1,23 @@
+From: Dmitry V. Levin <ldv@altlinux.org>
+Date: Fri, 25 Aug 2006 07:57:09 +0000 (+0400)
+Subject: vzctl enter: Fix off-by-one error which resulted to uninitialized PATH.
+X-Git-Url: http://git.openvz.org/?p=vzctl;a=commitdiff;h=24807ad04c47c4c799b9b7bb7188c07cdd9c31ca
+
+vzctl enter: Fix off-by-one error which resulted to uninitialized PATH.
+
+Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
+---
+
+Index: vzctl-3.0.11/src/enter.c
+===================================================================
+--- vzctl-3.0.11.orig/src/enter.c
++++ vzctl-3.0.11/src/enter.c
+@@ -265,7 +265,7 @@ int do_enter(vps_handler *h, envid_t vei
+ close(slave);
+ if ((term = getenv("TERM")) != NULL) {
+ snprintf(buf, sizeof(buf), "TERM=%s", term);
+- env[2] = buf;
++ env[3] = buf;
+ }
+ execve("/bin/bash", arg, env);
+ execve("/bin/sh", arg, env);
diff --git a/vzctl/patches/3.0.11/030_all_vzctl-sprintf-snprintf.patch b/vzctl/patches/3.0.11/030_all_vzctl-sprintf-snprintf.patch
new file mode 100644
index 0000000..eeac84c
--- /dev/null
+++ b/vzctl/patches/3.0.11/030_all_vzctl-sprintf-snprintf.patch
@@ -0,0 +1,107 @@
+From: Igor Sukhih <igor@openvz.org>
+Date: Tue, 22 Aug 2006 13:47:40 +0000 (+0400)
+Subject: Replace sprintf() -> snprintf() to avoid possible buffer overflow.
+X-Git-Url: http://git.openvz.org/?p=vzctl;a=commitdiff;h=134f49e8f03dd3f74a73d13cf32a612946c36505
+
+Replace sprintf() -> snprintf() to avoid possible buffer overflow.
+---
+
+Index: vzctl-3.0.11/src/vzlist.c
+===================================================================
+--- vzctl-3.0.11.orig/src/vzlist.c
++++ vzctl-3.0.11/src/vzlist.c
+@@ -48,6 +48,7 @@ static int n_veinfo = 0;
+
+ static char g_outbuffer[4096] = "";
+ static char *p_outbuffer = g_outbuffer;
++static char *e_buf = g_outbuffer + sizeof(g_outbuffer) - 1;
+ static char *host_pattern = NULL;
+ static char *name_pattern = NULL;
+ static int vzctlfd;
+@@ -90,29 +91,29 @@ static void print_ip(struct Cveinfo *p,
+ /* Print functions */
+ static void print_veid(struct Cveinfo *p, int index)
+ {
+- p_outbuffer += sprintf(p_outbuffer, "%10d", p->veid);
++ p_outbuffer += snprintf(p_outbuffer, e_buf - p_outbuffer, "%10d", p->veid);
+ }
+
+ static void print_status(struct Cveinfo *p, int index)
+ {
+- p_outbuffer += sprintf(p_outbuffer, "%-7s", ve_status[p->status]);
++ p_outbuffer += snprintf(p_outbuffer, e_buf - p_outbuffer, "%-7s", ve_status[p->status]);
+ }
+
+ static void print_laverage(struct Cveinfo *p, int index)
+ {
+ if (p->la == NULL)
+- p_outbuffer += sprintf(p_outbuffer, "%14s", "-");
++ p_outbuffer += snprintf(p_outbuffer, e_buf - p_outbuffer, "%14s", "-");
+ else
+- p_outbuffer += sprintf(p_outbuffer, "%1.2f/%1.2f/%1.2f",
++ p_outbuffer += snprintf(p_outbuffer, e_buf - p_outbuffer, "%1.2f/%1.2f/%1.2f",
+ p->la->la[0], p->la->la[1], p->la->la[2]);
+ }
+
+ static void print_cpulimit(struct Cveinfo *p, int index)
+ {
+ if (p->cpu == NULL)
+- p_outbuffer += sprintf(p_outbuffer, "%7s", "-");
++ p_outbuffer += snprintf(p_outbuffer, e_buf - p_outbuffer, "%7s", "-");
+ else
+- p_outbuffer += sprintf(p_outbuffer, "%7lu",
++ p_outbuffer += snprintf(p_outbuffer, e_buf - p_outbuffer, "%7lu",
+ p->cpu->limit[index]);
+ }
+
+@@ -122,9 +123,9 @@ static void fn(struct Cveinfo *p, int in
+ if (p->res == NULL || \
+ (p->status != VE_RUNNING && \
+ (index == 0 || index == 1 || index == 4))) \
+- p_outbuffer += sprintf(p_outbuffer, "%10s", "-"); \
++ p_outbuffer += snprintf(p_outbuffer, e_buf - p_outbuffer, "%10s", "-"); \
+ else \
+- p_outbuffer += sprintf(p_outbuffer, "%10lu", \
++ p_outbuffer += snprintf(p_outbuffer, e_buf - p_outbuffer, "%10lu", \
+ p->res->name[index]); \
+ } \
+
+@@ -154,9 +155,9 @@ static void fn(struct Cveinfo *p, int in
+ { \
+ if (p->res == NULL || \
+ (p->status != VE_RUNNING && (index == 0))) \
+- p_outbuffer += sprintf(p_outbuffer, "%10s", "-"); \
++ p_outbuffer += snprintf(p_outbuffer, e_buf - p_outbuffer, "%10s", "-"); \
+ else \
+- p_outbuffer += sprintf(p_outbuffer, "%10lu", \
++ p_outbuffer += snprintf(p_outbuffer, e_buf - p_outbuffer, "%10lu", \
+ p->res->name[index]); \
+ } \
+
+@@ -519,7 +520,7 @@ static void print_hostname(struct Cveinf
+
+ if (p->hostname != NULL)
+ str = p->hostname;
+- r = sprintf(p_outbuffer, "%-32s", str);
++ r = snprintf(p_outbuffer, e_buf - p_outbuffer, "%-32s", str);
+ if (last_field != NULL &&
+ field_names[last_field->order].res_type != RES_HOSTNAME)
+ {
+@@ -535,7 +536,7 @@ static void print_name(struct Cveinfo *p
+
+ if (p->name != NULL)
+ str = p->name;
+- r = sprintf(p_outbuffer, "%-32s", str);
++ r = snprintf(p_outbuffer, e_buf - p_outbuffer, "%-32s", str);
+ if (last_field != NULL &&
+ field_names[last_field->order].res_type != RES_NAME)
+ {
+@@ -559,7 +560,7 @@ static void print_ip(struct Cveinfo *p,
+ if ((ch = strchr(str, ' ')) != NULL)
+ *ch = 0;
+ }
+- r = sprintf(p_outbuffer, "%-15s", str);
++ r = snprintf(p_outbuffer, e_buf - p_outbuffer, "%-15s", str);
+ if (last_field != NULL &&
+ field_names[last_field->order].res_type != RES_IP)
+ {
diff --git a/vzctl/patches/3.0.11/035_all_remove-vename-on-destroy.patch b/vzctl/patches/3.0.11/035_all_remove-vename-on-destroy.patch
new file mode 100644
index 0000000..edb958b
--- /dev/null
+++ b/vzctl/patches/3.0.11/035_all_remove-vename-on-destroy.patch
@@ -0,0 +1,35 @@
+From: Igor Sukhih <igor@openvz.org>
+Date: Tue, 22 Aug 2006 13:40:41 +0000 (+0400)
+Subject: Remove VE name information on destroy
+X-Git-Url: http://git.openvz.org/?p=vzctl;a=commitdiff;h=57f3c25ff637984a467936aec2cab1d849bfde49
+
+Remove VE name information on destroy
+
+http://bugzilla.openvz.org/show_bug.cgi?id=236
+---
+
+Index: vzctl-3.0.11/src/vzctl-actions.c
+===================================================================
+--- vzctl-3.0.11.orig/src/vzctl-actions.c
++++ vzctl-3.0.11/src/vzctl-actions.c
+@@ -222,7 +222,19 @@ static int create(vps_handler *h, envid_
+ static int destroy(vps_handler *h, envid_t veid, vps_param *g_p,
+ vps_param *cmd_p)
+ {
+- return vps_destroy(h, veid, &g_p->res.fs);
++ int ret, id;
++ char buf[STR_SIZE];
++ char *name = g_p->res.name.name;
++
++ ret = vps_destroy(h, veid, &g_p->res.fs);
++ if (!ret && name != NULL) {
++ id = get_veid_by_name(name);
++ if (id == veid) {
++ snprintf(buf, sizeof(buf), VENAME_DIR "/%s.conf", name);
++ unlink(buf);
++ }
++ }
++ return ret;
+ }
+
+ static int parse_chkpnt_opt(int argc, char **argv, vps_param *vps_p)
diff --git a/vzctl/patches/3.0.11/040_all_segfault-long-opts.patch b/vzctl/patches/3.0.11/040_all_segfault-long-opts.patch
new file mode 100644
index 0000000..783396e
--- /dev/null
+++ b/vzctl/patches/3.0.11/040_all_segfault-long-opts.patch
@@ -0,0 +1,25 @@
+From: Dmitry V. Levin <ldv@altlinux.org>
+Date: Fri, 25 Aug 2006 07:59:19 +0000 (+0400)
+Subject: arpsend: Fix segfault when parsing long options
+X-Git-Url: http://git.openvz.org/?p=vzctl;a=commitdiff;h=8ae927daa4a5c391e02bf15db02fde1ec92365f5
+
+arpsend: Fix segfault when parsing long options
+parse_options(): NULL-terminate long_options array.
+
+Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
+---
+
+Index: vzctl-3.0.11/src/arpsend.c
+===================================================================
+--- vzctl-3.0.11.orig/src/arpsend.c
++++ vzctl-3.0.11/src/arpsend.c
+@@ -165,7 +165,8 @@ void parse_options (int argc, char **arg
+ {"trg-arp", 1, NULL, 'T'},
+ {"src-ip", 1, NULL, 'i'},
+ {"trg-ip", 1, NULL, 'e'},
+- {"at-once", 0, NULL, 'o'}
++ {"at-once", 0, NULL, 'o'},
++ {NULL, 0, NULL, 0}
+ };
+
+ while ((c = getopt_long(argc, argv, short_options, long_options, NULL)) != -1)
diff --git a/vzctl/patches/3.0.11/045_all_vzctl-enter-exit-msg.patch b/vzctl/patches/3.0.11/045_all_vzctl-enter-exit-msg.patch
new file mode 100644
index 0000000..4b8cf44
--- /dev/null
+++ b/vzctl/patches/3.0.11/045_all_vzctl-enter-exit-msg.patch
@@ -0,0 +1,26 @@
+From: Igor Sukhih <igor@openvz.org>
+Date: Fri, 25 Aug 2006 07:55:33 +0000 (+0400)
+Subject: vzctl enter: fixed print exit message.
+X-Git-Url: http://git.openvz.org/?p=vzctl;a=commitdiff;h=7b115e65ffce24039253b3cf14cf3021c18048cd
+
+vzctl enter: fixed print exit message.
+Extra \n was printed.
+---
+
+Index: vzctl-3.0.11/src/enter.c
+===================================================================
+--- vzctl-3.0.11.orig/src/enter.c
++++ vzctl-3.0.11/src/enter.c
+@@ -303,10 +303,10 @@ err:
+ if (errno != EINTR)
+ break;
+ if (WIFSIGNALED(status))
+- logger(0, 0, "got signal %d", WTERMSIG(status));
++ fprintf(stdout, "got signal %d\n", WTERMSIG(status));
+ if (!ret) {
+ raw_off();
+- logger(0, 0, "exited from VPS %d\n", veid);
++ fprintf(stdout, "exited from VPS %d\n", veid);
+ }
+ close(in[1]); close(out[0]);
+ return 0;
diff --git a/vzctl/patches/3.0.11/050_all_vzctl-enter-forward-msg-from-child.patch b/vzctl/patches/3.0.11/050_all_vzctl-enter-forward-msg-from-child.patch
new file mode 100644
index 0000000..ee8bd6f
--- /dev/null
+++ b/vzctl/patches/3.0.11/050_all_vzctl-enter-forward-msg-from-child.patch
@@ -0,0 +1,38 @@
+From: Dmitry V. Levin <ldv@altlinux.org>
+Date: Fri, 25 Aug 2006 07:42:05 +0000 (+0400)
+Subject: vzctl enter: Forward error messages from child process
+X-Git-Url: http://git.openvz.org/?p=vzctl;a=commitdiff;h=52b79699c9e5f7b9f3bebd6141395c374b80e22a
+
+vzctl enter: Forward error messages from child process
+vzctl: do_enter():
+ - In child, redirect stdout and stderr to pipe.
+ - In parent, read child's output from pipe even if enter failed.
+
+Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
+---
+
+Index: vzctl-3.0.11/src/enter.c
+===================================================================
+--- vzctl-3.0.11.orig/src/enter.c
++++ vzctl-3.0.11/src/enter.c
+@@ -231,6 +231,8 @@ int do_enter(vps_handler *h, envid_t vei
+ close(in[1]); close(out[0]); close(st[0]);
+ /* list of skipped fds -1 the end mark */
+ close_fds(1, in[0], out[1], st[1], h->vzfd, -1);
++ dup2(out[1], 1);
++ dup2(out[1], 2);
+ if ((ret = vz_chroot(root)))
+ goto err;
+ ret = vz_env_create_ioctl(h, veid, VE_ENTER);
+@@ -297,7 +299,10 @@ err:
+ raw_on();
+ e_loop(fileno(stdin), in[1], out[0], fileno(stdout));
+ } else {
+- fprintf(stdout, "enter failed\n");
++ fprintf(stdout, "enter into VPS %d failed\n", veid);
++ set_not_blk(out[0]);
++ while (stdredir(out[0], fileno(stdout)) == 0)
++ ;
+ }
+ while ((waitpid(pid, &status, 0)) == -1)
+ if (errno != EINTR)
diff --git a/vzctl/patches/3.0.11/200_all_incorrect-spelling.patch b/vzctl/patches/3.0.11/200_all_incorrect-spelling.patch
new file mode 100644
index 0000000..f6c6738
--- /dev/null
+++ b/vzctl/patches/3.0.11/200_all_incorrect-spelling.patch
@@ -0,0 +1,76 @@
+From: Kirill Korotaev <dev@openvz.org>
+Date: Tue, 22 Aug 2006 10:29:52 +0000 (+0400)
+Subject: Fix misprints in distro scripts
+X-Git-Url: http://git.openvz.org/?p=vzctl;a=commitdiff;h=6b349c3d3adea85c73452d269a8278d86a35795f
+
+Fix misprints in distro scripts
+text misprints fixes.
+
+http://bugzilla.openvz.org/show_bug.cgi?id=228
+---
+
+Index: vzctl-3.0.11/etc/dists/scripts/debian-add_ip.sh
+===================================================================
+--- vzctl-3.0.11.orig/etc/dists/scripts/debian-add_ip.sh
++++ vzctl-3.0.11/etc/dists/scripts/debian-add_ip.sh
+@@ -25,7 +25,7 @@
+ # Optional parameters:
+ # VE_STATE - state of VE; could be one of:
+ # starting | stopping | running | stopped
+-# IPDELALL - deleet all ip addresse
++# IPDELALL - delete all ip addresses
+ #
+ VENET_DEV=venet0
+ LOOPBACK=lo
+Index: vzctl-3.0.11/etc/dists/scripts/redhat-del_ip.sh
+===================================================================
+--- vzctl-3.0.11.orig/etc/dists/scripts/redhat-del_ip.sh
++++ vzctl-3.0.11/etc/dists/scripts/redhat-del_ip.sh
+@@ -22,7 +22,7 @@
+ # Required parameters:
+ # IP_ADDR - IPs to delete, several addresses should be divided by space
+ # Optional parameters:
+-# IPDELALL - deleet all ip addresses
++# IPDELALL - delete all ip addresses
+ VENET_DEV=venet0
+ VENET_DEV_CFG=ifcfg-${VENET_DEV}
+ IFCFG_DIR=/etc/sysconfig/network-scripts/
+Index: vzctl-3.0.11/etc/dists/scripts/slackware-9.x_del_ip.sh
+===================================================================
+--- vzctl-3.0.11.orig/etc/dists/scripts/slackware-9.x_del_ip.sh
++++ vzctl-3.0.11/etc/dists/scripts/slackware-9.x_del_ip.sh
+@@ -22,7 +22,7 @@
+ # Required parameters:
+ # IP_ADDR - IPs to delete, several addresses should be divided by space
+ # Optional parameters:
+-# IPDELALL - deleet all ip addresses
++# IPDELALL - delete all ip addresses
+ IFCFG=/etc/rc.d/rc.inet1
+
+ function del_ip()
+Index: vzctl-3.0.11/etc/dists/scripts/slackware-del_ip.sh
+===================================================================
+--- vzctl-3.0.11.orig/etc/dists/scripts/slackware-del_ip.sh
++++ vzctl-3.0.11/etc/dists/scripts/slackware-del_ip.sh
+@@ -22,7 +22,7 @@
+ # Required parameters:
+ # IP_ADDR - IPs to delete, several addresses should be divided by space
+ # Optional parameters:
+-# IPDELALL - deleet all ip addresses
++# IPDELALL - delete all ip addresses
+ IFCFG=/etc/rc.d/rc.inet1.conf
+
+ function del_ip()
+Index: vzctl-3.0.11/etc/dists/scripts/suse-8.x_del_ip.sh
+===================================================================
+--- vzctl-3.0.11.orig/etc/dists/scripts/suse-8.x_del_ip.sh
++++ vzctl-3.0.11/etc/dists/scripts/suse-8.x_del_ip.sh
+@@ -22,7 +22,7 @@
+ # Required parameters:
+ # IP_ADDR - IPs to delete, several addresses should be divided by space
+ # Optional parameters:
+-# IPDELALL - deleet all ip addresses
++# IPDELALL - delete all ip addresses
+ VENET_DEV=venet0
+ VENET_DEV_CFG=ifcfg-${VENET_DEV}
+ IFCFG_DIR=/etc/sysconfig/network/
diff --git a/vzctl/patches/3.0.11/205_all_ve-light.conf-sample.patch b/vzctl/patches/3.0.11/205_all_ve-light.conf-sample.patch
new file mode 100644
index 0000000..2358576
--- /dev/null
+++ b/vzctl/patches/3.0.11/205_all_ve-light.conf-sample.patch
@@ -0,0 +1,27 @@
+From: Igor Sukhih <igor@openvz.org>
+Date: Tue, 22 Aug 2006 13:34:37 +0000 (+0400)
+Subject: Increase dgramrcvbuf and othersockbuf in ve-light.conf-sample
+X-Git-Url: http://git.openvz.org/?p=vzctl;a=commitdiff;h=5478976ff1f979e52dec140df556d1df7f2790de
+
+Increase dgramrcvbuf and othersockbuf in ve-light.conf-sample
+ve-light.conf-sample is too much light,
+so that vzcfgvalidate recommends to increase the limits.
+
+http://bugzilla.openvz.org/show_bug.cgi?id=234
+---
+
+Index: vzctl-3.0.11/etc/ve-light.conf-sample
+===================================================================
+--- vzctl-3.0.11.orig/etc/ve-light.conf-sample
++++ vzctl-3.0.11/etc/ve-light.conf-sample
+@@ -28,8 +28,8 @@ VMGUARPAGES="1725:2147483647"
+ KMEMSIZE="1740800:1847296"
+ TCPSNDBUF="159744:262144"
+ TCPRCVBUF="159744:262144"
+-OTHERSOCKBUF="61440:163840"
+-DGRAMRCVBUF="32768:32768"
++OTHERSOCKBUF="135168:196608"
++DGRAMRCVBUF="135168:196608"
+ OOMGUARPAGES="1725:2147483647"
+ # Auxiliary parameters
+ LOCKEDPAGES="4:4"
diff --git a/vzctl/patches/3.0.11/210_all_vzctl-3.0.11-vzctl.8.patch b/vzctl/patches/3.0.11/210_all_vzctl-3.0.11-vzctl.8.patch
new file mode 100644
index 0000000..12a2f79
--- /dev/null
+++ b/vzctl/patches/3.0.11/210_all_vzctl-3.0.11-vzctl.8.patch
@@ -0,0 +1,22 @@
+From: Igor Sukhih <igor@openvz.org>
+Date: Tue, 22 Aug 2006 13:41:19 +0000 (+0400)
+Subject: Added --name description to vzctl.8
+X-Git-Url: http://git.openvz.org/?p=vzctl;a=commitdiff;h=0c4d2abe1f18993fc871e19af62f90651a56ac7e
+
+Added --name description to vzctl.8
+---
+
+Index: vzctl-3.0.11/man/vzctl.8
+===================================================================
+--- vzctl-3.0.11.orig/man/vzctl.8
++++ vzctl-3.0.11/man/vzctl.8
+@@ -66,6 +66,9 @@ Note that VPS area should be created bef
+ \fB--disabled\fR \fIyes\fR|\fIno\fR
+ Disable VPS start. For force start disabled VPS option \fI--force\fR can be used.
+ .TP
++\fB--name\fR \fIname\fR
++Bind VE with \fIname\fR that name can be used for VE actions insted of \fIveid\fR.
++.TP
+ \fBNetwork related parameters\fR
+ .TP
+ \fB--ipadd\fR \fIaddr\fR
diff --git a/vzctl/patches/3.0.11/215_all_vzmigrate-mawk.patch b/vzctl/patches/3.0.11/215_all_vzmigrate-mawk.patch
new file mode 100644
index 0000000..cdb0225
--- /dev/null
+++ b/vzctl/patches/3.0.11/215_all_vzmigrate-mawk.patch
@@ -0,0 +1,25 @@
+From: Kirill Korotaev <dev@openvz.org>
+Date: Tue, 22 Aug 2006 10:34:04 +0000 (+0400)
+Subject: Fix vzmigrate to work with mawk (not gawk only)
+X-Git-Url: http://git.openvz.org/?p=vzctl;a=commitdiff;h=ca21ee121297cd2e230895078fd3153230e37794
+
+Fix vzmigrate to work with mawk (not gawk only)
+http://bugzilla.openvz.org/show_bug.cgi?id=231
+
+Signed-Off-By: Thorsten Schifferdecker <tsd@debian.systs.org>
+Signed-Off-By: Kirill Korotaev <dev@openvz.org>
+---
+
+Index: vzctl-3.0.11/vzmigrate
+===================================================================
+--- vzctl-3.0.11.orig/vzmigrate
++++ vzctl-3.0.11/vzmigrate
+@@ -375,7 +375,7 @@ fi
+
+ log 1 "Syncing private"
+ if ! rsync -aH --progress "$VE_PRIVATE" "root@$host:${VE_PRIVATE%/*}" | \
+- grep "% of" | awk --assign ORS="\r" '{print $10}'; then
++ grep "% of" | awk -v ORS="\r" '{print $10}'; then
+ log 1 "Failed to sync VPS private areas"
+ undo_quota_on
+ exit $MIG_ERR_COPY