diff options
author | 2016-10-07 05:47:24 +0000 | |
---|---|---|
committer | 2016-10-07 05:47:24 +0000 | |
commit | c1b505a4d95b75b584d19ba31dbc3ef110cf5b9e (patch) | |
tree | f0e920dbb7d4c30f9143536526c2adad5380372f | |
parent | sync (diff) | |
download | wireguard-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/rc | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |