From bc56bde8af1769ea3d70185144de507b8b9d20cb Mon Sep 17 00:00:00 2001 From: otto <> Date: Fri, 7 Oct 2016 05:47:24 +0000 Subject: [PATCH] first set -max limit, then -cur, otherwise if -cur si higher than the current max, it won't be set. noted by Evgeny Grin; ok millert@ --- src/etc/rc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/etc/rc b/src/etc/rc index 4ce80b09..2b9de7d8 100644 --- a/src/etc/rc +++ b/src/etc/rc @@ -1,4 +1,4 @@ -# $OpenBSD: rc,v 1.489 2016/10/06 20:20:41 reyk Exp $ +# $OpenBSD: rc,v 1.490 2016/10/07 05:47:24 otto 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 @@ -31,7 +31,7 @@ update_limit() { local _cap=$2 _val # login.conf capability and its value local _suffix - for _suffix in {,-cur,-max}; do + for _suffix in {,-max,-cur}; do _val=$(getcap -f /etc/login.conf -s ${_cap}${_suffix} daemon 2>/dev/null) [[ -n $_val ]] || continue [[ $_val == infinity ]] && _val=unlimited