From owner-svn-src-all@FreeBSD.ORG Fri Oct 17 20:39:40 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 01541367; Fri, 17 Oct 2014 20:39:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E1B5BAF4; Fri, 17 Oct 2014 20:39:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9HKddo4059990; Fri, 17 Oct 2014 20:39:39 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9HKdd53059989; Fri, 17 Oct 2014 20:39:39 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201410172039.s9HKdd53059989@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 17 Oct 2014 20:39:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r273240 - releng/10.1/usr.sbin/nscd X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Oct 2014 20:39:40 -0000 Author: jhb Date: Fri Oct 17 20:39:39 2014 New Revision: 273240 URL: https://svnweb.freebsd.org/changeset/base/273240 Log: MFS10 273238; Properly set the timeout in a query_state. The global query_timeout configuration value is an integer count of seconds, it is not a timeval. Using memcpy() to copy a timeval from it put garbage into the tv_usec field. PR: 194025 Approved by: re (gjb) Modified: releng/10.1/usr.sbin/nscd/query.c Directory Properties: releng/10.1/ (props changed) Modified: releng/10.1/usr.sbin/nscd/query.c ============================================================================== --- releng/10.1/usr.sbin/nscd/query.c Fri Oct 17 20:03:01 2014 (r273239) +++ releng/10.1/usr.sbin/nscd/query.c Fri Oct 17 20:39:39 2014 (r273240) @@ -1253,8 +1253,8 @@ init_query_state(int sockfd, size_t keve retval->read_func = query_socket_read; get_time_func(&retval->creation_time); - memcpy(&retval->timeout, &s_configuration->query_timeout, - sizeof(struct timeval)); + retval->timeout.tv_sec = s_configuration->query_timeout; + retval->timeout.tv_usec = 0; TRACE_OUT(init_query_state); return (retval);