pam: ignore leading dash

PAM rules may have a leading '-' character to indicate that if the
module is missing, the error will be ignored, so let's ignore it in
the check.

Signed-off-by: Topi Miettinen <toiwoton@gmail.com>
This commit is contained in:
Topi Miettinen 2020-03-19 20:55:23 +02:00
parent 6d9ebe4136
commit 9087de0dac
No known key found for this signature in database
GPG Key ID: 87E1A51C590B0577
1 changed files with 1 additions and 1 deletions

View File

@ -96,7 +96,7 @@
PAM_CONTROL_OPTIONS="-"
PAM_MODULE="-"
PAM_MODULE_OPTIONS="-"
PAM_TYPE=$(echo ${LINE} | awk '{ print $1 }')
PAM_TYPE=$(echo ${LINE} | awk '{ print $1 }' | sed 's/^ *-//g')
PARSELINE=0
case ${PAM_TYPE} in
"@include")