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

Diff for /src/usr.bin/ssh/readconf.c between version 1.339 and 1.340

version 1.339, 2020/10/16 13:26:13 version 1.340, 2020/10/18 11:32:01
Line 324 
Line 324 
             ssh_digest_update(md, portstr, strlen(portstr)) < 0 ||              ssh_digest_update(md, portstr, strlen(portstr)) < 0 ||
             ssh_digest_update(md, user, strlen(user)) < 0 ||              ssh_digest_update(md, user, strlen(user)) < 0 ||
             ssh_digest_final(md, conn_hash, sizeof(conn_hash)) < 0)              ssh_digest_final(md, conn_hash, sizeof(conn_hash)) < 0)
                 fatal("%s: mux digest failed", __func__);                  fatal_f("mux digest failed");
         ssh_digest_free(md);          ssh_digest_free(md);
         return tohex(conn_hash, ssh_digest_bytes(SSH_DIGEST_SHA1));          return tohex(conn_hash, ssh_digest_bytes(SSH_DIGEST_SHA1));
 }  }
Line 432 
Line 432 
         for (i = 0; i < options->num_certificate_files; i++) {          for (i = 0; i < options->num_certificate_files; i++) {
                 if (options->certificate_file_userprovided[i] == userprovided &&                  if (options->certificate_file_userprovided[i] == userprovided &&
                     strcmp(options->certificate_files[i], path) == 0) {                      strcmp(options->certificate_files[i], path) == 0) {
                         debug2("%s: ignoring duplicate key %s", __func__, path);                          debug2_f("ignoring duplicate key %s", path);
                         return;                          return;
                 }                  }
         }          }
Line 463 
Line 463 
         for (i = 0; i < options->num_identity_files; i++) {          for (i = 0; i < options->num_identity_files; i++) {
                 if (options->identity_file_userprovided[i] == userprovided &&                  if (options->identity_file_userprovided[i] == userprovided &&
                     strcmp(options->identity_files[i], path) == 0) {                      strcmp(options->identity_files[i], path) == 0) {
                         debug2("%s: ignoring duplicate key %s", __func__, path);                          debug2_f("ignoring duplicate key %s", path);
                         free(path);                          free(path);
                         return;                          return;
                 }                  }
Line 513 
Line 513 
                 char *argv[4];                  char *argv[4];
   
                 if (stdfd_devnull(1, 1, 0) == -1)                  if (stdfd_devnull(1, 1, 0) == -1)
                         fatal("%s: stdfd_devnull failed", __func__);                          fatal_f("stdfd_devnull failed");
                 closefrom(STDERR_FILENO + 1);                  closefrom(STDERR_FILENO + 1);
   
                 argv[0] = shell;                  argv[0] = shell;
Line 530 
Line 530 
         }          }
         /* Parent. */          /* Parent. */
         if (pid == -1)          if (pid == -1)
                 fatal("%s: fork: %.100s", __func__, strerror(errno));                  fatal_f("fork: %.100s", strerror(errno));
   
         while (waitpid(pid, &status, 0) == -1) {          while (waitpid(pid, &status, 0) == -1) {
                 if (errno != EINTR && errno != EAGAIN)                  if (errno != EINTR && errno != EAGAIN)
                         fatal("%s: waitpid: %s", __func__, strerror(errno));                          fatal_f("waitpid: %s", strerror(errno));
         }          }
         if (!WIFEXITED(status)) {          if (!WIFEXITED(status)) {
                 error("command '%.100s' exited abnormally", cmd);                  error("command '%.100s' exited abnormally", cmd);
Line 1451 
Line 1451 
                     (u_char) arg[1] >= 64 && (u_char) arg[1] < 128)                      (u_char) arg[1] >= 64 && (u_char) arg[1] < 128)
                         value = (u_char) arg[1] & 31;                          value = (u_char) arg[1] & 31;
                 else {                  else {
                           value = 0;      /* Avoid compiler warning. */
                         fatal("%.200s line %d: Bad escape character.",                          fatal("%.200s line %d: Bad escape character.",
                             filename, linenum);                              filename, linenum);
                         /* NOTREACHED */  
                         value = 0;      /* Avoid compiler warning. */  
                 }                  }
                 if (*activep && *intptr == -1)                  if (*activep && *intptr == -1)
                         *intptr = value;                          *intptr = value;
Line 1852 
Line 1851 
                 return 0;                  return 0;
   
         default:          default:
                 fatal("%s: Unimplemented opcode %d", __func__, opcode);                  fatal_f("Unimplemented opcode %d", opcode);
         }          }
   
         /* Check that there is no garbage at end of line. */          /* Check that there is no garbage at end of line. */
Line 2254 
Line 2253 
         do { \          do { \
                 if ((r = kex_assemble_names(&options->what, \                  if ((r = kex_assemble_names(&options->what, \
                     defaults, all)) != 0) \                      defaults, all)) != 0) \
                         fatal("%s: %s: %s", __func__, #what, ssh_err(r)); \                          fatal_fr(r, "%s", #what); \
         } while (0)          } while (0)
         ASSEMBLE(ciphers, def_cipher, all_cipher);          ASSEMBLE(ciphers, def_cipher, all_cipher);
         ASSEMBLE(macs, def_mac, all_mac);          ASSEMBLE(macs, def_mac, all_mac);
Line 2740 
Line 2739 
         all_key = sshkey_alg_list(0, 0, 1, ',');          all_key = sshkey_alg_list(0, 0, 1, ',');
         if ((r = kex_assemble_names(&o->hostkeyalgorithms, kex_default_pk_alg(),          if ((r = kex_assemble_names(&o->hostkeyalgorithms, kex_default_pk_alg(),
             all_key)) != 0)              all_key)) != 0)
                 fatal("%s: expand HostKeyAlgorithms: %s", __func__, ssh_err(r));                  fatal_fr(r, "expand HostKeyAlgorithms");
         free(all_key);          free(all_key);
   
         /* Most interesting options first: user, host, port */          /* Most interesting options first: user, host, port */

Legend:
Removed from v.1.339  
changed lines
  Added in v.1.340