diff options
-rw-r--r-- | system/utmps/APKBUILD | 22 | ||||
-rw-r--r-- | system/utmps/btmpd.service | 17 | ||||
-rw-r--r-- | system/utmps/utmpd.service | 17 | ||||
-rw-r--r-- | system/utmps/wtmpd.service | 17 |
4 files changed, 68 insertions, 5 deletions
diff --git a/system/utmps/APKBUILD b/system/utmps/APKBUILD index 7ae3849ed..55c8f3e15 100644 --- a/system/utmps/APKBUILD +++ b/system/utmps/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Laurent Bercot <ska-adelie@skarnet.org> pkgname=utmps pkgver=0.1.2.2 -pkgrel=2 +pkgrel=3 pkgdesc="A secure utmp/wtmp implementation" url="https://skarnet.org/software/utmps/" arch="all" @@ -12,13 +12,17 @@ depends="execline s6" _skalibs_version=2.14 depends_dev="skalibs-dev>=$_skalibs_version" makedepends="skalibs-dev>=$_skalibs_version" -subpackages="$pkgname-dev $pkgname-libs $pkgname-doc $pkgname-openrc" +subpackages="$pkgname-dev $pkgname-libs $pkgname-doc $pkgname-openrc + $pkgname-systemd" install="$pkgname.post-upgrade" source="https://skarnet.org/software/$pkgname/$pkgname-$pkgver.tar.gz utmpd.run wtmpd.run btmpd.run - utmps.initd" + utmps.initd + utmpd.service + wtmpd.service + btmpd.service" build() { ./configure \ @@ -40,12 +44,17 @@ package() { chown utmp:utmp "$runimage/utmps" install -D -m 0755 "$srcdir/utmps.initd" "$pkgdir/etc/init.d/utmps" cp -a "$builddir/doc" "$pkgdir/usr/share/doc/$pkgname" + + for service in utmpd wtmpd btmpd; do + install -D -m 0644 "$srcdir"/$service.service \ + "$pkgdir"/lib/systemd/system/$service.service + done } openrc() { rldir="$subpkgdir"/etc/runlevels/boot - subrunimage="$subpkgdir/etc/s6-linux-init/current/run-image" default_openrc + subrunimage="$subpkgdir/etc/s6-linux-init/current/run-image" mkdir -p -m 0755 "$rldir" "$subpkgdir/var/log/wtmpd" "$subrunimage/service/utmpd" "$subrunimage/service/wtmpd" "$subrunimage/service/btmpd" cp -f "$srcdir/utmpd.run" "$subrunimage/service/utmpd/run" echo 3 > "$subrunimage/service/utmpd/notification-fd" @@ -67,4 +76,7 @@ sha512sums="57a73658ecb947af9dfad7a5e2931660ad1b8fa61d36c803c373e8aba13e9afa8398 0ec30284c64c6ea9f25142c5f4a643bd48b137fe85781b650104f5137ffa4dfc35ca7be3e41e3acd3403ebe1d8c5378073afa4e2f3607d3d794fcd9f98ed51c4 utmpd.run 9e875a5cd37be531320a8e582afed2c980dd0a1bdfc2f6f3d826d5e5389fc6ab93f973ed1506edb23f4c73cf24a2357aefe856148eaacff86c2aafe376c575e2 wtmpd.run 503bdbb3d244243934b9b4e3deea0bf92a95f88417c822ad9cf6202584d4724d5e182a0d88d7f09069e435a8a97230b85d2b264736c85c893da193fd5ec34c71 btmpd.run -89fb24ab5759b3a1162044895efbe01c7a17d505a29df0cd7141654783b7ada8e934a1ce5981218af41812cfb517263bbd608948102af40b7a41a843b7aaf6ca utmps.initd" +89fb24ab5759b3a1162044895efbe01c7a17d505a29df0cd7141654783b7ada8e934a1ce5981218af41812cfb517263bbd608948102af40b7a41a843b7aaf6ca utmps.initd +2a175c32f4976f3bd5276663bf1a3b67d0efe6088ba6dd48ef10adf3df26c41228e5d6b65974a6998ca050052e72ebeccdcae83d734345b6d2fce277ddfb32f6 utmpd.service +9f93b36fa3623a06e51e5efc84a83bfb709f53d28e196f130fe52b2b66a52ee0e2bc5ce8c0faec62837b2a68d1002df70bfd77ca3e6748ec96da107fd6b41128 wtmpd.service +ee3f14c3bc10fd5190adb38cb3d39901a1ad314bb6b018c9d43749a39e507f5e7683d62e36da40eb56a81bcc226a7b8658e5ab867c4cc70db9db1093536af415 btmpd.service" diff --git a/system/utmps/btmpd.service b/system/utmps/btmpd.service new file mode 100644 index 000000000..4a6e93a45 --- /dev/null +++ b/system/utmps/btmpd.service @@ -0,0 +1,17 @@ +[Unit] +Description=s6-utmps secure BTMP service +Documentation=https://www.skarnet.org/software/utmps/ +Before=systemd-update-utmp.service systemd-logind.service + +[Service] +Type=exec +RuntimeDirectory=utmps +RuntimeDirectoryPreserve=yes +WorkingDirectory=-/run/utmps +ExecStart=/bin/s6-ipcserver -1 -- .btmpd-socket /bin/utmps-btmpd +User=utmp +Group=utmp + +[Install] +WantedBy=basic.target +RequiredBy=multi-user.target systemd-logind.service diff --git a/system/utmps/utmpd.service b/system/utmps/utmpd.service new file mode 100644 index 000000000..a6110c29e --- /dev/null +++ b/system/utmps/utmpd.service @@ -0,0 +1,17 @@ +[Unit] +Description=s6-utmps secure UTMP service +Documentation=https://www.skarnet.org/software/utmps/ +Before=systemd-update-utmp.service systemd-logind.service + +[Service] +Type=exec +RuntimeDirectory=utmps +RuntimeDirectoryPreserve=yes +WorkingDirectory=-/run/utmps +ExecStart=/bin/s6-ipcserver -1 -- .utmpd-socket /bin/utmps-utmpd +User=utmp +Group=utmp + +[Install] +WantedBy=basic.target +RequiredBy=multi-user.target systemd-logind.service diff --git a/system/utmps/wtmpd.service b/system/utmps/wtmpd.service new file mode 100644 index 000000000..ba10970b7 --- /dev/null +++ b/system/utmps/wtmpd.service @@ -0,0 +1,17 @@ +[Unit] +Description=s6-utmps secure WTMP service +Documentation=https://www.skarnet.org/software/utmps/ +Before=systemd-update-utmp.service systemd-logind.service + +[Service] +Type=exec +RuntimeDirectory=utmps +RuntimeDirectoryPreserve=yes +WorkingDirectory=-/run/utmps +ExecStart=/bin/s6-ipcserver -1 -- .wtmpd-socket /bin/utmps-wtmpd +User=utmp +Group=utmp + +[Install] +WantedBy=basic.target +RequiredBy=multi-user.target systemd-logind.service |