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

Diff of /inetutils/libinetutils/utmp_init.c

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

revision 1.5 by marcus, Mon Oct 30 01:26:36 2000 UTC revision 1.6 by marcus, Fri Nov 2 21:50:13 2001 UTC
# Line 53  utmp_init(char   *line, char   *user, ch Line 53  utmp_init(char   *line, char   *user, ch
53  #endif  #endif
54    
55      memset((char *) &utx, 0, sizeof(utx));      memset((char *) &utx, 0, sizeof(utx));
56    #if defined(HAVE_UTMP_UT_ID)
57      strncpy(utx.ut_id, id, sizeof(utx.ut_id));      strncpy(utx.ut_id, id, sizeof(utx.ut_id));
58    #endif
59    #if defined(HAVE_UTMP_UT_USER)
60      strncpy(utx.ut_user, user, sizeof(utx.ut_user));      strncpy(utx.ut_user, user, sizeof(utx.ut_user));
61    #else
62        strncpy(utx.ut_name, user, sizeof(utx.ut_name));
63    #endif
64      strncpy(utx.ut_line, line, sizeof(utx.ut_line));      strncpy(utx.ut_line, line, sizeof(utx.ut_line));
65    #if defined(HAVE_UTMP_UT_PID)
66      utx.ut_pid = getpid();      utx.ut_pid = getpid();
67    #endif
68    #if defined(HAVE_UTMP_UT_TYPE)
69      utx.ut_type = LOGIN_PROCESS;      utx.ut_type = LOGIN_PROCESS;
70    #endif
71  #if defined(HAVE_UTMPX_UT_TV)  #if defined(HAVE_UTMPX_UT_TV)
72      gettimeofday(&(utx.ut_tv), 0);      gettimeofday(&(utx.ut_tv), 0);
73  #else  #else

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