validate PAM_NAME_SUFFIX

This commit is contained in:
Дмитрий Левин 2003-09-27 14:14:14 +00:00
parent f76fa704b4
commit ba2956c03e

View File

@ -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##*/})"