From 7877c1d4b95c4851a69c396cb2504ba7079d3259 Mon Sep 17 00:00:00 2001 From: brian Date: Sun, 11 Apr 1999 09:10:34 +0000 Subject: Reduce the copy of the DISPLAY variable using trimdomain() so that ``ssh machine.domain xterm'' comes out with a machine name of (say) ``machine:10.0''. Reviewed by: torstenb@ --- security/ssh/files/patch-ao | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'security') diff --git a/security/ssh/files/patch-ao b/security/ssh/files/patch-ao index 5072ce4d394c..a0d88f7a33a9 100644 --- a/security/ssh/files/patch-ao +++ b/security/ssh/files/patch-ao @@ -1,5 +1,27 @@ ---- newchannels.c.orig Tue Apr 22 17:40:11 1997 -+++ newchannels.c Sat Jul 19 11:42:06 1997 +--- newchannels.c.orig Fri Apr 9 02:02:31 1999 ++++ newchannels.c Fri Apr 9 02:28:42 1999 +@@ -271,6 +271,11 @@ + #endif /* NEED_SYS_SYSLOG_H */ + #endif /* LIBWRAP */ + ++#ifdef __FreeBSD__ ++#include ++#include ++#endif ++ + /* Directory in which the fake unix-domain X11 displays reside. */ + #ifndef X11_DIR + #define X11_DIR "/tmp/.X11-unix" +@@ -1874,6 +1879,9 @@ + if (gethostname(hostname, sizeof(hostname)) < 0) + fatal("gethostname: %.100s", strerror(errno)); + sprintf(buf, "%.400s:%d.%d", hostname, display_number, screen_number); ++#if __FreeBSD_version >= 400004 ++ trimdomain(buf, UT_HOSTSIZE); ++#endif + #else /* HAVE_GETHOSTNAME */ + if (uname(&uts) < 0) + fatal("uname: %s", strerror(errno)); @@ -2139,6 +2139,10 @@ ssh-agent connections on your system */ old_umask = umask(S_IRUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH); -- cgit