vzctl exec: fix argv[0] for sh case
vzctl exec doesn't work for a container that use busybox as a shell.
This is because busybox relies on argv[0] as an 'applet' name and
obviously there is no 'bash' applet in it.
Fix is to change argv[0] accordingly before trying to execute /bin/sh.
Unfortunately we have to remove 'const' qualifier for argv, but it looks like
nobody is relying on it being constant.
Same fix for 'vzctl enter' is in commit d091eff2e25b7ea6729d77048188cd9affd1cc9c
Bug reported by Floris Bos <openvz-bug@maxnet.eu>
http://bugzilla.openvz.org/1314
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
2 files changed