# define getutline getutxline
# define getutid getutxid
# define pututline pututxline
+# define UT_LINESIZE __UT_LINESIZE
#else
# include <utmp.h>
#endif
for (n = 0; n < num_entries; n++)
{
- if (strcmp (line, entry[n].ut_line) == 0
+ if (strncmp (line, entry[n].ut_line, UT_LINESIZE) == 0
|| entry[n].ut_type == DEAD_PROCESS)
{
if (entry[n].ut_pid == DEAD_PROCESS)
for (n = 0; n < num_entries; n++)
{
- if (strcmp (line, entry[n].ut_line) == 0)
+ if (strncmp (line, entry[n].ut_line, UT_LINESIZE) == 0)
{
entry[n].ut_type = DEAD_PROCESS;
strncpy (entry[n].ut_user, "", sizeof (entry[n].ut_user));
for (n = 0; n < num_entries; n++)
{
- if (strcmp (line, entry[n].ut_line) == 0)
+ if (strncmp (line, entry[n].ut_line, UT_LINESIZE) == 0)
{
if (memcmp (up, &entry[n], sizeof (struct utmp)))
{
for (n = 0; n < num_entries; n++)
{
- if (strcmp (id, entry[n].ut_id) == 0)
+ if (strncmp (id, entry[n].ut_id, sizeof (entry[n].ut_id)) == 0)
{
if (memcmp (up, &entry[n], sizeof (struct utmp)))
{