[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.305 and 1.306

version 1.305, 2007/10/29 06:54:50 version 1.306, 2007/11/03 01:24:06
Line 1211 
Line 1211 
 load_public_identity_files(void)  load_public_identity_files(void)
 {  {
         char *filename, *cp, thishost[NI_MAXHOST];          char *filename, *cp, thishost[NI_MAXHOST];
           char *pwdir = NULL, *pwname = NULL;
         int i = 0;          int i = 0;
         Key *public;          Key *public;
         struct passwd *pw;          struct passwd *pw;
Line 1239 
Line 1240 
 #endif /* SMARTCARD */  #endif /* SMARTCARD */
         if ((pw = getpwuid(original_real_uid)) == NULL)          if ((pw = getpwuid(original_real_uid)) == NULL)
                 fatal("load_public_identity_files: getpwuid failed");                  fatal("load_public_identity_files: getpwuid failed");
           pwname = strdup(pw->pw_name);
           pwdir = strdup(pw->pw_dir);
         if (gethostname(thishost, sizeof(thishost)) == -1)          if (gethostname(thishost, sizeof(thishost)) == -1)
                 fatal("load_public_identity_files: gethostname: %s",                  fatal("load_public_identity_files: gethostname: %s",
                     strerror(errno));                      strerror(errno));
         for (; i < options.num_identity_files; i++) {          for (; i < options.num_identity_files; i++) {
                 cp = 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,                  filename = percent_expand(cp, "d", pwdir,
                     "u", pw->pw_name, "l", thishost, "h", host,                      "u", pwname, "l", thishost, "h", host,
                     "r", options.user, (char *)NULL);                      "r", options.user, (char *)NULL);
                 xfree(cp);                  xfree(cp);
                 public = key_load_public(filename, NULL);                  public = key_load_public(filename, NULL);
Line 1256 
Line 1259 
                 options.identity_files[i] = filename;                  options.identity_files[i] = filename;
                 options.identity_keys[i] = public;                  options.identity_keys[i] = public;
         }          }
           bzero(pwname, strlen(pwname));
           free(pwname);
           bzero(pwdir, strlen(pwdir));
           free(pwdir);
 }  }
   
 static void  static void

Legend:
Removed from v.1.305  
changed lines
  Added in v.1.306