12 IFS
=: read username password uid pri_gid gecos home shell
<<<"$(getent passwd "$PAM_USER")"
13 shell_basename
=`basename "$shell"`
17 arg
=${arg//%PAM_RHOST%/$PAM_RHOST}
18 arg
=${arg//%PAM_RUSER%/$PAM_RUSER}
19 arg
=${arg//%PAM_SERVICE%/$PAM_SERVICE}
20 arg
=${arg//%PAM_TTY%/$PAM_TTY}
21 arg
=${arg//%PAM_USER%/$PAM_USER}
22 arg
=${arg//%PAM_TYPE%/$PAM_TYPE}
24 arg
=${arg//%UID%/$uid}
25 arg
=${arg//%PRI_GID%/$pri_gid}
26 arg
=${arg//%HOME%/$home}
27 arg
=${arg//%SHELL%/$shell}
28 arg
=${arg//%SHELL_BASENAME%/$shell_basename}
46 [ ".$1" = .
--on ] && patt
="on|yes|true|1" || patt
="off|no|false|0"
47 head -n 1 "$2" |
grep -Eiqx '\s*'"$patt"'\s*'
48 if [ ${PIPESTATUS[1]} = 0 ]
57 echo "pam_shelltest: Invalid parameter: $1" >&2
67 if [ ${#testargv[@]} -gt 0 ]
73 1) exit $PAM_PERM_DENIED
75 *) exit $PAM_SYSTEM_ERR