diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2011-10-12 23:04:03 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2011-10-12 23:04:03 +0000 |
commit | 2dab5b62e278e529431d17abfd16a8149a09d601 (patch) | |
tree | 0c7a8704819c56ff08281c49be143fc6f574a315 /etc/rc.d | |
parent | 08a4add62fa6d75b3ebe459572210d2b4b84f9df (diff) |
Localize _new_pexp unconditionally, or rc_read_runfile()
might pick it up from a polluted environment.
Requested by halex@, ok ajacoutot@ halex@
Diffstat (limited to 'etc/rc.d')
-rw-r--r-- | etc/rc.d/rc.subr | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/etc/rc.d/rc.subr b/etc/rc.d/rc.subr index 58af023f9c3..8cec999281a 100644 --- a/etc/rc.d/rc.subr +++ b/etc/rc.d/rc.subr @@ -1,4 +1,4 @@ -# $OpenBSD: rc.subr,v 1.53 2011/10/09 16:46:55 schwarze Exp $ +# $OpenBSD: rc.subr,v 1.54 2011/10/12 23:04:02 schwarze Exp $ # # Copyright (c) 2010, 2011 Antoine Jacoutot <ajacoutot@openbsd.org> # Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org> @@ -34,7 +34,8 @@ rc_write_runfile() { } rc_read_runfile() { - [ -f ${_RC_RUNFILE} ] && local _new_pexp=$(< ${_RC_RUNFILE}) + local _new_pexp + [ -f ${_RC_RUNFILE} ] && _new_pexp=$(< ${_RC_RUNFILE}) [ -n "${_new_pexp}" ] && pexp="${_new_pexp}" } |