end-of-options

This commit is contained in:
Patrick Schleizer 2025-05-18 06:42:39 -04:00
parent d8feca1276
commit 601ea77b00
No known key found for this signature in database
GPG key ID: CB8D50BB77BB3C48

View file

@ -80,7 +80,7 @@ if [ "$PAM_USER" = 'sysmaint' ]; then
fi
fi
kernel_cmdline="$(cat /proc/cmdline)"
kernel_cmdline="$(cat -- /proc/cmdline)"
if [ "$PAM_USER" != 'sysmaint' ] \
&& [[ "${kernel_cmdline}" =~ 'boot-role=sysmaint' ]]; then
@ -93,7 +93,7 @@ fi
## Also this should only run for login since securetty covers only login.
# if [ "$PAM_USER" = "root" ]; then
# if [ -f /etc/securetty ]; then
# grep_result="$(grep "^[^#]" /etc/securetty)"
# grep_result="$(grep -- "^[^#]" /etc/securetty)"
# if [ "$grep_result" = "" ]; then
# printf '%s\n' "\
# $0: ERROR: Root login is disabled.