From: Peter Avalos Date: Sat, 24 Jan 2009 21:21:20 +0000 (-0500) Subject: Automatically install required missing pam configurations in upgrade. X-Git-Tag: v2.3.0~16^2 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/8424467a03e42b42f2e4fb15bdc8cccb301aa1da Automatically install required missing pam configurations in upgrade. Additionally, warn users that the config files may be out-of-date. 99% of the time, it's probably best for the user to just do the make install in etc/pam.d to install the default configuration files. Reviewed-by: dillon --- diff --git a/etc/Makefile b/etc/Makefile index d42f7523a5..67921e8d8d 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -176,11 +176,10 @@ upgrade_etc: preupgrade remove-obsolete-files cd ${UPGRADE_SRCDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 Makefile.usr ${DESTDIR}/usr/Makefile .if !exists(${DESTDIR}/etc/pam.d) mkdir -p ${DESTDIR}/etc/pam.d - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${UPGRADE_SRCDIR}/pam.d/README ${DESTDIR}/etc/pam.d - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${UPGRADE_SRCDIR}/pam.d/convert.sh ${DESTDIR}/etc/pam.d + cd ${UPGRADE_SRCDIR}/pam.d; ${MAKE} install sh ${DESTDIR}/etc/pam.d/convert.sh ${DESTDIR}/etc/pam.d ${DESTDIR}/etc/pam.conf .else -.for pamconf in README convert.sh +.for pamconf in README convert.sh atrun cron passwd rsh su system .if !exists(${DESTDIR}/etc/pam.d/${pamconf}) ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${UPGRADE_SRCDIR}/pam.d/${pamconf} ${DESTDIR}/etc/pam.d .endif @@ -239,6 +238,16 @@ upgrade_etc: preupgrade remove-obsolete-files .endif .endif +# The existence of cleartext_pass_ok means pam config files are out of date. + @set - `fgrep cleartext_pass_ok ${DESTDIR}/etc/pam.d/*`; \ + if [ $$# -gt 0 ] ; \ + then \ + echo "It appears your PAM configuration files need to be updated"; \ + echo "This can be done by manually editing the files or:"; \ + echo " cd ${UPGRADE_SRCDIR}/pam.d"; \ + echo " make install"; \ + fi + distribution: cd ${.CURDIR}; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ diff --git a/etc/pam.d/Makefile b/etc/pam.d/Makefile index 9e638b06a5..f5707fa59c 100644 --- a/etc/pam.d/Makefile +++ b/etc/pam.d/Makefile @@ -1,6 +1,7 @@ NOOBJ= FILES= README \ + convert.sh \ atrun \ cron \ ftpd \