summaryrefslogblamecommitdiff
path: root/user/elogind/utmps.patch
blob: 06889a587e43b89094c887ea19e313a0ad528612 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14













                                                                                            
                   




                                                                                                 




                                                                                                
                                                                                   
                   




                                                   

















                                                                                          
                 




                                        


                                
                 




                                                                  

                                
 
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
@@ -759,8 +759,6 @@
 
         assert(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/basic/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
-# 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
@@ -47,8 +47,6 @@
                 return 0;
         }
 
-        if (utmpxname(_PATH_UTMPX) < 0)
-                return -errno;
 
         utmpx = utxent_start();
 
@@ -97,8 +95,6 @@
          * each entry type resp. user; i.e. basically a key/value
          * table. */
 
-        if (utmpxname(_PATH_UTMPX) < 0)
-                return -errno;
 
         utmpx = utxent_start();