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

Diff for /src/usr.bin/ssh/ssh-agent.c between version 1.22 and 1.23

version 1.22, 1999/11/24 00:26:03 version 1.23, 1999/11/24 19:53:51
Line 180 
Line 180 
         /* Check if we have the key. */          /* Check if we have the key. */
         for (i = 0; i < num_identities; i++)          for (i = 0; i < num_identities; i++)
                 if (BN_cmp(identities[i].key->n, n) == 0) {                  if (BN_cmp(identities[i].key->n, n) == 0) {
                         /* We have this key.  Free the old key.  Since we                          /*
                            don\'t want to leave empty slots in the middle                           * We have this key.  Free the old key.  Since we
                            of the array, we actually free the key there                           * don\'t want to leave empty slots in the middle of
                            and copy data from the last entry. */                           * the array, we actually free the key there and copy
                            * data from the last entry.
                            */
                         RSA_free(identities[i].key);                          RSA_free(identities[i].key);
                         xfree(identities[i].comment);                          xfree(identities[i].comment);
                         if (i < num_identities - 1)                          if (i < num_identities - 1)
Line 282 
Line 284 
         /* Check if we already have the key. */          /* Check if we already have the key. */
         for (i = 0; i < num_identities; i++)          for (i = 0; i < num_identities; i++)
                 if (BN_cmp(identities[i].key->n, k->n) == 0) {                  if (BN_cmp(identities[i].key->n, k->n) == 0) {
                         /* We already have this key.  Clear and free the                          /*
                            new data and return success. */                           * We already have this key.  Clear and free the new
                            * data and return success.
                            */
                         RSA_free(k);                          RSA_free(k);
                         xfree(identities[num_identities].comment);                          xfree(identities[num_identities].comment);
   
Line 566 
Line 570 
         snprintf(socket_name, sizeof socket_name, "%s/agent.%d", socket_dir,          snprintf(socket_name, sizeof socket_name, "%s/agent.%d", socket_dir,
                  parent_pid);                   parent_pid);
   
         /* Create socket early so it will exist before command gets run          /*
            from the parent.  */           * Create socket early so it will exist before command gets run from
            * the parent.
            */
         sock = socket(AF_UNIX, SOCK_STREAM, 0);          sock = socket(AF_UNIX, SOCK_STREAM, 0);
         if (sock < 0) {          if (sock < 0) {
                 perror("socket");                  perror("socket");
Line 584 
Line 590 
                 perror("listen");                  perror("listen");
                 cleanup_exit(1);                  cleanup_exit(1);
         }          }
         /* Fork, and have the parent execute the command, if any, or          /*
            present the socket data.  The child continues as the           * Fork, and have the parent execute the command, if any, or present
            authentication agent. */           * the socket data.  The child continues as the authentication agent.
            */
         pid = fork();          pid = fork();
         if (pid == -1) {          if (pid == -1) {
                 perror("fork");                  perror("fork");

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.23