aboutsummaryrefslogtreecommitdiffstats
path: root/main/utmps
diff options
context:
space:
mode:
Diffstat (limited to 'main/utmps')
-rw-r--r--main/utmps/0001-add-stub-utmp.h.patch2
-rw-r--r--main/utmps/APKBUILD10
-rw-r--r--main/utmps/utmpd.initd11
-rw-r--r--main/utmps/wtmpd.initd16
4 files changed, 25 insertions, 14 deletions
diff --git a/main/utmps/0001-add-stub-utmp.h.patch b/main/utmps/0001-add-stub-utmp.h.patch
index 292df34f3d..74e6a92468 100644
--- a/main/utmps/0001-add-stub-utmp.h.patch
+++ b/main/utmps/0001-add-stub-utmp.h.patch
@@ -23,7 +23,7 @@ index 0000000..ccd0cee
+
+/* Unused, but some packages require this macro to be present */
+#define UTMP_FILE UTMPX_FILE
-+#define WTMP_FILE "/run/utmps/wtmp"
++#define WTMP_FILE "/var/log/wtmp"
+#define UTMP_FILENAME UTMP_FILE
+#define WTMP_FILENAME WTMP_FILE
+#define _PATH_UTMP UTMP_FILE
diff --git a/main/utmps/APKBUILD b/main/utmps/APKBUILD
index 5fdcd4311b..f29ecc6809 100644
--- a/main/utmps/APKBUILD
+++ b/main/utmps/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Laurent Bercot <ska-devel@skarnet.org>
# Maintainer: Laurent Bercot <ska-devel@skarnet.org>
pkgname=utmps
-pkgver=0.1.0.0
+pkgver=0.1.0.2
pkgrel=0
pkgdesc="A secure utmp/wtmp implementation"
url="https://skarnet.org/software/$pkgname/"
@@ -43,8 +43,8 @@ package() {
cp -a "$builddir/doc" "$pkgdir/usr/share/doc/$pkgname"
}
-sha512sums="f8d246897690829fccc6e4a4e1bfbbbacd10d337863dacb6966f62cffc166d61c49db1ac83d51aa023e571a5d62f81cf030fa439eb8e3fe742e427764f18adcf utmps-0.1.0.0.tar.gz
-35be6238b7cfad909cfd624ca1e04909a3eca7ebd0f4fc8f4692c0db04a3b9cb2786190dfb9b35aeeaffbbf735a38664bdeaf197e5bcb10547e0392adc86dd14 utmpd.initd
-c2059a4758b0e5f556c3022e9da4f99cd383a61395f8a9fb1c963a8abb89ed6bfac9476c9a6cab3cc30333ea8483860d0dd8f1ba45db575b3fb231171bbedb4f wtmpd.initd
+sha512sums="bf4530c71d932fb21a2da4a00eb0066521f7f458bd69f9de0e5756b63c9ad8b8274a9254ba73277dce6dff885f6e3052e45250e77b6c8979bc3882c16f4aa1b0 utmps-0.1.0.2.tar.gz
+d2880252effd20aed0d78f70754b4c77f0234e3601ff236d3ec5437177d7f4c76cde3fb18100c502942ef07374b1a45de02ac501b27f59fbc037235fa6871d27 utmpd.initd
+e44551cfd1fea1e7409da5fda22de2b20043a4c3500d15a131babd4a7a3da31eb9a3dbaff37f9d42232a5f7a943ca225c253f67bed14596472a6a06e74c28b86 wtmpd.initd
15347bd95f7e69409fb5849eeca0632d3e7cdd0ad6113ab89d9f6554ebce01996522783f3f4a29877fd0f74607a5367af8483396f70d075315c4f17acc182f5e utmps.pc
-40dc8c013ca76fd7e4580d88d399d89409ecf525f69b6660b4bcfbae3c729f1450df333c268fc8422ed934911a3bb992774c6a60b62d06e6d62381db9f761344 0001-add-stub-utmp.h.patch"
+0512f0daa216919a886e6a8e5a73db1d29acd66d929f38d5df40bd55f0d446402610c59da12688b75c3c1230af9b1929793ed8bfc9b4593851bf496fc0a8d835 0001-add-stub-utmp.h.patch"
diff --git a/main/utmps/utmpd.initd b/main/utmps/utmpd.initd
index 2d4b43e169..4fb80d5128 100644
--- a/main/utmps/utmpd.initd
+++ b/main/utmps/utmpd.initd
@@ -1,8 +1,13 @@
#!/sbin/openrc-run
-# Copyright 2020 Laurent Bercot for Alpine Linux
+# Copyright 2020-2021 Laurent Bercot for Alpine Linux
# Distributed under the terms of the ISC License.
#
+depend() {
+ after bootmisc
+ before networking
+}
+
name=utmpd
description="utmps daemon for the utmp service"
command=s6-ipcserver
@@ -13,6 +18,6 @@ directory=/run/utmps
pidfile=/run/utmps/utmpd.pid
start_pre() {
- mkdir -p -m 0755 /run/utmps
- chown utmp:utmp /run/utmps
+ checkpath -D -d -o utmp:utmp -m 0755 /run/utmps
+ checkpath -f -o utmp:utmp -m 0644 /run/utmps/utmp
}
diff --git a/main/utmps/wtmpd.initd b/main/utmps/wtmpd.initd
index e317d0e647..748fde3d57 100644
--- a/main/utmps/wtmpd.initd
+++ b/main/utmps/wtmpd.initd
@@ -1,18 +1,24 @@
#!/sbin/openrc-run
-# Copyright 2020 Laurent Bercot for Alpine Linux
+# Copyright 2020-2021 Laurent Bercot for Alpine Linux
# Distributed under the terms of the ISC License.
#
+depend() {
+ need localmount
+ after bootmisc
+ before networking
+ after utmpd
+}
+
name=wtmpd
description="utmps daemon for the wtmp service"
command=s6-ipcserver
-command_args=".wtmpd-socket utmps-wtmpd"
+command_args="/run/utmps/.wtmpd-socket utmps-wtmpd"
command_user=utmp
command_background=true
-directory=/run/utmps
+directory=/var/log
pidfile=/run/utmps/wtmpd.pid
start_pre() {
- mkdir -p -m 0755 /run/utmps
- chown utmp:utmp /run/utmps
+ checkpath -f -o utmp:utmp -m 0644 /var/log/wtmp
}