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

Diff for /src/usr.bin/ssh/ssh-add.c between version 1.105 and 1.106

version 1.105, 2012/12/05 15:42:52 version 1.106, 2013/05/17 00:13:14
Line 84 
Line 84 
 {  {
         if (pass) {          if (pass) {
                 memset(pass, 0, strlen(pass));                  memset(pass, 0, strlen(pass));
                 xfree(pass);                  free(pass);
                 pass = NULL;                  pass = NULL;
         }          }
 }  }
Line 209 
Line 209 
                         pass = read_passphrase(msg, RP_ALLOW_STDIN);                          pass = read_passphrase(msg, RP_ALLOW_STDIN);
                         if (strcmp(pass, "") == 0) {                          if (strcmp(pass, "") == 0) {
                                 clear_pass();                                  clear_pass();
                                 xfree(comment);                                  free(comment);
                                 buffer_free(&keyblob);                                  buffer_free(&keyblob);
                                 return -1;                                  return -1;
                         }                          }
Line 276 
Line 276 
                 fprintf(stderr, "The user must confirm each use of the key\n");                  fprintf(stderr, "The user must confirm each use of the key\n");
  out:   out:
         if (certpath != NULL)          if (certpath != NULL)
                 xfree(certpath);                  free(certpath);
         xfree(comment);          free(comment);
         key_free(private);          key_free(private);
   
         return ret;          return ret;
Line 302 
Line 302 
                     add ? "add" : "remove", id);                      add ? "add" : "remove", id);
                 ret = -1;                  ret = -1;
         }          }
         xfree(pin);          free(pin);
         return ret;          return ret;
 }  }
   
Line 324 
Line 324 
                                     SSH_FP_HEX);                                      SSH_FP_HEX);
                                 printf("%d %s %s (%s)\n",                                  printf("%d %s %s (%s)\n",
                                     key_size(key), fp, comment, key_type(key));                                      key_size(key), fp, comment, key_type(key));
                                 xfree(fp);                                  free(fp);
                         } else {                          } else {
                                 if (!key_write(key, stdout))                                  if (!key_write(key, stdout))
                                         fprintf(stderr, "key_write failed");                                          fprintf(stderr, "key_write failed");
                                 fprintf(stdout, " %s\n", comment);                                  fprintf(stdout, " %s\n", comment);
                         }                          }
                         key_free(key);                          key_free(key);
                         xfree(comment);                          free(comment);
                 }                  }
         }          }
         if (!had_identities) {          if (!had_identities) {
Line 357 
Line 357 
                         passok = 0;                          passok = 0;
                 }                  }
                 memset(p2, 0, strlen(p2));                  memset(p2, 0, strlen(p2));
                 xfree(p2);                  free(p2);
         }          }
         if (passok && ssh_lock_agent(ac, lock, p1)) {          if (passok && ssh_lock_agent(ac, lock, p1)) {
                 fprintf(stderr, "Agent %slocked.\n", lock ? "" : "un");                  fprintf(stderr, "Agent %slocked.\n", lock ? "" : "un");
Line 365 
Line 365 
         } else          } else
                 fprintf(stderr, "Failed to %slock agent.\n", lock ? "" : "un");                  fprintf(stderr, "Failed to %slock agent.\n", lock ? "" : "un");
         memset(p1, 0, strlen(p1));          memset(p1, 0, strlen(p1));
         xfree(p1);          free(p1);
         return (ret);          return (ret);
 }  }
   

Legend:
Removed from v.1.105  
changed lines
  Added in v.1.106