/[inetutils]/inetutils/libinetutils/logout.c
ViewVC logotype

Diff of /inetutils/libinetutils/logout.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by alainm, Wed Jul 19 04:08:38 2000 UTC revision 1.6 by gray, Tue May 14 15:15:05 2002 UTC
# Line 52  logout (char *line) Line 52  logout (char *line)
52    
53    setutent ();    setutent ();
54    
55  #ifdef HAVE_UTMP_UT_TYPE  #ifdef HAVE_STRUCT_UTMP_UT_TYPE
56    search.ut_type = USER_PROCESS;    search.ut_type = USER_PROCESS;
57  #endif  #endif
58    strncpy (search.ut_line, line, sizeof search.ut_line);    strncpy (search.ut_line, line, sizeof search.ut_line);
# Line 60  logout (char *line) Line 60  logout (char *line)
60    ut = getutline (&search);    ut = getutline (&search);
61    if (ut)    if (ut)
62      {      {
63  #ifdef HAVE_UTMP_UT_HOST  #ifdef HAVE_STRUCT_UTMP_UT_HOST
64        bzero (ut->ut_host, sizeof ut->ut_host);        bzero (ut->ut_host, sizeof ut->ut_host);
65  #endif  #endif
66  #ifdef HAVE_UTMP_UT_TV  #ifdef HAVE_STRUCT_UTMP_UT_TV
67        gettimeofday (&ut->ut_tv, NULL);        gettimeofday (&ut->ut_tv, NULL);
68  #else  #else
69        time (&ut->ut_time);        time (&ut->ut_time);
# Line 122  logout (char *line) Line 122  logout (char *line)
122                {                {
123                  /* Zero out entries describing who's logged in.  */                  /* Zero out entries describing who's logged in.  */
124                  bzero (ut->ut_name, sizeof ut->ut_name);                  bzero (ut->ut_name, sizeof ut->ut_name);
125  #ifdef HAVE_UTMP_UT_HOST  #ifdef HAVE_STRUCT_UTMP_UT_HOST
126                  bzero (ut->ut_host, sizeof ut->ut_host);                  bzero (ut->ut_host, sizeof ut->ut_host);
127  #endif  #endif
128  #ifdef HAVE_UTMP_UT_TV  #ifdef HAVE_STRUCT_UTMP_UT_TV
129                  gettimeofday (&ut->ut_tv, NULL);                  gettimeofday (&ut->ut_tv, NULL);
130  #else  #else
131                  time (&ut->ut_time);                  time (&ut->ut_time);

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26