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 <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrange 2013-10-09 11:19:52 +01:00
parent 3e2f27e13b
commit d665003da1

View File

@ -212,6 +212,8 @@ main(int argc, char **argv)
return EXIT_FAILURE;
}
setenv("PATH", "/bin:/usr/bin", 1);
virSetErrorFunc(NULL, NULL);
virSetErrorLogPriorityFunc(NULL);