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

Diff for /src/usr.bin/ssh/channels.c between version 1.121 and 1.122

version 1.121, 2001/05/31 10:30:14 version 1.122, 2001/06/03 14:55:38
Line 2720 
Line 2720 
 /* removes the agent forwarding socket */  /* removes the agent forwarding socket */
   
 void  void
 cleanup_socket(void)  auth_sock_cleanup_proc(void *ignored)
 {  {
         unlink(auth_sock_name);          if (auth_sock_name) {
         rmdir(auth_sock_dir);                  unlink(auth_sock_name);
                   rmdir(auth_sock_dir);
                   auth_sock_name = NULL;
           }
 }  }
   
 /*  /*
Line 2765 
Line 2768 
         snprintf(auth_sock_name, MAXPATHLEN, "%s/agent.%d",          snprintf(auth_sock_name, MAXPATHLEN, "%s/agent.%d",
                  auth_sock_dir, (int) getpid());                   auth_sock_dir, (int) getpid());
   
         if (atexit(cleanup_socket) < 0) {          /* delete agent socket on fatal() */
                 int saved = errno;          fatal_add_cleanup(auth_sock_cleanup_proc, NULL);
                 cleanup_socket();  
                 packet_disconnect("socket: %.100s", strerror(saved));  
         }  
         /* Create the socket. */          /* Create the socket. */
         sock = socket(AF_UNIX, SOCK_STREAM, 0);          sock = socket(AF_UNIX, SOCK_STREAM, 0);
         if (sock < 0)          if (sock < 0)
Line 2798 
Line 2799 
             0, xstrdup("auth socket"), 1);              0, xstrdup("auth socket"), 1);
         if (nc == NULL) {          if (nc == NULL) {
                 error("auth_input_request_forwarding: channel_new failed");                  error("auth_input_request_forwarding: channel_new failed");
                   auth_sock_cleanup_proc(NULL);
                 close(sock);                  close(sock);
                 return 0;                  return 0;
         }          }

Legend:
Removed from v.1.121  
changed lines
  Added in v.1.122