Also, match the full path to the special nologin shell.

Previously, it would recognize it as a valid shell only
if the basename (nologin) was specified. Now, it will
recognize both the basename and the full path.

NOTE: The full path as adduser(8) understands it is /usr/sbin/nologin.
      There is a symlink, /sbin/nologin, but that's deprecated and
      only there for backwards compatibility.
This commit is contained in:
mtm 2004-08-28 14:32:10 +00:00
parent 044539800a
commit d4a1defb39

View File

@ -142,7 +142,8 @@ fullpath_from_shell() {
done
# /usr/sbin/nologin is a special case
if [ "$_shell" = "${NOLOGIN}" ]; then
if [ "$_shell" = "${NOLOGIN}" -o \
"$_shell" = "${NOLOGIN_PATH}" ]; then
echo ${NOLOGIN_PATH}
return 0;
fi