diff options
author | Renato Botelho <renato@netgate.com> | 2017-01-11 09:54:30 -0200 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2017-01-11 09:54:34 -0200 |
commit | 00a9abb934149d919693e63a9e78aea6748e1447 (patch) | |
tree | 8554f8ceeb298bca85b42768578372bbf33d4738 /src/etc/inc/priv.inc | |
parent | e95b87befde6bec0576c4477a3e7303314c370a6 (diff) | |
download | pfsense-00a9abb934149d919693e63a9e78aea6748e1447.zip pfsense-00a9abb934149d919693e63a9e78aea6748e1447.tar.gz |
Only include files that ends with .inc
Diffstat (limited to 'src/etc/inc/priv.inc')
-rw-r--r-- | src/etc/inc/priv.inc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/etc/inc/priv.inc b/src/etc/inc/priv.inc index 0ca21cf..323d26c 100644 --- a/src/etc/inc/priv.inc +++ b/src/etc/inc/priv.inc @@ -87,14 +87,15 @@ function get_priv_files($directory) { // Load and sort privs $dir_array = get_priv_files("/etc/inc/priv"); foreach ($dir_array as $file) { - if (!is_dir("/etc/inc/priv/{$file}") && stristr($file, ".inc")) { + if (!is_dir("/etc/inc/priv/{$file}") && substr($file, -4) == ".inc") { include_once("/etc/inc/priv/{$file}"); } } if (is_dir("/usr/local/pkg/priv")) { $dir_array = get_priv_files("/usr/local/pkg/priv"); foreach ($dir_array as $file) { - if (!is_dir("/usr/local/pkg/priv/{$file}") && stristr($file, ".inc")) { + if (!is_dir("/usr/local/pkg/priv/{$file}") && + substr($file, -4) == ".inc") { include_once("/usr/local/pkg/priv/{$file}"); } } |