From 450924e56e17da1b1021f43695cb05da1475086f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 2 Jun 1998 12:56:10 +0000 Subject: [PATCH] (login): Let pututline take care of finding the positin to insert the UTMP entry. This corrects a bug where ssh was not reusing UTMP entries marked as DEAD_PROCESS. --- login/login.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/login/login.c b/login/login.c index 4d08dbb4727..a7875f2bb9c 100644 --- a/login/login.c +++ b/login/login.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. @@ -89,7 +89,6 @@ login (const struct utmp *ut) int found_tty; const char *ttyp; struct utmp copy = *ut; - struct utmp utbuf; /* Fill in those fields we supply. */ #if _HAVE_UT_TYPE - 0 @@ -117,14 +116,9 @@ login (const struct utmp *ut) /* Tell that we want to use the UTMP file. */ if (utmpname (_PATH_UTMP) == 0) { - struct utmp *old; - /* Open UTMP file. */ setutent (); - /* Read the record. */ - getutline_r (©, &utbuf, &old); - /* Write the entry. */ pututline (©); -- 2.47.2