main: fix the case where user has "halt" as login shell. Closes 9986

halt::0:0::/:/sbin/halt

function                                             old     new   delta
run_applet_and_exit                                  748     751      +3
run_applet_no_and_exit                               467     459      -8

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2017-07-07 19:08:56 +02:00
parent b0c0b6d5ba
commit 69a5ec9dcc
5 changed files with 11 additions and 7 deletions

View File

@ -180,7 +180,7 @@ int FAST_FUNC spawn_and_wait(char **argv)
* as of yet (and that should probably always stay true).
*/
/* xfunc_error_retval and applet_name are init by: */
run_applet_no_and_exit(a, argv);
run_applet_no_and_exit(a, argv[0], argv);
}
# endif
}