summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorrunnytu2018-02-10 22:23:11 +0100
committerrunnytu2018-02-10 22:23:11 +0100
commit3812992f27727d2afb4b042c5745631a090c1342 (patch)
treef469f989b3d8e91106542df65aaf4a1f5e72d29e
parent7c687b9568d7348f60f211b20b6f17f90b350238 (diff)
downloadaur-3812992f27727d2afb4b042c5745631a090c1342.tar.gz
Update to sysusers and fix strict PIDs
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD13
-rw-r--r--authdaemond.service3
-rw-r--r--courier-authlib.install13
-rw-r--r--courier.conf3
5 files changed, 19 insertions, 19 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4fd88e6ac462..1c9fd0928106 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = courier-authlib
pkgdesc = Authentication library for the Courier mailserver(s)
pkgver = 0.68.0
- pkgrel = 3
+ pkgrel = 4
url = http://courier-mta.org/authlib/
install = courier-authlib.install
arch = i686
@@ -33,9 +33,11 @@ pkgbase = courier-authlib
source = http://downloads.sourceforge.net/project/courier/authlib/0.68.0/courier-authlib-0.68.0.tar.bz2
source = courier-authlib.tmpfiles
source = authdaemond.service
+ source = courier.conf
sha512sums = 5c4adaf0fd69f4b9e780962aa3f9eeac6b15cea3f302288ff4549ce2b0be9ea0808b4501670ef3c4e0419c3d27505c256c082f795dea4683dd5265fd7dcab93b
sha512sums = 5047fea9990cd2cd415e11c81fbd8ff83b70dadf0fc178b2398b2c9930843a4669abb3c6801f2953c1ebfdae73c1f82d0ee8c24e900f3876ee6b3aa689363b62
- sha512sums = 2168a3d2f92bbc4c24ba80030236dd39a871ccd0f945ea9481518356f6ddfeec3661f161cd6a65d852bce6d9b089d7fa4860337615b9157199aaef336c58d268
+ sha512sums = ee258f996dc929371f76681a27b174588b3bb30afb1aa474a58be9e596d35aa43f9c0fa50a1a57a30ccf9bdb3caa975ce928991fca44351959cc806591a05ef0
+ sha512sums = 997f755516a64f38abb626790e22e0ad6c3d9fbd7d3e76199cc335ce60f9d5e94dfa083deb637cc36fe039b5b1aa713224e2175b65b1980bf3b304499e3e96e6
pkgname = courier-authlib
diff --git a/PKGBUILD b/PKGBUILD
index ef29d69234b3..eb0d02102563 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,11 +3,11 @@
# Old Maintainer: Jonas Heinrich <onny@project-insanity.org>
# Contributor: tobias <tobias@archlinux.org>
# Contributor: Tobias Kieslich <tobias@justdreams.de>
-# Contributor: Neil Romig <neil@sixtythree.me.uk>
+# Contributor: Neil Romig <neilromig@gmail.com>
pkgname=courier-authlib
pkgver=0.68.0
-pkgrel=3
+pkgrel=4
pkgdesc="Authentication library for the Courier mailserver(s)"
arch=(i686 x86_64)
license=('GPL2')
@@ -25,10 +25,12 @@ options=(!libtool !staticlibs emptydirs)
install=${pkgname}.install
source=(http://downloads.sourceforge.net/project/courier/authlib/${pkgver}/${pkgname}-${pkgver}.tar.bz2
courier-authlib.tmpfiles
- authdaemond.service)
+ authdaemond.service
+ courier.conf)
sha512sums=('5c4adaf0fd69f4b9e780962aa3f9eeac6b15cea3f302288ff4549ce2b0be9ea0808b4501670ef3c4e0419c3d27505c256c082f795dea4683dd5265fd7dcab93b'
'5047fea9990cd2cd415e11c81fbd8ff83b70dadf0fc178b2398b2c9930843a4669abb3c6801f2953c1ebfdae73c1f82d0ee8c24e900f3876ee6b3aa689363b62'
-'2168a3d2f92bbc4c24ba80030236dd39a871ccd0f945ea9481518356f6ddfeec3661f161cd6a65d852bce6d9b089d7fa4860337615b9157199aaef336c58d268')
+'ee258f996dc929371f76681a27b174588b3bb30afb1aa474a58be9e596d35aa43f9c0fa50a1a57a30ccf9bdb3caa975ce928991fca44351959cc806591a05ef0'
+'997f755516a64f38abb626790e22e0ad6c3d9fbd7d3e76199cc335ce60f9d5e94dfa083deb637cc36fe039b5b1aa713224e2175b65b1980bf3b304499e3e96e6')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
@@ -72,6 +74,9 @@ package() {
chown 72:72 "${pkgdir}/usr/lib/courier-authlib"
+ # Install systemd sysuser file
+ install -Dm 644 "$srcdir/courier.conf" "${pkgdir}/usr/lib/sysusers.d/courier.conf"
+
# Install service file
install -Dm 644 "${srcdir}/authdaemond.service" "${pkgdir}/usr/lib/systemd/system/authdaemond.service"
diff --git a/authdaemond.service b/authdaemond.service
index ad2cfcbbb337..ac7074e81b13 100644
--- a/authdaemond.service
+++ b/authdaemond.service
@@ -3,9 +3,12 @@ Description=Courier Authentification Daemon
[Service]
Type=forking
+User=courier
+Group=courier
ExecStart=/usr/bin/authdaemond start
ExecStop=/usr/bin/authdaemond stop
PIDFile=/var/run/authdaemon/pid
+AmbientCapabilities=CAP_DAC_OVERRIDE
[Install]
WantedBy=multi-user.target
diff --git a/courier-authlib.install b/courier-authlib.install
index 14db36d8e0db..ad5c6471fa0c 100644
--- a/courier-authlib.install
+++ b/courier-authlib.install
@@ -1,19 +1,8 @@
# arg 1: the new package version
post_install() {
- # create courier group and user
- if ! getent group courier >/dev/null; then
- groupadd -g 72 courier >/dev/null 2>&1
- fi
-
- if ! getent passwd courier >/dev/null; then
- useradd -u 72 -d /var/spool/courier -g courier -s /bin/false courier >/dev/null 2>&1;
- fi
-
if ! (grep -q '^courier:.*:72:72:' /etc/passwd); then echo courier user has incorrect uid:gid - please fix!; fi;
-
# set correct ownership & permissions on /run/authdaemon
systemd-tmpfiles --create /usr/lib/tmpfiles.d/courier-authlib.conf
-
# make sure the system can see authlib libraries
echo /usr/lib/courier-authlib > /etc/ld.so.conf.d/courier-authlib.conf
ldconfig
@@ -30,7 +19,5 @@ pre_remove() {
systemd-tmpfiles --remove /usr/lib/tmpfiles.d/courier-authlib.conf
rm -f /etc/ld.so.conf.d/courier-authlib.conf
ldconfig
- userdel courier
- if getent group courier >/dev/null; then groupdel courier; fi
} >/dev/null 2>&1
diff --git a/courier.conf b/courier.conf
new file mode 100644
index 000000000000..2efcad0956ec
--- /dev/null
+++ b/courier.conf
@@ -0,0 +1,3 @@
+u courier 72 "Courier user" /var/spool/courier
+g courier 72
+