]> git.entuzijast.net Git - freeradius-dialup-admin.git/commitdiff
Map a specific username to the directory manager if we are using ldap and http authen...
authorkkalev <kkalev>
Sun, 13 Oct 2002 18:46:48 +0000 (18:46 +0000)
committerkkalev <kkalev>
Sun, 13 Oct 2002 18:46:48 +0000 (18:46 +0000)
Changelog
conf/admin.conf
lib/ldap/functions.php3

index 8273aaa784775a8c50b057d841f79782ce936a1d..7c2409387cb509b0db977eccde6febca0d551f97 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -26,6 +26,7 @@ Ver 1.60:
   user_info will not work in that case.
 * Fix a small bug in lib/ldap/defaults.php3. We should not be using $i in a for() loop but a new variable
 * Add a comment in admin.conf about ldap server failover
+* Map a specific username to the directory manager if we are using ldap and http authentication
 Ver 1.59:
 * Small html fixes in user_edit.php3 and password.php3
 * Show number of failed logins in the last 7 days in the user admin page
index c5ea4e7c719b830667ac560e2db94b2d96bc9ae7..f9cc061bb6fb7315dad0573923af48c980f95749 100644 (file)
@@ -143,6 +143,13 @@ ldap_regular_profile_attr: dialupregularprofile
 # with a filter of (uid=<username>). Normally, the anonymous (empty DN)
 # user can do that.
 #ldap_use_http_credentials: yes
+#
+# If we are using http credentials we can map a specific username to the
+# directory manager (which usually does not correspond to a specific username)
+#
+#ldap_directory_manager: cn=Directory Manager
+#ldap_map_to_directory_manager: admin
+
 
 #
 # can be one of mysql,pg where:
index a1170d69925bf63ac516882db4be7651467a0894..ac095c6fa4e7866b1a280cb5ab39182a35795c30 100644 (file)
@@ -6,6 +6,10 @@ function da_ldap_bind($ds,$config)
                        global $HTTP_SERVER_VARS;
                        $din = $HTTP_SERVER_VARS["PHP_AUTH_USER"];
                        $pass = $HTTP_SERVER_VARS["PHP_AUTH_PW"];
+                       if ($config[ldap_map_to_directory_manager] != '' &&
+                       $din == $config[ldap_map_to_directory_manager] &&
+                       $config[ldap_directory_manager] != '')
+                               $din = $config[ldap_directory_manager];
                }
                if ($config[ldap_use_http_credentials] != 'yes' ||
                        ($din == '' && $pass == '')){