*** 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 #include #ifdef NEED_SYS_SYSLOG_H --- 241,247 ---- #include "authfd.h" #include "emulate.h" #include "servconf.h" ! #if defined(LIBWRAP) && defined(LIBWRAP_FWD) #include #include #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));