diff options
author | brian <brian@FreeBSD.org> | 1999-04-11 17:08:31 +0800 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1999-04-11 17:08:31 +0800 |
commit | ffb64fc67878f4aad18de99c42d89e1b806c437d (patch) | |
tree | d15dbef7aee6ca430e497aa79b06421d848d9f0e /security/ssh | |
parent | d5d23120d244703c01367a762f57912b2068e089 (diff) | |
download | freebsd-ports-gnome-ffb64fc67878f4aad18de99c42d89e1b806c437d.tar.gz freebsd-ports-gnome-ffb64fc67878f4aad18de99c42d89e1b806c437d.tar.zst freebsd-ports-gnome-ffb64fc67878f4aad18de99c42d89e1b806c437d.zip |
Call trimdomain() to reduce the size of the ut_host
field before reveting to storing an IP number.
Reviewed by: torstenb@
Diffstat (limited to 'security/ssh')
-rw-r--r-- | security/ssh/files/patch-aw | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/security/ssh/files/patch-aw b/security/ssh/files/patch-aw new file mode 100644 index 000000000000..067c8f4ce0f5 --- /dev/null +++ b/security/ssh/files/patch-aw @@ -0,0 +1,31 @@ +--- login.c.orig Wed Jul 8 17:40:36 1998 ++++ login.c Fri Apr 9 01:31:08 1999 +@@ -104,6 +104,10 @@ + #endif /* HAVE_HPUX_TCB_AUTH */ + #include "ssh.h" + ++#ifdef __FreeBSD__ ++#include <osreldate.h> ++#endif ++ + /* Returns the time when the user last logged in. Returns 0 if the + information is not available. This must be called before record_login. + The host the user logged in from will be returned in buf. */ +@@ -287,12 +291,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 >= 400004 ++ 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)); +- } ++ } else + #endif /* __FreeBSD__ */ ++ strncpy(u.ut_host, host, sizeof(u.ut_host)); + #endif /* HAVE_HOST_IN_UTMP */ + #ifdef HAVE_ADDR_IN_UTMP + if (addr) |