summaryrefslogtreecommitdiff
path: root/utils/login.c
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1999-03-12 20:34:20 +0000
committerThomas Bushnell <thomas@gnu.org>1999-03-12 20:34:20 +0000
commitad81a115455ba3e3b8935733271f01935d9a530e (patch)
treea7b08beb92cd6e1bd3c0378d939f45e7a9ac5c9a /utils/login.c
parent86e760a779b29116426a2d5fd38a955d47cfb046 (diff)
Fri Mar 12 15:22:02 1999 Thomas Bushnell, BSG <tb@mit.edu>
* login.c (add_utmp_entry): Properly call setutent and endutent around the getutline call.
Diffstat (limited to 'utils/login.c')
-rw-r--r--utils/login.c2
1 files changed, 2 insertions, 0 deletions
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)