[Devel] [PATCH] vzctl enter: Really add PATH to shell environment

Dmitry V. Levin ldv at altlinux.org
Thu Aug 24 15:00:01 PDT 2006


vzctl: do_enter(): Fix off-by-one error which resulted to uninitialized PATH.

Signed-off-by: Dmitry V. Levin <ldv at altlinux.org>
---
 src/enter.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/enter.c b/src/enter.c
index 69cdd02..0117ef7 100644
--- a/src/enter.c
+++ b/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);
-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.openvz.org/pipermail/devel/attachments/20060825/572b4383/attachment-0001.sig>


More information about the Devel mailing list