[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.56 and 1.57

version 1.56, 2002/06/25 16:22:42 version 1.57, 2002/09/11 18:27:26
Line 53 
Line 53 
 #include "log.h"  #include "log.h"
 #include "atomicio.h"  #include "atomicio.h"
   
   static int agent_present = 0;
   
 /* helper */  /* helper */
 int     decode_reply(int type);  int     decode_reply(int type);
   
Line 61 
Line 63 
     ((x == SSH_AGENT_FAILURE) || (x == SSH_COM_AGENT2_FAILURE) || \      ((x == SSH_AGENT_FAILURE) || (x == SSH_COM_AGENT2_FAILURE) || \
     (x == SSH2_AGENT_FAILURE))      (x == SSH2_AGENT_FAILURE))
   
   int
   ssh_agent_present(void)
   {
           int authfd;
   
           if (agent_present)
                   return 1;
           if ((authfd = ssh_get_authentication_socket()) == -1)
                   return 0;
           else {
                   ssh_close_authentication_socket(authfd);
                   return 1;
           }
   }
   
 /* 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 90 
Line 107 
                 close(sock);                  close(sock);
                 return -1;                  return -1;
         }          }
           agent_present = 1;
         return sock;          return sock;
 }  }
   

Legend:
Removed from v.1.56  
changed lines
  Added in v.1.57