aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1999-04-11 17:10:34 +0800
committerbrian <brian@FreeBSD.org>1999-04-11 17:10:34 +0800
commit7877c1d4b95c4851a69c396cb2504ba7079d3259 (patch)
tree3f238e12d8bff16644904a288c8a09bae39fb173 /security
parentffb64fc67878f4aad18de99c42d89e1b806c437d (diff)
downloadfreebsd-ports-gnome-7877c1d4b95c4851a69c396cb2504ba7079d3259.tar.gz
freebsd-ports-gnome-7877c1d4b95c4851a69c396cb2504ba7079d3259.tar.zst
freebsd-ports-gnome-7877c1d4b95c4851a69c396cb2504ba7079d3259.zip
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@
Diffstat (limited to 'security')
-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);