5ef0f821ec
- Disable temporary HPN patch until HPN release new version. - Fix rc.d script path in sshd.8 - Add FreeBSD-${PKGNAME} in SSH_VERSION and SSH_RELEASE like src does. - Sync patches with src. Security: CVE-2006-4924, CVE-2006-5051
26 lines
711 B
C
26 lines
711 B
C
--- ssh.c.orig Sat Sep 2 02:32:40 2006
|
|
+++ ssh.c Sat Sep 30 10:38:05 2006
|
|
@@ -639,6 +640,23 @@
|
|
|
|
if (options.hostname != NULL)
|
|
host = options.hostname;
|
|
+
|
|
+ /* Find canonic host name. */
|
|
+ if (strchr(host, '.') == 0) {
|
|
+ struct addrinfo hints;
|
|
+ struct addrinfo *ai = NULL;
|
|
+ int errgai;
|
|
+ memset(&hints, 0, sizeof(hints));
|
|
+ hints.ai_family = options.address_family;
|
|
+ hints.ai_flags = AI_CANONNAME;
|
|
+ hints.ai_socktype = SOCK_STREAM;
|
|
+ errgai = getaddrinfo(host, NULL, &hints, &ai);
|
|
+ if (errgai == 0) {
|
|
+ if (ai->ai_canonname != NULL)
|
|
+ host = xstrdup(ai->ai_canonname);
|
|
+ freeaddrinfo(ai);
|
|
+ }
|
|
+ }
|
|
|
|
/* force lowercase for hostkey matching */
|
|
if (options.host_key_alias != NULL) {
|