summaryrefslogtreecommitdiffstats
path: root/src/etc/inc/priv.inc
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2017-01-11 09:54:30 -0200
committerRenato Botelho <renato@netgate.com>2017-01-11 09:54:34 -0200
commit00a9abb934149d919693e63a9e78aea6748e1447 (patch)
tree8554f8ceeb298bca85b42768578372bbf33d4738 /src/etc/inc/priv.inc
parente95b87befde6bec0576c4477a3e7303314c370a6 (diff)
downloadpfsense-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.inc5
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}");
}
}
OpenPOWER on IntegriCloud