2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-09-08 12:40:48 +00:00

Link the confluent pam service to wherever sshd's config lives

Linux-PAM reads vendor defaults from /usr/lib/pam.d and distributions are
migrating there package by package: systemd and polkit already ship into
it on both EL and Debian, and on SUSE 16 openssh has followed. There the
old code left a dangling /etc/pam.d/confluent and every pam authentication
against it failed.

The deb postinst carries the same logic, so fix it in step. ln -sf rather
than ln -s because -e is false for a dangling link, so the old code retried
the symlink and failed with 'File exists' instead of repairing it.
This commit is contained in:
Markus Hilger
2026-09-04 19:22:11 +02:00
parent 42ca73eb21
commit 811e5fe03d
2 changed files with 18 additions and 2 deletions
+9 -1
View File
@@ -67,8 +67,16 @@ if [ $NEEDCHOWN = 1 ]; then
fi
systemctl daemon-reload
if systemctl is-active confluent > /dev/null || [ $NEEDSTART = 1 ]; then systemctl restart confluent > /dev/null 2>&1; fi
# -e is false for a dangling link, so an existing bad one is replaced. Linux-PAM
# reads vendor defaults from /usr/lib/pam.d and distributions are migrating there
# package by package; openssh has already done so on SUSE 16.
if [ ! -e /etc/pam.d/confluent ]; then
ln -s /etc/pam.d/sshd /etc/pam.d/confluent
for pamsrc in /etc/pam.d/sshd /usr/lib/pam.d/sshd; do
if [ -f $pamsrc ]; then
ln -sf $pamsrc /etc/pam.d/confluent
break
fi
done
fi
true
EOF
+9 -1
View File
@@ -81,8 +81,16 @@ if [ $NEEDCHOWN = 1 ]; then
fi
systemctl daemon-reload
if systemctl is-active confluent > /dev/null || [ $NEEDSTART = 1 ]; then /usr/bin/systemctl restart confluent >& /dev/null; fi
# -e is false for a dangling link, so an existing bad one is replaced. Linux-PAM
# reads vendor defaults from /usr/lib/pam.d and distributions are migrating there
# package by package; openssh has already done so on SUSE 16.
if [ ! -e /etc/pam.d/confluent ]; then
ln -s /etc/pam.d/sshd /etc/pam.d/confluent
for pamsrc in /etc/pam.d/sshd /usr/lib/pam.d/sshd; do
if [ -f $pamsrc ]; then
ln -sf $pamsrc /etc/pam.d/confluent
break
fi
done
fi
true