[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.122 and 1.123

version 1.122, 2001/06/03 14:55:38 version 1.123, 2001/06/04 21:59:42
Line 2720 
Line 2720 
 /* removes the agent forwarding socket */  /* removes the agent forwarding socket */
   
 void  void
 auth_sock_cleanup_proc(void *ignored)  auth_sock_cleanup_proc(void *_pw)
 {  {
           struct passwd *pw = _pw;
   
         if (auth_sock_name) {          if (auth_sock_name) {
                   temporarily_use_uid(pw);
                 unlink(auth_sock_name);                  unlink(auth_sock_name);
                 rmdir(auth_sock_dir);                  rmdir(auth_sock_dir);
                 auth_sock_name = NULL;                  auth_sock_name = NULL;
                   restore_uid();
         }          }
 }  }
   
Line 2769 
Line 2773 
                  auth_sock_dir, (int) getpid());                   auth_sock_dir, (int) getpid());
   
         /* delete agent socket on fatal() */          /* delete agent socket on fatal() */
         fatal_add_cleanup(auth_sock_cleanup_proc, NULL);          fatal_add_cleanup(auth_sock_cleanup_proc, pw);
   
         /* Create the socket. */          /* Create the socket. */
         sock = socket(AF_UNIX, SOCK_STREAM, 0);          sock = socket(AF_UNIX, SOCK_STREAM, 0);
Line 2799 
Line 2803 
             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);                  auth_sock_cleanup_proc(pw);
                 close(sock);                  close(sock);
                 return 0;                  return 0;
         }          }

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