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

Diff for /src/usr.bin/ssh/session.c between version 1.68 and 1.69

version 1.68, 2001/03/25 00:01:34 version 1.69, 2001/03/25 13:16:11
Line 661 
Line 661 
         }          }
   
         /* Get the time and hostname when the user last logged in. */          /* Get the time and hostname when the user last logged in. */
         hostname[0] = '\0';          if (options.print_lastlog) {
         last_login_time = get_last_login_time(pw->pw_uid, pw->pw_name,                  hostname[0] = '\0';
             hostname, sizeof(hostname));                  last_login_time = get_last_login_time(pw->pw_uid, pw->pw_name,
                       hostname, sizeof(hostname));
           }
   
         /* Record that there was a login on that tty from the remote host. */          /* Record that there was a login on that tty from the remote host. */
         record_login(pid, s->tty, pw->pw_name, pw->pw_uid,          record_login(pid, s->tty, pw->pw_name, pw->pw_uid,
Line 679 
Line 681 
         if (stat(buf, &st) >= 0)          if (stat(buf, &st) >= 0)
 #endif  #endif
                 return;                  return;
         if (last_login_time != 0) {          if (options.print_lastlog && last_login_time != 0) {
                 time_string = ctime(&last_login_time);                  time_string = ctime(&last_login_time);
                 if (strchr(time_string, '\n'))                  if (strchr(time_string, '\n'))
                         *strchr(time_string, '\n') = 0;                          *strchr(time_string, '\n') = 0;

Legend:
Removed from v.1.68  
changed lines
  Added in v.1.69