getty: if we cannot execute /bin/login, try sulogin before /bin/sh

Basic security measure, don't bail to shell if we cannot find/exec
login, instead try sulogin before falling back to plain shell.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2021-05-30 12:42:48 +02:00
parent 654f8aeb19
commit 9cc9e3ddbb
3 changed files with 12 additions and 6 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ endif
finit_pkglibdir = $(pkglibdir)
finit_pkglib_SCRIPTS = rescue.conf sample.conf
getty_SOURCES = getty.c helpers.h logrotate.c stty.c utmp-api.c utmp-api.h
getty_SOURCES = finit.h getty.c helpers.h logrotate.c stty.c utmp-api.c utmp-api.h
getty_CFLAGS = -W -Wall -Wextra -std=gnu99
getty_CFLAGS += $(lite_CFLAGS)
getty_LDADD = $(lite_LIBS)