diff options
author | marcelloc <marcellocoutinho@gmail.com> | 2013-02-13 16:03:18 -0200 |
---|---|---|
committer | marcelloc <marcellocoutinho@gmail.com> | 2013-02-13 16:03:18 -0200 |
commit | 2388730502c5efed47ba808ff72abdedf20a3f2d (patch) | |
tree | 040ba19aa9a1958290d1da1da9f9dfef7b914628 /config/dansguardian/dansguardian_ldap.php | |
parent | 44150465a58c3574e76658655e5efce41f49c3ff (diff) | |
download | pfsense-packages-2388730502c5efed47ba808ff72abdedf20a3f2d.tar.gz pfsense-packages-2388730502c5efed47ba808ff72abdedf20a3f2d.tar.bz2 pfsense-packages-2388730502c5efed47ba808ff72abdedf20a3f2d.zip |
dansguardian - fix groups acls cheks, rename template xmls to avoid boot warnings and include more debug messages on dansguardian_ldap.php
Diffstat (limited to 'config/dansguardian/dansguardian_ldap.php')
-rw-r--r-- | config/dansguardian/dansguardian_ldap.php | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/config/dansguardian/dansguardian_ldap.php b/config/dansguardian/dansguardian_ldap.php index beb57ee0..33cbee91 100644 --- a/config/dansguardian/dansguardian_ldap.php +++ b/config/dansguardian/dansguardian_ldap.php @@ -130,9 +130,11 @@ if (is_array($config['installedpackages']['dansguardiangroups']['config'])) } } if (empty($members)){ - $config['installedpackages']['dansguardianusers']['config'][0][strtolower($group['name'])] = NULL; - $apply_config++; - } + if (!is_null($config['installedpackages']['dansguardianusers']['config'][0][strtolower($group['name'])])){ + $config['installedpackages']['dansguardianusers']['config'][0][strtolower($group['name'])] = NULL; + $apply_config++; + } + } else{ $import_users = explode("\n", $members); asort($import_users); @@ -146,11 +148,13 @@ if (is_array($config['installedpackages']['dansguardiangroups']['config'])) $id++; } if ($apply_config > 0){ - print "user list from LDAP is different from current group, applying new configuration..."; + print "User list from LDAP is different from current group, applying new configuration..."; write_config(); include("/usr/local/pkg/dansguardian.inc"); sync_package_dansguardian(); print "done\n"; +}else { + print "User list from LDAP is already the same as current group, no changes made\n"; } #mount filesystem read-only |