summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorotto <otto@openbsd.org>2016-10-07 05:47:24 +0000
committerotto <otto@openbsd.org>2016-10-07 05:47:24 +0000
commitc1b505a4d95b75b584d19ba31dbc3ef110cf5b9e (patch)
treef0e920dbb7d4c30f9143536526c2adad5380372f
parentsync (diff)
downloadwireguard-openbsd-c1b505a4d95b75b584d19ba31dbc3ef110cf5b9e.tar.xz
wireguard-openbsd-c1b505a4d95b75b584d19ba31dbc3ef110cf5b9e.zip
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@
-rw-r--r--etc/rc4
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/rc b/etc/rc
index 4ce80b09a5d..2b9de7d8585 100644
--- a/etc/rc
+++ b/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