[BACK]Return to sshlogin.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/sshlogin.c between version 1.1 and 1.2

version 1.1, 2001/03/04 01:46:30 version 1.2, 2001/03/24 16:43:27
Line 52 
Line 52 
  * The host the user logged in from will be returned in buf.   * The host the user logged in from will be returned in buf.
  */   */
   
 /*  
  * Returns the time when the user last logged in (or 0 if no previous login  
  * is found).  The name of the host used last time is returned in buf.  
  */  
   
 u_long  u_long
 get_last_login_time(uid_t uid, const char *logname,  get_last_login_time(uid_t uid, const char *logname,
                     char *buf, u_int bufsize)                      char *buf, u_int bufsize)
Line 97 
Line 92 
         struct lastlog ll;          struct lastlog ll;
         char *lastlog;          char *lastlog;
         struct utmp u;          struct utmp u;
         const char *utmp, *wtmp;  
   
         /* Construct an utmp/wtmp entry. */          /* Construct an utmp/wtmp entry. */
         memset(&u, 0, sizeof(u));          memset(&u, 0, sizeof(u));
Line 105 
Line 99 
         u.ut_time = time(NULL);          u.ut_time = time(NULL);
         strncpy(u.ut_name, user, sizeof(u.ut_name));          strncpy(u.ut_name, user, sizeof(u.ut_name));
         strncpy(u.ut_host, host, sizeof(u.ut_host));          strncpy(u.ut_host, host, sizeof(u.ut_host));
   
         /* Figure out the file names. */  
         utmp = _PATH_UTMP;  
         wtmp = _PATH_WTMP;  
   
         login(&u);          login(&u);
         lastlog = _PATH_LASTLOG;          lastlog = _PATH_LASTLOG;

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2