From 863fd0a08e3b012323e6facace83aa2616cb4b97 Mon Sep 17 00:00:00 2001 From: rpe <> Date: Thu, 12 Oct 2017 18:14:05 +0000 Subject: [PATCH] The testprogram for ld.so reordering is executed in tmpdir. Move tmpdir for reordering library from /tmp to /usr/lib. This allows to have /tmp mounted noexec. prompted by reports on misc@ OK deraadt@ tj@ tb@ --- src/etc/rc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/etc/rc b/src/etc/rc index e5901041..a0c1d732 100644 --- a/src/etc/rc +++ b/src/etc/rc @@ -1,4 +1,4 @@ -# $OpenBSD: rc,v 1.518 2017/10/10 19:07:50 rpe Exp $ +# $OpenBSD: rc,v 1.519 2017/10/12 18:14:05 rpe Exp $ # System startup script run by init on autoboot or after single-user. # Output and error are redirected to console by init, and the console is the @@ -186,7 +186,7 @@ reorder_libs() { _libas=${_libas# } for _liba in /usr/libdata/ld.so.a $_libas; do - _tmpdir=$(mktemp -dq /tmp/_librebuild.XXXXXXXXXXXX) && + _tmpdir=$(mktemp -dq /usr/lib/_rebuild.XXXXXXXXXXXX) && ( set -o errexit _install='install -F -S -o root -g bin -m 0444' @@ -213,7 +213,7 @@ reorder_libs() { ) || { _error=true; break; } done - rm -rf /tmp/_librebuild.* + rm -rf /usr/lib/_rebuild.* # Restore previous mount state if it was changed. if $_remount; then