Disable utmpx permanently

On Linux, utmpx and utmp are identical.  However, documentation (manual
pages) covers utmp, and just says about utmpx that it's identical to
utmp.  It seems that it's preferred to use utmp, at least by reading the
manual pages.

Moreover, we were defaulting to utmp (utmpx had to be explicitly enabled
at configuration time).  So, it seems safer to just make it permanent,
which should not affect default builds.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
Alejandro Colomar
2022-12-21 18:33:40 +01:00
committed by Iker Pedrosa
parent 2da7607ea6
commit 170b76cdd1
9 changed files with 6 additions and 309 deletions

View File

@@ -52,17 +52,10 @@ int user_busy (const char *name, uid_t uid)
#ifndef __linux__
static int user_busy_utmp (const char *name)
{
#ifdef USE_UTMPX
struct utmpx *utent;
setutxent ();
while ((utent = getutxent ()) != NULL)
#else /* !USE_UTMPX */
struct utmp *utent;
setutent ();
while ((utent = getutent ()) != NULL)
#endif /* !USE_UTMPX */
{
if (utent->ut_type != USER_PROCESS) {
continue;