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

Diff for /src/usr.bin/ssh/ssh.c between version 1.478 and 1.479

version 1.478, 2018/06/01 03:11:49 version 1.479, 2018/06/01 03:33:53
Line 1244 
Line 1244 
         strlcpy(shorthost, thishost, sizeof(shorthost));          strlcpy(shorthost, thishost, sizeof(shorthost));
         shorthost[strcspn(thishost, ".")] = '\0';          shorthost[strcspn(thishost, ".")] = '\0';
         snprintf(portstr, sizeof(portstr), "%d", options.port);          snprintf(portstr, sizeof(portstr), "%d", options.port);
         snprintf(uidstr, sizeof(uidstr), "%d", pw->pw_uid);          snprintf(uidstr, sizeof(uidstr), "%llu",
               (unsigned long long)pw->pw_uid);
   
         if ((md = ssh_digest_start(SSH_DIGEST_SHA1)) == NULL ||          if ((md = ssh_digest_start(SSH_DIGEST_SHA1)) == NULL ||
             ssh_digest_update(md, thishost, strlen(thishost)) < 0 ||              ssh_digest_update(md, thishost, strlen(thishost)) < 0 ||
Line 1269 
Line 1270 
                     "L", shorthost,                      "L", shorthost,
                     "d", pw->pw_dir,                      "d", pw->pw_dir,
                     "h", host,                      "h", host,
                       "i", uidstr,
                     "l", thishost,                      "l", thishost,
                     "n", host_arg,                      "n", host_arg,
                     "p", portstr,                      "p", portstr,
Line 1289 
Line 1291 
                     "C", conn_hash_hex,                      "C", conn_hash_hex,
                     "L", shorthost,                      "L", shorthost,
                     "h", host,                      "h", host,
                       "i", uidstr,
                     "l", thishost,                      "l", thishost,
                     "n", host_arg,                      "n", host_arg,
                     "p", portstr,                      "p", portstr,
Line 1451 
Line 1454 
                 } else {                  } else {
                         p = tilde_expand_filename(options.identity_agent,                          p = tilde_expand_filename(options.identity_agent,
                             original_real_uid);                              original_real_uid);
                         cp = percent_expand(p, "d", pw->pw_dir,                          cp = percent_expand(p,
                             "u", pw->pw_name, "l", thishost, "h", host,                              "d", pw->pw_dir,
                             "r", options.user, (char *)NULL);                              "h", host,
                               "i", uidstr,
                               "l", thishost,
                               "r", options.user,
                               "u", pw->pw_name,
                               (char *)NULL);
                         setenv(SSH_AUTHSOCKET_ENV_NAME, cp, 1);                          setenv(SSH_AUTHSOCKET_ENV_NAME, cp, 1);
                         free(cp);                          free(cp);
                         free(p);                          free(p);
Line 1858 
Line 1866 
                     "L", shorthost,                      "L", shorthost,
                     "d", pw->pw_dir,                      "d", pw->pw_dir,
                     "h", host,                      "h", host,
                       "i", uidstr,
                     "l", thishost,                      "l", thishost,
                     "n", host_arg,                      "n", host_arg,
                     "p", portstr,                      "p", portstr,
Line 2056 
Line 2065 
         for (i = 0; i < options.num_certificate_files; i++) {          for (i = 0; i < options.num_certificate_files; i++) {
                 cp = tilde_expand_filename(options.certificate_files[i],                  cp = tilde_expand_filename(options.certificate_files[i],
                     original_real_uid);                      original_real_uid);
                 filename = percent_expand(cp, "d", pw->pw_dir,                  filename = percent_expand(cp,
                     "u", pw->pw_name, "l", thishost, "h", host,                      "d", pw->pw_dir,
                     "r", options.user, (char *)NULL);                      "h", host,
                       "i", host,
                       "l", thishost,
                       "r", options.user,
                       "u", pw->pw_name,
                       (char *)NULL);
                 free(cp);                  free(cp);
   
                 public = key_load_public(filename, NULL);                  public = key_load_public(filename, NULL);

Legend:
Removed from v.1.478  
changed lines
  Added in v.1.479