pty: use /bin/login by default
kmscon does always pass a proper argv array so the default is never used. However, for security reasons we shouldn't hardcode /bin/login. If some other program uses the pty layer and forgets to pass in a suitable argv all the time, they mind end up with opening a root shell. Hence, use /bin/login as default. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
parent
978b869e8b
commit
b78244e1ab
@ -201,7 +201,7 @@ exec_child(const char *term, char **argv, const char *seat)
|
|||||||
if (!term)
|
if (!term)
|
||||||
term = "vt220";
|
term = "vt220";
|
||||||
if (!argv)
|
if (!argv)
|
||||||
argv = (char*[]){ "/bin/sh", "-l", NULL };
|
argv = (char*[]){ "/bin/login", NULL };
|
||||||
|
|
||||||
setenv("TERM", term, 1);
|
setenv("TERM", term, 1);
|
||||||
if (seat)
|
if (seat)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user