From b78244e1ab3b52c42aa439a80c82f81989338a6c Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Sun, 9 Dec 2012 18:33:03 +0100 Subject: [PATCH] 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 --- src/pty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pty.c b/src/pty.c index 799eb55..81c9b8a 100644 --- a/src/pty.c +++ b/src/pty.c @@ -201,7 +201,7 @@ exec_child(const char *term, char **argv, const char *seat) if (!term) term = "vt220"; if (!argv) - argv = (char*[]){ "/bin/sh", "-l", NULL }; + argv = (char*[]){ "/bin/login", NULL }; setenv("TERM", term, 1); if (seat)