diff options
author | Laurent Bercot <ska-adelie@skarnet.org> | 2023-08-31 00:03:11 +0000 |
---|---|---|
committer | Zach van Rijn <me@zv.io> | 2023-09-15 10:28:33 +0000 |
commit | 85b5bcffcdcc51e4f318dc78c221abdc01b5d3f3 (patch) | |
tree | 2c952084e46b7b1b5e4ce9c7d4b857167d12c707 /user | |
parent | 2a7cad63e8b8677d3da9042d151ad38326348c06 (diff) | |
download | packages-85b5bcffcdcc51e4f318dc78c221abdc01b5d3f3.tar.gz packages-85b5bcffcdcc51e4f318dc78c221abdc01b5d3f3.tar.bz2 packages-85b5bcffcdcc51e4f318dc78c221abdc01b5d3f3.tar.xz packages-85b5bcffcdcc51e4f318dc78c221abdc01b5d3f3.zip |
user/elogind: fix utmp failures
As with util-linux, we hardcode our assumptions in place of the
wrong ones, and we comment out the most egregious braindeadnesses.
Diffstat (limited to 'user')
-rw-r--r-- | user/elogind/APKBUILD | 2 | ||||
-rw-r--r-- | user/elogind/utmps.patch | 83 |
2 files changed, 69 insertions, 16 deletions
diff --git a/user/elogind/APKBUILD b/user/elogind/APKBUILD index 98a802dff..6dbd2c1b6 100644 --- a/user/elogind/APKBUILD +++ b/user/elogind/APKBUILD @@ -50,7 +50,7 @@ package() { } sha512sums="9db0f068ed94ec07bab4d764ccb38840af3d05a4b7c9c539721906f5381b509cb9a3cbfb0453a978210d306136368de6162578c600d522416ef2a7ac1b9f348b elogind-246.10.tar.gz -5c1596b85e893e965ffb6f401c51d07dc4a77468b2ccfbe93a2b84eae596acf8a31a760c16f174cf73ffd6d404e9252e9baa7ea5ecc7785e6bf66282c27c66fc utmps.patch +cb8740386e44606cc894a1740556c5eb507a980fdfcaaaef05725179d4550920018ddc971f448ae02e95643da9f570531f8edf4f9aae4251639b492966436ede utmps.patch b5043d7bcbefdf00704d40670deafa0984899cc7be083e8d886a92137932a9f23c25749c106cfc07906166e57db32fe6c602cf1c54129faa7e5b04d6228b7c17 elogind.pamd 2c9047c054582824f8a3e71bb0a79a5621d7a92cb15c66bb7e7a8deb931037b6d3a331b86cdc9eb5ec4e7b2b725548a7ee6657e3c3193d81ba6422cd101a2491 elogind.confd bbc203a924abf65b45d7d4d2fc31baf2d4e23135d98c7c937f93a4fe2d4ce9dac3d4e0747c1e09101f8b2ce674d25d49e085bf2445e7cb28408d7d209f8f4491 elogind.initd diff --git a/user/elogind/utmps.patch b/user/elogind/utmps.patch index c1ac7c515..16afdd307 100644 --- a/user/elogind/utmps.patch +++ b/user/elogind/utmps.patch @@ -1,21 +1,74 @@ ---- elogind-243.7/src/shared/musl_missing.h.old 2020-03-12 19:33:40.000000000 +0000 -+++ elogind-243.7/src/shared/musl_missing.h 2020-07-24 23:42:45.556511070 +0000 -@@ -76,7 +76,6 @@ +diff -rNU3 elogind-246.10.old/src/basic/user-util.c elogind-246.10/src/basic/user-util.c +--- elogind-246.10.old/src/basic/user-util.c 2021-03-02 08:29:23.000000000 +0000 ++++ elogind-246.10/src/basic/user-util.c 2023-08-30 23:59:46.850233132 +0000 +@@ -8,7 +8,6 @@ + #include <stdlib.h> + #include <sys/stat.h> + #include <unistd.h> +-#include <utmp.h> + + #include "sd-messages.h" + +diff -rNU3 elogind-246.10.old/src/login/logind-core.c elogind-246.10/src/login/logind-core.c +--- elogind-246.10.old/src/login/logind-core.c 2021-03-02 08:29:23.000000000 +0000 ++++ elogind-246.10/src/login/logind-core.c 2023-08-30 23:54:42.910231156 +0000 +@@ -780,8 +780,8 @@ + + assert(m); + +- if (utmpxname(_PATH_UTMPX) < 0) +- return log_error_errno(errno, "Failed to set utmp path to " _PATH_UTMPX ": %m"); ++// if (utmpxname(_PATH_UTMPX) < 0) ++// return log_error_errno(errno, "Failed to set utmp path to " _PATH_UTMPX ": %m"); + + utmpx = utxent_start(); + +diff -rNU3 elogind-246.10.old/src/shared/musl_missing.h elogind-246.10/src/shared/musl_missing.h +--- elogind-246.10.old/src/shared/musl_missing.h 2021-03-02 08:29:23.000000000 +0000 ++++ elogind-246.10/src/shared/musl_missing.h 2023-08-30 23:58:42.010232710 +0000 +@@ -76,14 +76,13 @@ /* Make musl utmp/wtmp stubs visible if needed. */ #if ENABLE_UTMP # include <paths.h> -# include <utmp.h> # include <utmpx.h> - # if defined(_PATH_UTMP) && !defined(_PATH_UTMPX) - # define _PATH_UTMPX _PATH_UTMP ---- elogind-243.7/src/basic/user-util.c.old 2020-03-12 19:33:40.000000000 +0000 -+++ elogind-243.7/src/basic/user-util.c 2020-07-24 23:44:44.253733648 +0000 -@@ -12,7 +12,7 @@ - #include <string.h> - #include <sys/stat.h> - #include <unistd.h> --#include <utmp.h> -+#include <utmpx.h> +-# if defined(_PATH_UTMP) && !defined(_PATH_UTMPX) +-# define _PATH_UTMPX _PATH_UTMP +-# endif +-# if defined(_PATH_WTMP) && !defined(_PATH_WTMPX) +-# define _PATH_WTMPX _PATH_WTMP +-# endif ++# undef _PATH_UTMPX ++# define _PATH_UTMPX "/run/utmps/utmp" ++# undef _PATH_WTMPX ++# define _PATH_WTMPX "/var/log/wtmpd/wtmp" ++# undef _PATH_BTMPX ++# define _PATH_BTMPX "/var/log/wtmpd/btmp" + #endif // ENABLE_UTMP + + /* +diff -rNU3 elogind-246.10.old/src/shared/utmp-wtmp.c elogind-246.10/src/shared/utmp-wtmp.c +--- elogind-246.10.old/src/shared/utmp-wtmp.c 2021-03-02 08:29:23.000000000 +0000 ++++ elogind-246.10/src/shared/utmp-wtmp.c 2023-08-30 23:53:07.330230534 +0000 +@@ -55,8 +55,8 @@ + return 0; + } + +- if (utmpxname(_PATH_UTMPX) < 0) +- return -errno; ++// if (utmpxname(_PATH_UTMPX) < 0) ++// return -errno; + + utmpx = utxent_start(); + +@@ -105,8 +105,8 @@ + * each entry type resp. user; i.e. basically a key/value + * table. */ + +- if (utmpxname(_PATH_UTMPX) < 0) +- return -errno; ++// if (utmpxname(_PATH_UTMPX) < 0) ++// return -errno; + + utmpx = utxent_start(); - #include "alloc-util.h" - #include "errno-util.h" |