diff options
author | Brian Somers <brian@FreeBSD.org> | 1999-06-18 11:37:30 +0000 |
---|---|---|
committer | Brian Somers <brian@FreeBSD.org> | 1999-06-18 11:37:30 +0000 |
commit | 217092242053d2efb9d1663d351df3e3ff00be2a (patch) | |
tree | 93a9e956814cd710548e096a832b4fe7198958c1 /security/ssh/files/patch-aw | |
parent | Update yafc to 0.4.3. (diff) |
Only use trimdomain() if __FreeBSD_version > 320000
It was available in 3.0 & 3.1 but would truncate at UT_HOSTSIZE-1
Notes
Notes:
svn path=/head/; revision=19543
Diffstat (limited to '')
-rw-r--r-- | security/ssh/files/patch-aw | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/security/ssh/files/patch-aw b/security/ssh/files/patch-aw index d7e1e7482a7c..2f0b5a83fbb4 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)); - } |