[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.45.2.4 and 1.45.2.5

version 1.45.2.4, 2002/06/26 18:22:34 version 1.45.2.5, 2002/10/11 14:53:06
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.45.2.4  
changed lines
  Added in v.1.45.2.5