diff options
author | PiBa-NL <pba_2k3@yahoo.com> | 2017-01-09 22:37:35 +0100 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2017-01-11 09:30:09 -0200 |
commit | 68ee58edd2ad8d0332c4cfbdcf8f676cf00479a9 (patch) | |
tree | 852148cbaa473aef098aba632de910b88f7277b8 /src/etc | |
parent | 1b03abe35bb9d384881be68f90cb304ff206ae76 (diff) | |
download | pfsense-68ee58edd2ad8d0332c4cfbdcf8f676cf00479a9.zip pfsense-68ee58edd2ad8d0332c4cfbdcf8f676cf00479a9.tar.gz |
openvpn, check for valid pid using isvalidpid()
(cherry picked from commit a1b39e949ab3a0e53ac4c1837f5d2c02b28142f3)
Diffstat (limited to 'src/etc')
-rw-r--r-- | src/etc/inc/openvpn.inc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/etc/inc/openvpn.inc b/src/etc/inc/openvpn.inc index 909e4a8..9d7bda2 100644 --- a/src/etc/inc/openvpn.inc +++ b/src/etc/inc/openvpn.inc @@ -1159,11 +1159,9 @@ function openvpn_restart($mode, $settings) { $i = 0; $pid = "--"; while ($i < 3000) { - if (file_exists($pfile) ) { + if (isvalidpid($pfile)) { $pid = rtrim(file_get_contents($pfile)); - if (is_numericint($pid)) { - break; - } + break; } usleep(1000); $i++; |