1999-06-18 11:37:30 +00:00
|
|
|
--- newchannels.c.orig Wed May 12 12:19:27 1999
|
|
|
|
+++ newchannels.c Fri Jun 18 12:10:26 1999
|
|
|
|
@@ -282,6 +282,11 @@
|
1999-04-11 09:10:34 +00:00
|
|
|
#endif /* NEED_SYS_SYSLOG_H */
|
|
|
|
#endif /* LIBWRAP */
|
|
|
|
|
|
|
|
+#ifdef __FreeBSD__
|
|
|
|
+#include <utmp.h>
|
1999-06-18 11:37:30 +00:00
|
|
|
+#include <osreldate.h>
|
1999-04-11 09:10:34 +00:00
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
/* Directory in which the fake unix-domain X11 displays reside. */
|
|
|
|
#ifndef X11_DIR
|
|
|
|
#define X11_DIR "/tmp/.X11-unix"
|
1999-06-18 11:37:30 +00:00
|
|
|
@@ -1891,6 +1896,9 @@
|
1999-04-11 09:10:34 +00:00
|
|
|
fatal("gethostname: %.100s", strerror(errno));
|
1999-06-15 20:14:04 +00:00
|
|
|
snprintf(buf, sizeof(buf),
|
|
|
|
"%.400s:%d.%d", hostname, display_number, screen_number);
|
1999-06-18 11:37:30 +00:00
|
|
|
+#if __FreeBSD_version >= 320000
|
1999-04-11 09:10:34 +00:00
|
|
|
+ trimdomain(buf, UT_HOSTSIZE);
|
|
|
|
+#endif
|
|
|
|
#else /* HAVE_GETHOSTNAME */
|
|
|
|
if (uname(&uts) < 0)
|
1999-06-15 20:14:04 +00:00
|
|
|
fatal("uname: %.100s", strerror(errno));
|
1999-06-18 11:37:30 +00:00
|
|
|
@@ -2412,6 +2420,10 @@
|
1997-07-19 19:28:35 +00:00
|
|
|
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));
|
|
|
|
|