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

Diff for /src/usr.bin/ssh/authfd.c between version 1.28 and 1.29

version 1.28, 2000/09/21 11:07:50 version 1.29, 2000/10/09 21:51:00
Line 56 
Line 56 
 /* helper */  /* helper */
 int     decode_reply(int type);  int     decode_reply(int type);
   
   /* macro to check for "agent failure" message */
   #define agent_failed(x) \
       ((x == SSH_AGENT_FAILURE) || (x == SSH_COM_AGENT2_FAILURE))
   
 /* Returns the number of the authentication fd, or -1 if there is none. */  /* Returns the number of the authentication fd, or -1 if there is none. */
   
 int  int
Line 238 
Line 242 
   
         /* Get message type, and verify that we got a proper answer. */          /* Get message type, and verify that we got a proper answer. */
         type = buffer_get_char(&auth->identities);          type = buffer_get_char(&auth->identities);
         if (type == SSH_AGENT_FAILURE) {          if (agent_failed(type)) {
                 return NULL;                  return NULL;
         } else if (type != code2) {          } else if (type != code2) {
                 fatal("Bad authentication reply message type: %d", type);                  fatal("Bad authentication reply message type: %d", type);
Line 337 
Line 341 
         }          }
         type = buffer_get_char(&buffer);          type = buffer_get_char(&buffer);
   
         if (type == SSH_AGENT_FAILURE) {          if (agent_failed(type)) {
                 log("Agent admitted failure to authenticate using the key.");                  log("Agent admitted failure to authenticate using the key.");
         } else if (type != SSH_AGENT_RSA_RESPONSE) {          } else if (type != SSH_AGENT_RSA_RESPONSE) {
                 fatal("Bad authentication response: %d", type);                  fatal("Bad authentication response: %d", type);
Line 386 
Line 390 
                 return -1;                  return -1;
         }          }
         type = buffer_get_char(&msg);          type = buffer_get_char(&msg);
         if (type == SSH_AGENT_FAILURE) {          if (agent_failed(type)) {
                 log("Agent admitted failure to sign using the key.");                  log("Agent admitted failure to sign using the key.");
         } else if (type != SSH2_AGENT_SIGN_RESPONSE) {          } else if (type != SSH2_AGENT_SIGN_RESPONSE) {
                 fatal("Bad authentication response: %d", type);                  fatal("Bad authentication response: %d", type);
Line 533 
Line 537 
 {  {
         switch (type) {          switch (type) {
         case SSH_AGENT_FAILURE:          case SSH_AGENT_FAILURE:
           case SSH_COM_AGENT2_FAILURE:
                 log("SSH_AGENT_FAILURE");                  log("SSH_AGENT_FAILURE");
                 return 0;                  return 0;
         case SSH_AGENT_SUCCESS:          case SSH_AGENT_SUCCESS:

Legend:
Removed from v.1.28  
changed lines
  Added in v.1.29