kmscon: use /bin/login -p as default login program
We must pass "-p" to make "login" preserve the environment. We make sure the environment is correctly reset before calling it so it is safe. Furthermore, this allows us to pass additional environment variables to the child without having /bin/login reset it. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
parent
24fe3f1911
commit
5a33f412d9
@ -224,7 +224,7 @@
|
||||
after all options have been parsed is used as argument to this
|
||||
option. Note that nothing after two dashes <option>--</option>
|
||||
is parsed as regular option by kmscon.
|
||||
(default: /bin/login)</para>
|
||||
(default: /bin/login -p)</para>
|
||||
|
||||
<para>This example starts '/bin/bash -i' on each new terminal session:
|
||||
./kmscon --login --debug --no-switchvt -- /bin/bash -i</para>
|
||||
|
@ -82,7 +82,7 @@ static void print_help()
|
||||
"\t --cdev-session [off] Enable kernel VT emulation session\n"
|
||||
"\n"
|
||||
"Terminal Options:\n"
|
||||
"\t-l, --login [/bin/sh]\n"
|
||||
"\t-l, --login [/bin/login -p]\n"
|
||||
"\t Start the given login process instead\n"
|
||||
"\t of the default process; all arguments\n"
|
||||
"\t following '--' will be be parsed as\n"
|
||||
@ -230,7 +230,7 @@ static const struct conf_type conf_vt = {
|
||||
* special handling that the command-line does.
|
||||
*/
|
||||
|
||||
static char *def_argv[] = { "/bin/login", NULL };
|
||||
static char *def_argv[] = { "/bin/login", "-p", NULL };
|
||||
|
||||
static void conf_default_login(struct conf_option *opt)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user