[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.274 and 1.275

version 1.274, 2006/03/28 00:12:31 version 1.275, 2006/03/30 10:41:25
Line 636 
Line 636 
                 options.control_path = NULL;                  options.control_path = NULL;
   
         if (options.control_path != NULL) {          if (options.control_path != NULL) {
                 char me[NI_MAXHOST];                  char thishost[NI_MAXHOST];
   
                 if (gethostname(me, sizeof(me)) == -1)                  if (gethostname(thishost, sizeof(thishost)) == -1)
                         fatal("gethostname: %s", strerror(errno));                          fatal("gethostname: %s", strerror(errno));
                 snprintf(buf, sizeof(buf), "%d", options.port);                  snprintf(buf, sizeof(buf), "%d", options.port);
                 cp = tilde_expand_filename(options.control_path,                  cp = tilde_expand_filename(options.control_path,
                     original_real_uid);                      original_real_uid);
                 options.control_path = percent_expand(cp, "p", buf, "h", host,                  options.control_path = percent_expand(cp, "p", buf, "h", host,
                     "r", options.user, "l", me, (char *)NULL);                      "r", options.user, "l", thishost, (char *)NULL);
                 xfree(cp);                  xfree(cp);
         }          }
         if (mux_command != 0 && options.control_path == NULL)          if (mux_command != 0 && options.control_path == NULL)
Line 1173 
Line 1173 
 static void  static void
 load_public_identity_files(void)  load_public_identity_files(void)
 {  {
         char *filename;          char *filename, *cp, thishost[NI_MAXHOST];
         int i = 0;          int i = 0;
         Key *public;          Key *public;
           struct passwd *pw;
 #ifdef SMARTCARD  #ifdef SMARTCARD
         Key **keys;          Key **keys;
   
Line 1199 
Line 1200 
                 xfree(keys);                  xfree(keys);
         }          }
 #endif /* SMARTCARD */  #endif /* SMARTCARD */
           if ((pw = getpwuid(original_real_uid)) == NULL)
                   fatal("load_public_identity_files: getpwuid failed");
           if (gethostname(thishost, sizeof(thishost)) == -1)
                   fatal("load_public_identity_files: gethostname: %s",
                       strerror(errno));
         for (; i < options.num_identity_files; i++) {          for (; i < options.num_identity_files; i++) {
                 filename = tilde_expand_filename(options.identity_files[i],                  cp = tilde_expand_filename(options.identity_files[i],
                     original_real_uid);                      original_real_uid);
                   filename = percent_expand(cp, "d", pw->pw_dir,
                       "u", pw->pw_name, "l", thishost, "h", host,
                       "r", options.user, (char *)NULL);
                   xfree(cp);
                 public = key_load_public(filename, NULL);                  public = key_load_public(filename, NULL);
                 debug("identity file %s type %d", filename,                  debug("identity file %s type %d", filename,
                     public ? public->type : -1);                      public ? public->type : -1);

Legend:
Removed from v.1.274  
changed lines
  Added in v.1.275