summaryrefslogtreecommitdiff
path: root/security/ssh
diff options
context:
space:
mode:
authorBrian Somers <brian@FreeBSD.org>1999-04-11 09:10:34 +0000
committerBrian Somers <brian@FreeBSD.org>1999-04-11 09:10:34 +0000
commitefca57d6d3ce221078196b651306043be824b399 (patch)
tree1ce0e9ce3ee74c1c1dcca460118ef4ca8811e918 /security/ssh
parentCall trimdomain() to reduce the size of the ut_host (diff)
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@
Notes
Notes: svn path=/head/; revision=17770
Diffstat (limited to 'security/ssh')
-rw-r--r--security/ssh/files/patch-ao26
1 files changed, 24 insertions, 2 deletions
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 <osreldate.h>
++#include <utmp.h>
++#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);