[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.24 and 1.25

version 1.24, 2000/08/17 20:05:10 version 1.25, 2000/08/17 20:06:34
Line 73 
Line 73 
 extern char *__progname;  extern char *__progname;
 extern int log_stderr;  extern int log_stderr;
 extern int debug_flag;  extern int debug_flag;
   extern unsigned int utmp_len;
   
 extern int startup_pipe;  extern int startup_pipe;
   
Line 562 
Line 563 
         }          }
 }  }
   
   const char *
   get_remote_name_or_ip(void)
   {
           static const char *remote = "";
           if (utmp_len > 0)
                   remote = get_canonical_hostname();
           if (utmp_len == 0 || strlen(remote) > utmp_len)
                   remote = get_remote_ipaddr();
           return remote;
   }
   
 /* administrative, login(1)-like work */  /* administrative, login(1)-like work */
 void  void
 do_login(Session *s)  do_login(Session *s)
Line 589 
Line 601 
                         fatal_cleanup();                          fatal_cleanup();
                 }                  }
         }          }
   
         /* 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,
             get_canonical_hostname(),              get_remote_name_or_ip(), (struct sockaddr *)&from);
             (struct sockaddr *)&from);  
   
         /* Done if .hushlogin exists. */          /* Done if .hushlogin exists. */
         snprintf(buf, sizeof(buf), "%.200s/.hushlogin", pw->pw_dir);          snprintf(buf, sizeof(buf), "%.200s/.hushlogin", pw->pw_dir);
Line 1011 
Line 1023 
                 } else {                  } else {
                         /* Launch login(1). */                          /* Launch login(1). */
   
                         execl("/usr/bin/login", "login", "-h", get_remote_ipaddr(),                          execl("/usr/bin/login", "login",
                               "-p", "-f", "--", pw->pw_name, NULL);                               "-h", get_remote_name_or_ip(),
                                "-p", "-f", "--", pw->pw_name, NULL);
   
                         /* Login couldn't be executed, die. */                          /* Login couldn't be executed, die. */
   

Legend:
Removed from v.1.24  
changed lines
  Added in v.1.25