Paul Eggert
|
838af3f618
|
(read_utmp): Don't assume that the number of users is less than INT_MAX.
Check for integer overflow in size calculations.
Return -1 (not 1) on failure, since we set errno in that case.
|
2004-08-02 20:55:14 +00:00 |
|
Jim Meyering
|
33c1c51c49
|
(extract_trimmed_name): Don't apply strchr to a
non-string; this leads to undefined behavior.
|
2004-06-12 08:07:30 +00:00 |
|
Jim Meyering
|
cb5f6b9ad3
|
(read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc failure,
don't leak memory and do call END_UTMP_ENT.
|
2004-04-19 18:59:52 +00:00 |
|
Jim Meyering
|
26f4d67342
|
Fix indentation, from gnulib.
|
2003-10-16 07:58:53 +00:00 |
|
Jim Meyering
|
39468cd38f
|
(read_utmp): Likewise.
Check for fstat error. Close stream and free storage when failing.
|
2003-09-17 18:49:34 +00:00 |
|
Jim Meyering
|
1fd5c0ae41
|
Include <string.h> and <stdlib.h> unconditionally.
|
2003-04-11 12:21:59 +00:00 |
|
Jim Meyering
|
9def4be367
|
Remove anachronistic casts of xmalloc, xrealloc, and xcalloc return values.
|
2003-04-11 12:15:21 +00:00 |
|
Jim Meyering
|
418e181ad8
|
Don't declare functions declared by xalloc.h.
Include "xalloc.h" instead.
|
2003-01-10 21:46:37 +00:00 |
|
Jim Meyering
|
3eb2a22131
|
Include unlocked-io.h.
|
2001-11-17 13:29:42 +00:00 |
|
Jim Meyering
|
ff9b9b202c
|
Include sys/types.h before sys/stat.h.
Required for ultrix4.3.
|
2000-04-05 15:00:11 +00:00 |
|
Jim Meyering
|
07730c119b
|
(read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
rather than with `#if HAVE_UTMPNAME'.
|
2000-02-03 12:20:59 +00:00 |
|
Jim Meyering
|
22cb099f3c
|
(extract_trimmed_name): Use UT_USER instead of hard-coding
uses of ->ut_name. The latter doesn't work with new Linux header files
where only utmpx.ut_user is declared.
|
2000-01-30 16:41:25 +00:00 |
|
Jim Meyering
|
9f8bc128f0
|
(read_utmp): Use the new definitions.
|
1999-05-05 13:34:18 +00:00 |
|
Jim Meyering
|
4f40ac7422
|
(read_utmp): Ignore the return value from utmpname.
|
1999-05-03 02:38:50 +00:00 |
|
Jim Meyering
|
a877f41093
|
(read_utmp) [HAVE_UTMPNAME]: Rewrite.
|
1999-03-02 13:53:33 +00:00 |
|
Jim Meyering
|
9b1973fbd7
|
Include stdio.h.
|
1999-02-08 03:32:06 +00:00 |
|
Jim Meyering
|
5fd73cbdf3
|
*** empty log message ***
|
1999-02-08 00:00:44 +00:00 |
|
Jim Meyering
|
976664803c
|
(read_utmp): Add variant for systems that have the utmpname function.
Ansideclify.
|
1998-05-16 20:26:54 +00:00 |
|
Jim Meyering
|
8f6f2a4cc1
|
don't include error.h.
|
1997-07-13 13:31:30 +00:00 |
|
Jim Meyering
|
708d4a74de
|
(read_utmp): Take new params: count and buffer.
Return boolean indicating failure.
Now, caller must give diagnostic upon.
|
1997-07-13 03:54:00 +00:00 |
|
Jim Meyering
|
51a0fa60c8
|
.
|
1997-07-13 02:54:48 +00:00 |
|