From d665003da1359410bc4036895a648a7d7256ddaa Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Wed, 9 Oct 2013 11:19:52 +0100 Subject: [PATCH] Set a sane $PATH for virt-login-shell The virt-login-shell binary shouldn't need to execute programs relying on $PATH, but just in case set a fixed $PATH value of /bin:/usr/bin Signed-off-by: Daniel P. Berrange --- tools/virt-login-shell.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/virt-login-shell.c b/tools/virt-login-shell.c index 01969506c2..758d1af17f 100644 --- a/tools/virt-login-shell.c +++ b/tools/virt-login-shell.c @@ -212,6 +212,8 @@ main(int argc, char **argv) return EXIT_FAILURE; } + setenv("PATH", "/bin:/usr/bin", 1); + virSetErrorFunc(NULL, NULL); virSetErrorLogPriorityFunc(NULL); -- GitLab