Remove fallback to /bin/sh if no TTY is defined

If the user specifies no 'tty /dev/ttyN' in finit.conf this code
took upon itself to add a backdoor to the system.  Let's remove
it and rely on the operator deciding what is best practise.

With this patch no getty, or fallback shell, will be started if
no tty line in finit.conf is available.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2016-07-27 19:14:36 +02:00
parent 9416e14074
commit bfe9e011bd
+1 -19
View File
@@ -499,28 +499,10 @@ void conf_reload_dynamic(void)
int conf_parse_config(void)
{
int result;
username = strdup(DEFUSER);
hostname = strdup(DEFHOST);
result = parse_conf(FINIT_CONF);
if (!tty_num()) {
char *fallback = NULL;
if (console)
fallback = console;
else
fallback = strdup(FALLBACK_SHELL);
if (tty_register(fallback))
_pe("Failed registering fallback TTY");
if (!console)
free(fallback);
}
return result;
return parse_conf(FINIT_CONF);
}
/**