From owner-svn-src-head@freebsd.org Fri May 12 05:06:49 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7DF1BD68932; Fri, 12 May 2017 05:06:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 4FE6E85F; Fri, 12 May 2017 05:06:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C56mAk036170; Fri, 12 May 2017 05:06:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C56mKI036169; Fri, 12 May 2017 05:06:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705120506.v4C56mKI036169@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 12 May 2017 05:06:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318210 - head/contrib/netbsd-tests/lib/libc/ssp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 05:06:49 -0000 Author: ngie Date: Fri May 12 05:06:48 2017 New Revision: 318210 URL: https://svnweb.freebsd.org/changeset/base/318210 Log: ssp_test:read:: query the value of MAXPATHLEN via getconf(1) In the event the value of PATH_MAX was changed, the assumption that MAXPATHLEN is 1024 (and hence the buffer length required to trigger SSP to fail for read(2)) would be invalidated. Query getconf(1) for the actual value of MAXPATHLEN via _XOPEN_PATH_MAX instead, and increment the value by 1 to ensure that the SSP support tests the stack smashing support properly. MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh Modified: head/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh ============================================================================== --- head/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh Fri May 12 04:10:02 2017 (r318209) +++ head/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh Fri May 12 05:06:48 2017 (r318210) @@ -392,7 +392,8 @@ read_body() h_fail "$prog 1027" "echo bar |" else # End FreeBSD - h_fail "$prog 1025" "echo bar |" + MAX_PATH=$(getconf _XOPEN_MAX_PATH) || atf_fail "getconf failed" + h_fail "$prog $(( $MAX_PATH + 1))" "echo bar |" # Begin FreeBSD fi # End FreeBSD