| 0:4c5b8d1c234a | 1:f8317b099cbb |
|---|---|
| 30 Distribution: OpenPKG Community | 30 Distribution: OpenPKG Community |
| 31 Class: BASE | 31 Class: BASE |
| 32 Group: Meta | 32 Group: Meta |
| 33 License: PD | 33 License: PD |
| 34 Version: 0 | 34 Version: 0 |
| 35 Release: 20110219 | 35 Release: 20120800 |
| 36 | 36 |
| 37 # list of sources | 37 # list of sources |
| 38 Source0: pamtool | 38 Source0: pamtool |
| 39 Source1: rc.pam | 39 Source1: rc.pam |
| 40 | 40 |
| 59 pam_incdir="" | 59 pam_incdir="" |
| 60 pam_libdir="" | 60 pam_libdir="" |
| 61 | 61 |
| 62 # search for configuration location | 62 # search for configuration location |
| 63 for cfgloc in \ | 63 for cfgloc in \ |
| 64 /etc/pam.d/other \ | |
| 64 /etc/pam.d \ | 65 /etc/pam.d \ |
| 65 /etc/pam.conf \ | 66 /etc/pam.conf \ |
| 66 ; do | 67 ; do |
| 67 if [ -f $cfgloc -o -d $cfgloc ]; then | 68 if [ -f $cfgloc -o -d $cfgloc ]; then |
| 68 pam_cfgloc="$cfgloc" | 69 pam_cfgloc="$cfgloc" |
| 73 # search for module prefix | 74 # search for module prefix |
| 74 if [ -d $pam_cfgloc ]; then | 75 if [ -d $pam_cfgloc ]; then |
| 75 mod=`cat $pam_cfgloc/* 2>/dev/null | grep -i '^#*[ ]*other' | head -1 | awk '{ print $3; }'` | 76 mod=`cat $pam_cfgloc/* 2>/dev/null | grep -i '^#*[ ]*other' | head -1 | awk '{ print $3; }'` |
| 76 elif [ -f $pam_cfgloc ]; then | 77 elif [ -f $pam_cfgloc ]; then |
| 77 mod=`cat $pam_cfgloc 2>/dev/null | grep -i '^#*[ ]*other' | head -1 | awk '{ print $4; }'` | 78 mod=`cat $pam_cfgloc 2>/dev/null | grep -i '^#*[ ]*other' | head -1 | awk '{ print $4; }'` |
| 79 if [ ".$mod" = . ]; then \ | |
| 80 mod=`cat $pam_cfgloc 2>/dev/null | grep -i '^#*[ ]*auth' | head -1 | awk '{ print $3; }'` | |
| 81 fi | |
| 78 else | 82 else |
| 79 mod="" | 83 mod="" |
| 80 fi | 84 fi |
| 81 case $mod in | 85 case $mod in |
| 82 pam_* ) pam_modpfx="" ;; | 86 pam_* ) pam_modpfx="" ;; |
| 96 done | 100 done |
| 97 | 101 |
| 98 # search for library directory | 102 # search for library directory |
| 99 for libdir in \ | 103 for libdir in \ |
| 100 /lib \ | 104 /lib \ |
| 105 /lib64 \ | |
| 101 /usr/lib \ | 106 /usr/lib \ |
| 107 /usr/lib64 \ | |
| 102 /usr/local/lib \ | 108 /usr/local/lib \ |
| 109 /usr/local/lib64 \ | |
| 103 /opt/lib \ | 110 /opt/lib \ |
| 111 /opt/lib64 \ | |
| 104 ; do | 112 ; do |
| 105 for ext in a so sl so.0; do | 113 for ext in a so sl so.0; do |
| 106 if [ -f "$libdir/libpam.$ext" ]; then | 114 if [ -f "$libdir/libpam.$ext" ]; then |
| 107 pam_libdir="$libdir" | 115 pam_libdir="$libdir" |
| 108 break | 116 break |