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

Diff for /src/usr.bin/ssh/sshconnect2.c between version 1.293 and 1.294

version 1.293, 2019/01/19 21:31:32 version 1.294, 2019/01/19 21:34:45
Line 191 
Line 191 
         }          }
   
         if (options.rekey_limit || options.rekey_interval)          if (options.rekey_limit || options.rekey_interval)
                 packet_set_rekey_limits(options.rekey_limit,                  ssh_packet_set_rekey_limits(ssh, options.rekey_limit,
                     options.rekey_interval);                      options.rekey_interval);
   
         /* start key exchange */          /* start key exchange */
Line 502 
Line 502 
 int  int
 input_userauth_banner(int type, u_int32_t seq, struct ssh *ssh)  input_userauth_banner(int type, u_int32_t seq, struct ssh *ssh)
 {  {
         char *msg, *lang;          char *msg = NULL, *lang = NULL;
         u_int len;          size_t len;
           int r;
   
         debug3("%s", __func__);          debug3("%s", __func__);
         msg = packet_get_string(&len);          if ((r = sshpkt_get_cstring(ssh, &msg, &len)) != 0 ||
         lang = packet_get_string(NULL);              (r = sshpkt_get_cstring(ssh, &lang, NULL)) != 0)
                   goto out;
         if (len > 0 && options.log_level >= SYSLOG_LEVEL_INFO)          if (len > 0 && options.log_level >= SYSLOG_LEVEL_INFO)
                 fmprintf(stderr, "%s", msg);                  fmprintf(stderr, "%s", msg);
           r = 0;
    out:
         free(msg);          free(msg);
         free(lang);          free(lang);
         return 0;          return r;
 }  }
   
 /* ARGSUSED */  /* ARGSUSED */
Line 1798 
Line 1802 
 }  }
   
 static int  static int
 ssh_keysign(struct sshkey *key, u_char **sigp, size_t *lenp,  ssh_keysign(struct ssh *ssh, struct sshkey *key, u_char **sigp, size_t *lenp,
     const u_char *data, size_t datalen)      const u_char *data, size_t datalen)
 {  {
         struct sshbuf *b;          struct sshbuf *b;
         struct stat st;          struct stat st;
         pid_t pid;          pid_t pid;
         int i, r, to[2], from[2], status, sock = packet_get_connection_in();          int i, r, to[2], from[2], status, sock = ssh_packet_get_connection_in(ssh);
         u_char rversion = 0, version = 2;          u_char rversion = 0, version = 2;
         void (*osigchld)(int);          void (*osigchld)(int);
   
Line 1978 
Line 1982 
             __func__, sshkey_ssh_name(private), fp);              __func__, sshkey_ssh_name(private), fp);
   
         /* figure out a name for the client host */          /* figure out a name for the client host */
         if ((lname = get_local_name(packet_get_connection_in())) == NULL) {          if ((lname = get_local_name(ssh_packet_get_connection_in(ssh))) == NULL) {
                 error("%s: cannot get local ipaddr/name", __func__);                  error("%s: cannot get local ipaddr/name", __func__);
                 goto out;                  goto out;
         }          }
Line 2012 
Line 2016 
 #ifdef DEBUG_PK  #ifdef DEBUG_PK
         sshbuf_dump(b, stderr);          sshbuf_dump(b, stderr);
 #endif  #endif
         r = ssh_keysign(private, &sig, &siglen,          if ((r = ssh_keysign(ssh, private, &sig, &siglen,
             sshbuf_ptr(b), sshbuf_len(b));              sshbuf_ptr(b), sshbuf_len(b))) != 0) {
         if (r != 0) {  
                 error("sign using hostkey %s %s failed",                  error("sign using hostkey %s %s failed",
                     sshkey_ssh_name(private), fp);                      sshkey_ssh_name(private), fp);
                 goto out;                  goto out;

Legend:
Removed from v.1.293  
changed lines
  Added in v.1.294