mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-22 10:50:07 +00:00
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.
This commit is contained in:
parent
e81bd562d5
commit
6ce16797cd
@ -1,3 +1,12 @@
|
||||
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.
|
||||
|
||||
Fri Jun 28 23:25:35 1996 Miles Bader <miles@gnu.ai.mit.edu>
|
||||
|
||||
* login/login.c (login): Initialize DATA so that setutent_r will
|
||||
|
@ -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. */
|
||||
|
Loading…
Reference in New Issue
Block a user