Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Jun 2017 00:27:09 +0000 (UTC)
From:      Ngie Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r319483 - stable/10/contrib/netbsd-tests/lib/libc/ssp
Message-ID:  <201706020027.v520R9lB024100@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ngie
Date: Fri Jun  2 00:27:08 2017
New Revision: 319483
URL: https://svnweb.freebsd.org/changeset/base/319483

Log:
  MFC r318210:
  
  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.

Modified:
  stable/10/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh
==============================================================================
--- stable/10/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh	Fri Jun  2 00:00:02 2017	(r319482)
+++ stable/10/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh	Fri Jun  2 00:27:08 2017	(r319483)
@@ -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



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