qrexec: start process in a login shell
Prepend "-" to shell name, to instruct it being a login shell. This way shell will initialize environment, load /etc/profile etc. Fixes QubesOS/qubes-issues#2903
This commit is contained in:
parent
22f74641da
commit
89cb419d9c
@ -211,7 +211,7 @@ void do_exec(const char *cmd)
|
||||
setsid();
|
||||
/* This is a copy but don't care to free as we exec later anyways. */
|
||||
env = pam_getenvlist (pamh);
|
||||
execle("/bin/sh", "sh", "-c", realcmd, (char*)NULL, env);
|
||||
execle("/bin/sh", "-sh", "-c", realcmd, (char*)NULL, env);
|
||||
exit(127);
|
||||
default:
|
||||
/* parent */
|
||||
|
Loading…
Reference in New Issue
Block a user