From ad81a115455ba3e3b8935733271f01935d9a530e Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Fri, 12 Mar 1999 20:34:20 +0000 Subject: Fri Mar 12 15:22:02 1999 Thomas Bushnell, BSG * login.c (add_utmp_entry): Properly call setutent and endutent around the getutline call. --- utils/login.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'utils/login.c') diff --git a/utils/login.c b/utils/login.c index cc368e5b..096aaeeb 100644 --- a/utils/login.c +++ b/utils/login.c @@ -187,7 +187,9 @@ add_utmp_entry (char *args, unsigned args_len, int inherit_host) { struct utmp *old_utmp; strncpy (utmp.ut_line, basename (tty), sizeof (utmp.ut_line)); + setutent (); old_utmp = getutline (&utmp); + endutent (); if (old_utmp) { if (! host) -- cgit v1.2.3