From ba2956c03e2a97a0df4299bdf51c090341412bf6 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Sat, 27 Sep 2003 14:14:14 +0000 Subject: [PATCH] validate PAM_NAME_SUFFIX --- scripts/pam.prov | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/pam.prov b/scripts/pam.prov index fcaf7a3..fcd75ec 100755 --- a/scripts/pam.prov +++ b/scripts/pam.prov @@ -25,4 +25,9 @@ file="$1" head -1 "$file" |grep -qs '^#%PAM' || exit 0 +if [ -n "$PAM_NAME_SUFFIX" -a -z "${PAM_NAME_SUFFIX##%*}" ]; then + echo "error: PAM_NAME_SUFFIX=$PAM_NAME_SUFFIX" >&2 + exit 1 +fi + echo "pam$PAM_NAME_SUFFIX(${file##*/})"