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:
Mike Makonnen 2004-08-28 14:32:10 +00:00
parent 90fcc4b33b
commit a53b524bb4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=134440

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