X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage2%2Fcis-pam;h=e65418e91f614a5448aadbacf890a58fd3a4f951;hb=425bbc4fed1d0106b78befe474328fb9f5a15334;hp=af7d2b8ed777f42bff85dca0d1c84e60ee190104;hpb=16cc35ba4890382ee9368a176e4f5a7fa773b7a6;p=hvlinux.git diff --git a/stage2/cis-pam b/stage2/cis-pam index af7d2b8..e65418e 100755 --- a/stage2/cis-pam +++ b/stage2/cis-pam @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name # Reading system configuration informations, functions and package versions. @@ -7,32 +9,35 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -cd ${LFS_TMP}/${1}-build && +cd ${LFS_TMP}/${1}-build +# --libdir=/lib +# Necessary to prevent PAM from instaling into /lib64 ../${1}/configure \ --libdir=/lib \ --sbindir=/lib/security \ - --enable-securedir=/lib/security \ --docdir=/usr/share/doc/${1} \ - --enable-read-both-confs && -make -j ${MAKEJOBS} && -make install && + --enable-read-both-confs +make -j ${MAKEJOBS} +make install + +chmod -v 4755 /lib/security/unix_chkpwd + +mv -v /lib/security/pam_tally /sbin -chmod -v 4755 /lib/security/unix_chkpwd && -mv -v /lib/security/pam_tally /sbin && -mv -v /lib/libpam{,c,_misc}.la /usr/lib && -sed -i 's| /lib| /usr/lib|' /usr/lib/libpam_misc.la && +mv -v /lib/libpam{,c,_misc}.la /usr/lib +sed -i 's| /lib| /usr/lib|' /usr/lib/libpam_misc.la if [ -L /lib/libpam.so ]; then for LINK in libpam{,c,_misc}.so; do - ln -v -sf ../../lib/$(readlink /lib/${LINK}) /usr/lib/${LINK} && + ln -svfT ../../lib/$(readlink /lib/${LINK}) /usr/lib/${LINK} rm -v /lib/${LINK} done -fi && +fi -mkdir -p /etc/pam.d && -cat > /etc/pam.d/other << EOF && +mkdir -p /etc/pam.d +cat > /etc/pam.d/other << EOF # /etc/pam.d/other auth required pam_unix.so nullok @@ -50,5 +55,4 @@ other session required pam_unix.so other password required pam_unix.so nullok EOF -# Return last error exit $?