summaryrefslogtreecommitdiff
blob: 58e4de2bd45dc8d141e3d3275f40bb16db6c5979 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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);