aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1999-06-18 19:37:30 +0800
committerbrian <brian@FreeBSD.org>1999-06-18 19:37:30 +0800
commitc1edcb915b6d005699d3ce1fe8ebd42577695ffb (patch)
tree2cba1c089ebb26d05a16af34d03f9718e35fe7ca
parent9636ad18695ec7c43e8637abba13ec9d784881b5 (diff)
downloadfreebsd-ports-graphics-c1edcb915b6d005699d3ce1fe8ebd42577695ffb.tar.gz
freebsd-ports-graphics-c1edcb915b6d005699d3ce1fe8ebd42577695ffb.tar.zst
freebsd-ports-graphics-c1edcb915b6d005699d3ce1fe8ebd42577695ffb.zip
Only use trimdomain() if __FreeBSD_version > 320000
It was available in 3.0 & 3.1 but would truncate at UT_HOSTSIZE-1
-rw-r--r--security/ssh/files/patch-ao13
-rw-r--r--security/ssh/files/patch-aw18
2 files changed, 22 insertions, 9 deletions
diff --git a/security/ssh/files/patch-ao b/security/ssh/files/patch-ao
index cd7a6f36b36..223dd447205 100644
--- a/security/ssh/files/patch-ao
+++ b/security/ssh/files/patch-ao
@@ -1,27 +1,28 @@
---- newchannels.c.orig Wed May 12 20:19:27 1999
-+++ newchannels.c Sun Jun 6 01:49:22 1999
-@@ -282,6 +282,10 @@
+--- newchannels.c.orig Wed May 12 12:19:27 1999
++++ newchannels.c Fri Jun 18 12:10:26 1999
+@@ -282,6 +282,11 @@
#endif /* NEED_SYS_SYSLOG_H */
#endif /* LIBWRAP */
+#ifdef __FreeBSD__
+#include <utmp.h>
++#include <osreldate.h>
+#endif
+
/* Directory in which the fake unix-domain X11 displays reside. */
#ifndef X11_DIR
#define X11_DIR "/tmp/.X11-unix"
-@@ -1891,6 +1895,9 @@
+@@ -1891,6 +1896,9 @@
fatal("gethostname: %.100s", strerror(errno));
snprintf(buf, sizeof(buf),
"%.400s:%d.%d", hostname, display_number, screen_number);
-+#ifdef __FreeBSD__
++#if __FreeBSD_version >= 320000
+ trimdomain(buf, UT_HOSTSIZE);
+#endif
#else /* HAVE_GETHOSTNAME */
if (uname(&uts) < 0)
fatal("uname: %.100s", strerror(errno));
-@@ -2412,6 +2419,10 @@
+@@ -2412,6 +2420,10 @@
ssh-agent connections on your system */
old_umask = umask(S_IRUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH);
diff --git a/security/ssh/files/patch-aw b/security/ssh/files/patch-aw
index d7e1e7482a7..2f0b5a83fbb 100644
--- a/security/ssh/files/patch-aw
+++ b/security/ssh/files/patch-aw
@@ -1,12 +1,24 @@
---- login.c.orig Wed May 12 20:19:26 1999
-+++ login.c Sun Jun 6 01:51:33 1999
-@@ -301,12 +301,13 @@
+--- login.c.orig Wed May 12 12:19:26 1999
++++ login.c Fri Jun 18 12:11:20 1999
+@@ -117,6 +117,9 @@
+ #include <hpsecurity.h>
+ #include <prot.h>
+ #endif /* HAVE_HPUX_TCB_AUTH */
++#ifdef __FreeBSD__
++#include <osreldate.h>
++#endif
+ #include "ssh.h"
+
+ /* Returns the time when the user last logged in. Returns 0 if the
+@@ -301,12 +304,15 @@
strncpy(u.ut_user, user, sizeof(u.ut_user));
#endif /* HAVE_NAME_IN_UTMP */
#ifdef HAVE_HOST_IN_UTMP
- strncpy(u.ut_host, host, sizeof(u.ut_host));
#ifdef __FreeBSD__
++#if __FreeBSD_version >= 320000
+ trimdomain(host, sizeof u.ut_host);
++#endif
if (strlen(host) > sizeof(u.ut_host)) {
strncpy(u.ut_host, get_remote_ipaddr(), sizeof(u.ut_host));
- }