From 2549e7587d7583704a338533cdc3892eece55ab0 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Sat, 6 Jul 1996 03:57:56 +0000 Subject: Fri Jul 5 17:34:47 1996 Miles Bader * login/logout.c (logout): Do nothing if getutline_r returns ESRCH. * login/pututline_r.c (pututline_r): Since we assign RESULT from lseek now, check that it's >= 0, not == 0. Wed Jul 3 13:28:04 1996 Miles Bader * login/login.c (login): Make a copy of *UT, fill in various fields that we supply (ut_line, ut_type, ut_pid), and use the copy in place of UT. * login/getutline_r.c (getutline_r): When we return ESRCH, mark UTMP_DATA->ubuf invalid (by setting UTMP_DATA->loc_utmp to 0). --- login/logout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'login/logout.c') diff --git a/login/logout.c b/login/logout.c index 1b8dc317ff..bf45451eef 100644 --- a/login/logout.c +++ b/login/logout.c @@ -44,7 +44,7 @@ logout (const char *line) strncpy (tmp.ut_line, line, sizeof tmp.ut_line); /* Read the record. */ - if (getutline_r (&tmp, &ut, &data) >= 0 || errno == ESRCH) + if (getutline_r (&tmp, &ut, &data) >= 0) { /* Clear information about who & from where. */ bzero (ut->ut_name, sizeof ut->ut_name); -- cgit 1.4.1