about summary refs log tree commit diff
path: root/login
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1996-07-01 19:33:30 +0000
committerMiles Bader <miles@gnu.org>1996-07-01 19:33:30 +0000
commit6ce16797cd1c4fd6bbd0c99ab2edd100bda2f1ce (patch)
treeaab67b50386f86573151fd2a08a10b8106c46592 /login
parente81bd562d57209c6c9297962046716ace78bfb30 (diff)
downloadglibc-6ce16797cd1c4fd6bbd0c99ab2edd100bda2f1ce.tar.gz
glibc-6ce16797cd1c4fd6bbd0c99ab2edd100bda2f1ce.tar.xz
glibc-6ce16797cd1c4fd6bbd0c99ab2edd100bda2f1ce.zip
Mon Jul 1 13:32:42 1996 Miles Bader <miles@gnu.ai.mit.edu>
	* login/login.c (login): Only Frob OLD->ut_type if getutline_r
	actually found any entry.

	* login/pututline_r.c (pututline_r): If not located after any
	entry don't use UTMP_DATA->ubuf, and seek to the end before adding.
	Lock the file before stating.
Diffstat (limited to 'login')
-rw-r--r--login/pututline_r.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/login/pututline_r.c b/login/pututline_r.c
index 4fffbb7b38..382716ce80 100644
--- a/login/pututline_r.c
+++ b/login/pututline_r.c
@@ -60,7 +60,7 @@ pututline_r (const struct utmp *id, struct utmp_data *utmp_data)
 
 #if _HAVE_UT_TYPE - 0
   /* Seek position to write.  */
-  if (utmp_data->loc_utmp >= sizeof (utmp)
+  if (utmp_data->loc_utmp >= sizeof (struct utmp)
       && utmp_data->ubuf.ut_type != id->ut_type)
     {
       /* We must not overwrite the data in UTMP_DATA.  */