summaryrefslogtreecommitdiff
path: root/security/ssh/patches/patch-ao
blob: 81f3d3591eadfb80fc5652f41dd965475135e95e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
*** newchannels.c.orig	Tue Jan 20 07:24:06 1998
--- newchannels.c	Wed Mar 18 20:44:26 1998
***************
*** 241,247 ****
  #include "authfd.h"
  #include "emulate.h"
  #include "servconf.h"
! #ifdef LIBWRAP
  #include <tcpd.h>
  #include <syslog.h>
  #ifdef NEED_SYS_SYSLOG_H
--- 241,247 ----
  #include "authfd.h"
  #include "emulate.h"
  #include "servconf.h"
! #if defined(LIBWRAP) && defined(LIBWRAP_FWD)
  #include <tcpd.h>
  #include <syslog.h>
  #ifdef NEED_SYS_SYSLOG_H
***************
*** 881,887 ****
  	      sprintf(buf, "X11 connection from %.200s port %d",
  		      remote_hostname, get_peer_port(newsock));
  	      xfree(remote_hostname);
! #ifdef LIBWRAP
  	      {
  		struct request_info req;
  		struct servent *serv;
--- 881,887 ----
  	      sprintf(buf, "X11 connection from %.200s port %d",
  		      remote_hostname, get_peer_port(newsock));
  	      xfree(remote_hostname);
! #if defined(LIBWRAP) && defined(LIBWRAP_FWD)
  	      {
  		struct request_info req;
  		struct servent *serv;
***************
*** 932,938 ****
  		      ch->listening_port, remote_hostname,
  		      get_peer_port(newsock));
  	      xfree(remote_hostname);
! #ifdef LIBWRAP
  	      {
  		struct request_info req;
  		struct servent *serv;
--- 932,938 ----
  		      ch->listening_port, remote_hostname,
  		      get_peer_port(newsock));
  	      xfree(remote_hostname);
! #if defined(LIBWRAP) && defined(LIBWRAP_FWD)
  	      {
  		struct request_info req;
  		struct servent *serv;
***************
*** 2324,2329 ****
--- 2324,2333 ----
       ssh-agent connections on your system */
    old_umask = umask(S_IRUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH);
    
+   /* Make sure the socket doesn't already exist, left over from a system
+      crash perhaps. */
+   unlink(channel_forwarded_auth_socket_name);
+ 
    if (bind(sock, (struct sockaddr *)&sunaddr, AF_UNIX_SIZE(sunaddr)) < 0)
      packet_disconnect("Agent socket bind failed: %.100s", strerror(errno));