From 3be7b9d75a6b73fe24394d7ac1e315d60d45b5ee Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Wed, 21 Dec 2022 18:36:57 +0100 Subject: [PATCH] Remove traces of utmpx - USER_NAME_MAX_LENGTH was being calculated in terms of utmpx. Do it in terms of utmp. - Remove utmpx support from the whishlist. - Remove unused tests about utmpx members. Signed-off-by: Alejandro Colomar --- configure.ac | 8 -------- doc/WISHLIST | 1 - lib/defines.h | 4 ++-- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/configure.ac b/configure.ac index c7dbadd5..2b3635f1 100644 --- a/configure.ac +++ b/configure.ac @@ -72,14 +72,6 @@ AC_CHECK_MEMBERS([struct utmp.ut_type, struct utmp.ut_xtime, struct utmp.ut_tv],,,[[#include ]]) -AC_CHECK_MEMBERS([struct utmpx.ut_name, - struct utmpx.ut_host, - struct utmpx.ut_syslen, - struct utmpx.ut_addr, - struct utmpx.ut_addr_v6, - struct utmpx.ut_time, - struct utmpx.ut_xtime],,,[[#include ]]) - if test "$ac_cv_header_lastlog_h" = "yes"; then AC_CACHE_CHECK(for ll_host in struct lastlog, ac_cv_struct_lastlog_ll_host, diff --git a/doc/WISHLIST b/doc/WISHLIST index d9003b11..5683d87a 100644 --- a/doc/WISHLIST +++ b/doc/WISHLIST @@ -26,7 +26,6 @@ New ideas to add to this list are welcome, too. --marekm - vipw: check password files for errors after editing - add "maximum time users allowed to stay logged in" limit option to logoutd - handle quotes in /etc/environment like the shell does (but sshd doesn't...) -- better utmpx support (logoutd, ...) - better OPIE support (report number of logins left, etc.) - new option for /etc/suauth: don't load user's environment (force "su -") suggested by Ulisses Alonso Camaro diff --git a/lib/defines.h b/lib/defines.h index 79970f07..d40f05de 100644 --- a/lib/defines.h +++ b/lib/defines.h @@ -238,8 +238,8 @@ static inline void memzero(void *ptr, size_t size) #endif /* Maximum length of usernames */ -#include -#define USER_NAME_MAX_LENGTH (sizeof (((struct utmpx *)NULL)->ut_user)) +#include +#define USER_NAME_MAX_LENGTH (sizeof (((struct utmp *)NULL)->ut_user)) /* Maximum length of passwd entry */ #define PASSWD_ENTRY_MAX_LENGTH 32768