diff options
author | Torsten Blum <torstenb@FreeBSD.org> | 1996-07-18 11:33:47 +0000 |
---|---|---|
committer | Torsten Blum <torstenb@FreeBSD.org> | 1996-07-18 11:33:47 +0000 |
commit | e1b1692d10b17c57230bcf2456aa863e214b07ba (patch) | |
tree | e49b4e665cb6afe6d33025a1d47bcc37c8135060 /security/ssh2/files/patch-ac | |
parent | dd89dbec592bc5da7f53dba5d94cc6107783308a (diff) | |
download | ports-e1b1692d10b17c57230bcf2456aa863e214b07ba.tar.gz ports-e1b1692d10b17c57230bcf2456aa863e214b07ba.zip |
Notes
Diffstat (limited to 'security/ssh2/files/patch-ac')
-rw-r--r-- | security/ssh2/files/patch-ac | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/security/ssh2/files/patch-ac b/security/ssh2/files/patch-ac new file mode 100644 index 000000000000..7701a515af29 --- /dev/null +++ b/security/ssh2/files/patch-ac @@ -0,0 +1,24 @@ +*** login.c.bak Thu Jun 6 15:39:34 1996 +--- login.c Mon Jun 17 19:56:43 1996 +*************** +*** 236,241 **** +--- 236,254 ---- + strncpy(u.ut_user, user, sizeof(u.ut_user)); + #endif /* HAVE_NAME_IN_UTMP */ + #ifdef HAVE_HOST_IN_UTMP ++ #ifdef __FreeBSD__ ++ if (strlen(host) > UT_HOSTSIZE) { ++ struct hostent *hp = gethostbyname(host); ++ ++ if (hp != NULL) { ++ struct in_addr in; ++ ++ memmove(&in, hp->h_addr, sizeof(in)); ++ host = inet_ntoa(in); ++ } else ++ host = "invalid hostname"; ++ } ++ #endif + strncpy(u.ut_host, host, sizeof(u.ut_host)); + #endif /* HAVE_HOST_IN_UTMP */ + #ifdef HAVE_ADDR_IN_UTMP |