]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
configure.ac, lib/: Use _PATH_WTMP from <paths.h> master
authorAlejandro Colomar <alx@kernel.org>
Sun, 31 Aug 2025 11:57:22 +0000 (13:57 +0200)
committerAlejandro Colomar <foss+github@alejandro-colomar.es>
Mon, 15 Sep 2025 09:47:22 +0000 (11:47 +0200)
That's the libc macro for this file.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
configure.ac
lib/utmp.c

index b524029610723391b2c6e4b5704fddc1280d9756..71697e7aaeacb77e1cacc38a936db66a8fc91d60 100644 (file)
@@ -98,8 +98,6 @@ AC_CACHE_CHECK([location of faillog/lastlog/wtmp], [shadow_cv_logdir],
                break
        fi
 done])
-AC_DEFINE_UNQUOTED([_WTMP_FILE], ["$shadow_cv_logdir/wtmp"],
-       [Path for wtmp file.])
 AC_DEFINE_UNQUOTED([FAILLOG_FILE], ["$shadow_cv_logdir/faillog"],
        [Path for faillog file.])
 
index f4d0783e825ad080dad2c60edcd5b1b2bf28db43..4aa2a9096be0f8ce51cb0ea098135ec570034b43 100644 (file)
@@ -16,6 +16,7 @@
 
 #include <utmpx.h>
 #include <assert.h>
+#include <paths.h>
 #include <sys/param.h>
 #include <sys/types.h>
 #include <sys/socket.h>
@@ -381,7 +382,7 @@ setutmp(struct utmpx *ut)
 
 #if !defined(USE_PAM)
        /* This is done by pam_lastlog */
-       updwtmpx(_WTMP_FILE, ut);
+       updwtmpx(_PATH_WTMP, ut);
 #endif
 
        return err;