Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Oct 2008 14:55:41 +0000 (UTC)
From:      Dag-Erling Smorgrav <des@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r184415 - stable/7/crypto/openssh
Message-ID:  <200810281455.m9SEtfbe096757@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: des
Date: Tue Oct 28 14:55:41 2008
New Revision: 184415
URL: http://svn.freebsd.org/changeset/base/184415

Log:
  MFC (r184122): fix UseDNS option.
  
  Approved by:	re (kib)

Modified:
  stable/7/crypto/openssh/   (props changed)
  stable/7/crypto/openssh/loginrec.c
  stable/7/crypto/openssh/sshd.c

Modified: stable/7/crypto/openssh/loginrec.c
==============================================================================
--- stable/7/crypto/openssh/loginrec.c	Tue Oct 28 14:14:57 2008	(r184414)
+++ stable/7/crypto/openssh/loginrec.c	Tue Oct 28 14:55:41 2008	(r184415)
@@ -146,7 +146,6 @@
  */
 
 #include "includes.h"
-__RCSID("$FreeBSD$");
 
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -689,8 +688,8 @@ construct_utmp(struct logininfo *li,
 	strncpy(ut->ut_name, li->username,
 	    MIN_SIZEOF(ut->ut_name, li->username));
 # ifdef HAVE_HOST_IN_UTMP
-	realhostname_sa(ut->ut_host, sizeof ut->ut_host,
-	    &li->hostaddr.sa, li->hostaddr.sa.sa_len);
+	strncpy(ut->ut_host, li->hostname,
+	    MIN_SIZEOF(ut->ut_host, li->hostname));
 # endif
 # ifdef HAVE_ADDR_IN_UTMP
 	/* this is just a 32-bit IP address */

Modified: stable/7/crypto/openssh/sshd.c
==============================================================================
--- stable/7/crypto/openssh/sshd.c	Tue Oct 28 14:14:57 2008	(r184414)
+++ stable/7/crypto/openssh/sshd.c	Tue Oct 28 14:55:41 2008	(r184415)
@@ -72,6 +72,7 @@ __RCSID("$FreeBSD$");
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
+#include <utmp.h>
 
 #include <openssl/dh.h>
 #include <openssl/bn.h>
@@ -238,7 +239,7 @@ u_char *session_id2 = NULL;
 u_int session_id2_len = 0;
 
 /* record remote hostname or ip */
-u_int utmp_len = MAXHOSTNAMELEN;
+u_int utmp_len = UT_HOSTSIZE;
 
 /* options.max_startup sized array of fd ints */
 int *startup_pipes = NULL;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810281455.m9SEtfbe096757>