diff --git a/configure.ac b/configure.ac index c89acb8d..8e978cf5 100644 --- a/configure.ac +++ b/configure.ac @@ -47,7 +47,7 @@ AC_CHECK_HEADER([shadow.h],,[AC_MSG_ERROR([You need a libc with shadow.h])]) AC_CHECK_FUNCS(arc4random_buf futimes \ getentropy getrandom getspnam getusershell \ - getutent initgroups lckpwdf lutimes \ + initgroups lckpwdf lutimes \ setgroups updwtmp updwtmpx innetgr \ getspnam_r \ memset_explicit explicit_bzero) diff --git a/lib/Makefile.am b/lib/Makefile.am index b677697a..5d76205c 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -66,8 +66,7 @@ libshadow_la_SOURCES = \ shadowio.c \ shadowio.h \ shadowmem.c \ - spawn.c \ - utent.c + spawn.c if WITH_TCB libshadow_la_SOURCES += tcbfuncs.c tcbfuncs.h diff --git a/lib/utent.c b/lib/utent.c deleted file mode 100644 index 988201b2..00000000 --- a/lib/utent.c +++ /dev/null @@ -1,70 +0,0 @@ -/* - * SPDX-FileCopyrightText: 1993 - 1994, Julianne Frances Haugh - * SPDX-FileCopyrightText: 1996 - 1998, Marek Michałkiewicz - * SPDX-FileCopyrightText: 2005 , Tomasz Kłoczko - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#include - -#ifndef HAVE_GETUTENT - -#include "defines.h" -#include -#include -#include - -#ifndef lint -static char rcsid[] = "$Id$"; -#endif - -static int utmp_fd = -1; -static struct utmp utmp_buf; - -/* - * setutent - open or rewind the utmp file - */ - -void setutent (void) -{ - if (utmp_fd == -1) - if ((utmp_fd = open (_UTMP_FILE, O_RDWR)) == -1) - utmp_fd = open (_UTMP_FILE, O_RDONLY); - - if (utmp_fd != -1) - lseek (utmp_fd, (off_t) 0L, SEEK_SET); -} - -/* - * endutent - close the utmp file - */ - -void endutent (void) -{ - if (utmp_fd != -1) - close (utmp_fd); - - utmp_fd = -1; -} - -/* - * getutent - get the next record from the utmp file - */ - -struct utmp *getutent (void) -{ - if (utmp_fd == -1) - setutent (); - - if (utmp_fd == -1) - return 0; - - if (read (utmp_fd, &utmp_buf, sizeof utmp_buf) != sizeof utmp_buf) - return 0; - - return &utmp_buf; -} -#else -extern int ISO_C_forbids_an_empty_translation_unit; -#endif diff --git a/po/POTFILES.in b/po/POTFILES.in index 61b79dbd..568d51be 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -28,7 +28,6 @@ lib/shadowio.c lib/shadowmem.c lib/spawn.c lib/tcbfuncs.c -lib/utent.c libmisc/addgrps.c libmisc/age.c libmisc/audit_help.c