summaryrefslogtreecommitdiffstats
path: root/source/n/dovecot
diff options
context:
space:
mode:
Diffstat (limited to 'source/n/dovecot')
-rw-r--r--source/n/dovecot/doinst.sh4
-rwxr-xr-xsource/n/dovecot/dovecot.SlackBuild7
-rw-r--r--source/n/dovecot/dovecot.pam5
3 files changed, 15 insertions, 1 deletions
diff --git a/source/n/dovecot/doinst.sh b/source/n/dovecot/doinst.sh
index dc2d5700b..17a37837f 100644
--- a/source/n/dovecot/doinst.sh
+++ b/source/n/dovecot/doinst.sh
@@ -28,6 +28,10 @@ for file in etc/dovecot/*.conf.new etc/dovecot/*.ext.new etc/dovecot/conf.d/*.co
config $file
done
+if [ -r etc/pam.d/dovecot.new ]; then
+ config etc/pam.d/dovecot.new
+fi
+
# Make sure that the dovecot user/group (UID 94, GID 94), and the
# postdrop user/group (UID 65, GID 95) exist on this system:
if ! grep -q "^dovecot:" etc/passwd ; then
diff --git a/source/n/dovecot/dovecot.SlackBuild b/source/n/dovecot/dovecot.SlackBuild
index ac457aa71..f05b11e1a 100755
--- a/source/n/dovecot/dovecot.SlackBuild
+++ b/source/n/dovecot/dovecot.SlackBuild
@@ -2,7 +2,7 @@
# Copyright 2006, 2010 Alan Hicks, Lizella, GA
# Copyright 2013, 2014, 2015, 2016, 2017 Mario Preksavec, Zagreb, Croatia
-# Copyright 2017, 2018, 2019 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2017, 2018, 2019, 2020 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -96,6 +96,11 @@ cd $PKGNAM-$VERSION || exit 1
if [ ! -L /lib${LIBDIRSUFFIX}/libpam.so.? ]; then # no PAM
# Ship config set up for authentication from /etc/passwd and /etc/shadow.
zcat $CWD/dovecot.default.shadow.auth.diff.gz | patch -p1 --verbose || exit 1
+else # Yes, we have PAM:
+ mkdir -p $PKG/etc/pam.d
+ cp -a $CWD/dovecot.pam $PKG/etc/pam.d/dovecot.new
+ chown root:root $PKG/etc/pam.d/dovecot.new
+ chmod 644 $PKG/etc/pam.d/dovecot.new
fi
# Since this package installs working config files in /etc/dovecot, there isn't
diff --git a/source/n/dovecot/dovecot.pam b/source/n/dovecot/dovecot.pam
new file mode 100644
index 000000000..ccb910536
--- /dev/null
+++ b/source/n/dovecot/dovecot.pam
@@ -0,0 +1,5 @@
+#%PAM-1.0
+auth required pam_nologin.so
+auth include system-auth
+account include system-auth
+session include system-auth