From: "Daniel P. Berrange" <berrange(a)redhat.com>
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 <berrange(a)redhat.com>
---
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 0196950..758d1af 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);
--
1.8.3.1