aboutsummaryrefslogtreecommitdiffstats
path: root/config/dansguardian/dansguardian_ldap.php
diff options
context:
space:
mode:
authorbmeeks8 <bmeeks8@bellsouth.net>2013-01-29 18:38:43 -0500
committerbmeeks8 <bmeeks8@bellsouth.net>2013-01-29 18:38:43 -0500
commit7cd0a22659afa5036ea23c3fd1b485bce9d115c6 (patch)
treee585a9b2987044d89adc3a983b8ea6e0a33017a2 /config/dansguardian/dansguardian_ldap.php
parent2b73b7a8c03ba72ed189168656c934adfc8ed059 (diff)
parent7f9b922b709063e69dfa117883169c4b04a2b5a8 (diff)
downloadpfsense-packages-7cd0a22659afa5036ea23c3fd1b485bce9d115c6.tar.gz
pfsense-packages-7cd0a22659afa5036ea23c3fd1b485bce9d115c6.tar.bz2
pfsense-packages-7cd0a22659afa5036ea23c3fd1b485bce9d115c6.zip
Merge branch 'master' of https://github.com/bsdperimeter/pfsense-packages
Diffstat (limited to 'config/dansguardian/dansguardian_ldap.php')
-rw-r--r--config/dansguardian/dansguardian_ldap.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/config/dansguardian/dansguardian_ldap.php b/config/dansguardian/dansguardian_ldap.php
index c02289ac..d44f3de4 100644
--- a/config/dansguardian/dansguardian_ldap.php
+++ b/config/dansguardian/dansguardian_ldap.php
@@ -8,7 +8,7 @@
/*
dansguardian_ldap.php
part of pfSense (http://www.pfSense.com)
- Copyright (C) 2012 Marcello Coutinho
+ Copyright (C) 2012-2013 Marcello Coutinho
All rights reserved.
*/
@@ -17,7 +17,7 @@
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
- 1. Redistributions of source code must retain the above copyright notice,
+ 1. Redistributions of source code MUST retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
@@ -107,7 +107,13 @@ if (is_array($config['installedpackages']['dansguardiangroups']['config']))
$ldap_dn = $server['dn'];
$ldap_host=$server['dc'];
$mask=(empty($server['mask'])?"USER":$server['mask']);
- $result = get_ldap_members($group['name'],$server['username'].','.$server['dn'],$server['password']);
+ if (preg_match("/cn/",$server['username']))
+ $ldap_username=$server['username'].",".$server['dn'];
+ else
+ $ldap_username=$server['username'];
+ #$domainuser=split("cn=",$server['username']);
+ #$ldap_username=preg_replace("/,\./","@",$domainuser[1].preg_replace("/(,|)DC=/i",".",$server['dn']));
+ $result = get_ldap_members($group['name'],$ldap_username,$server['password']);
foreach($result as $key => $value) {
if (preg_match ("/\w+/",$value[0])){
#var_dump($value);