configure.ac, lib/: Use _PATH_WTMP from <paths.h>

That's the libc macro for this file.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
Alejandro Colomar 2025-08-31 13:57:22 +02:00 committed by Alejandro Colomar
parent 72a2b8a10d
commit 79ddd58ef6
2 changed files with 2 additions and 3 deletions

View 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.])

View 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;