1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/pam/pam.conf
3 # Copyright (C) 2004 - 2021 The T2 SDE Project
4 # Copyright (C) 1998 - 2003 ROCK Linux Project
6 # This Copyright note is generated by scripts/Create-CopyPatch,
7 # more information can be found in the files COPYING and README.
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License version 2.
11 # --- T2-COPYRIGHT-NOTE-END ---
13 # pam/w3c needs temporary disc space
14 atstage native || export HOME=/tmp
16 # Install PAM libs in /lib so they are
17 # also available if /usr is not mounted.
19 libdir="/${libdir##*/}"
20 includedir="/$prefix/include/security"
22 var_append extraconfopt " " "--enable-dbm"
24 # checking for prelude support
25 # pam is able to act as prelude sensor since version 0.79
26 if [ $stagelevel -ge 5 ] && pkginstalled libprelude; then
27 pkgprefix -t libprelude
28 var_append extraconfopt " " "--enable-prelude"
29 var_append CFLAGS ' ' "-I$( pkgprefix includedir libprelude )"
30 var_append LDFLAGS ' ' "-L$( pkgprefix libdir libprelude )"
33 var_append extraconfopt " " "--disable-prelude"
36 # Install default pam.d/* files (without them,
37 # nobody can log in on the system.. ;-)
39 install_pam_configs() {
40 mkdir -p $root/etc/pam.d
41 for x in $confdir/etc_pamd_*.txt; do
42 file="`echo $x | sed -e 's,.*etc_pamd_,/etc/pam.d/,' -e s,.txt,,`"
43 if [ ! -f $root$file ]; then
50 hook_add postmake 5 "install_pam_configs"
52 # Outch: --disable-debug enables debugging...
54 var_remove confopt " " "--disable-debug"
57 # Install documentation
58 (cd $root$docdir; tar -v $taropt `match_source_file -p '.*doc.*'`)
60 # Allow unprivileged processes to check against passwords e.g. screen lockers
61 chgrp shadow $root/$prefix/sbin/unix_chkpwd \
62 && chmod g+s $root/$prefix/sbin/unix_chkpwd
64 hook_add postmake 5 "pam_postmake"