diff options
author | Thomas Bushnell <thomas@gnu.org> | 1999-03-12 20:34:20 +0000 |
---|---|---|
committer | Thomas Bushnell <thomas@gnu.org> | 1999-03-12 20:34:20 +0000 |
commit | ad81a115455ba3e3b8935733271f01935d9a530e (patch) | |
tree | a7b08beb92cd6e1bd3c0378d939f45e7a9ac5c9a /utils | |
parent | 86e760a779b29116426a2d5fd38a955d47cfb046 (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')
-rw-r--r-- | utils/ChangeLog | 5 | ||||
-rw-r--r-- | utils/login.c | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/utils/ChangeLog b/utils/ChangeLog index fb252178..f9ead0f4 100644 --- a/utils/ChangeLog +++ b/utils/ChangeLog @@ -1,3 +1,8 @@ +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. + 1999-03-11 Roland McGrath <roland@baalperazim.frob.com> * portinfo.c (main): Grok -E and inhibit error msg for 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) |