system-auth.d

This commit is contained in:
aliriza committed 2023-04-13 12:32:26 +00:00
1 parent 712312fb80
commit e935323b2f
3 files changed
+16 -2

No files matched your search

+11 -1
View File
@@ -9,4 +9,14 @@ if [ ! -f /etc/shadow ] ; then
chown root /etc/shadow
chgrp root /etc/shadow
fi
current=$(date +%s -r /etc/pam.d/system-auth.d/)
last=$(cat /var/lib/ymp/sysconf/shadow/update.date 2>/dev/null)
if [ "$current" != "$last" ] ; then
echo "# Automatically generated file. Do not edit."> /etc/pam.d/system-auth
for file in $(ls /etc/pam.d/system-auth.d/ | sort) ; do
echo "### CONFIG: $file"
cat /etc/pam.d/system-auth.d/$file | sed "s/#.*//g"
echo
done | sed "/^ *$/d" >> /etc/pam.d/system-auth
date +%s -r /etc/pam.d/system-auth.d/ > /var/lib/ymp/sysconf/shadow/update.date
fi
+1 -1
View File
@@ -47,7 +47,7 @@ build(){
package(){
make install $jobs
install -vDm 600 ../useradd.defaults "${DESTDIR}/etc/default/useradd"
install -vDm 600 ../system-auth "${DESTDIR}/etc/pam.d/system-auth"
install -vDm 600 ../system-auth "${DESTDIR}/etc/pam.d/system-auth.d/50-shadow"
install -vDm 755 ../shadow.sysconf ${DESTDIR}/etc/sysconf.d/shadow
}
+4
View File
@@ -69,5 +69,9 @@ package(){
# openrc service
mkdir -p "${DESTDIR}"/etc/init.d
install ../elogind.initd "${DESTDIR}"/etc/init.d/elogind
# shadow system-auth.d file
mkdir -p "${DESTDIR}"/etc/pam.d/system-auth.d/
echo "session include elogind-user" > "${DESTDIR}"/etc/pam.d/system-auth.d/99-elogind
}