summaryrefslogtreecommitdiffstats
path: root/ldap-site-mngmt/webinterface/lib/dhcp_management_functions.php
diff options
context:
space:
mode:
authorTarik Gasmi2007-10-26 10:41:22 +0200
committerTarik Gasmi2007-10-26 10:41:22 +0200
commit310554c02e4b51c5300f8bdf8ad15e3f0520bc53 (patch)
tree277727e7c13eeaec94fe8089f547f3108b727bcc /ldap-site-mngmt/webinterface/lib/dhcp_management_functions.php
parentThis should fix a small bug reported by Reiner for SuSE10.3 in stage3. (diff)
downloadcore-310554c02e4b51c5300f8bdf8ad15e3f0520bc53.tar.gz
core-310554c02e4b51c5300f8bdf8ad15e3f0520bc53.tar.xz
core-310554c02e4b51c5300f8bdf8ad15e3f0520bc53.zip
LSM Webinterface, new actualized Version
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1401 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'ldap-site-mngmt/webinterface/lib/dhcp_management_functions.php')
-rw-r--r--ldap-site-mngmt/webinterface/lib/dhcp_management_functions.php20
1 files changed, 11 insertions, 9 deletions
diff --git a/ldap-site-mngmt/webinterface/lib/dhcp_management_functions.php b/ldap-site-mngmt/webinterface/lib/dhcp_management_functions.php
index 05d47f49..97259728 100644
--- a/ldap-site-mngmt/webinterface/lib/dhcp_management_functions.php
+++ b/ldap-site-mngmt/webinterface/lib/dhcp_management_functions.php
@@ -673,18 +673,18 @@ function check_ip_in_subnet($ip,$subnet) {
#########################
# Pools
-function add_dhcppool ($dhcpsubnetdn,$range,$unknownclients,$dhcpservicedn){
+function add_dhcppool ($dhcpsubnetdn,$range,$unknownclients,$dhcpservicedn,$rbssrvdn){
global $ds, $suffix, $auDN, $ldapError;
-
+
if(!($result = uniLdapSearch($ds, "cn=dhcp,".$auDN,"(objectclass=*)", array("cn"), "dn", "list", 0, 0))) {
- # redirect(5, "", $ldapError, FALSE);
- echo "no search";
- die;
+ # redirect(5, "", $ldapError, FALSE);
+ echo "no search";
+ die;
}
$result = ldapArraySauber($result);
- $dhcpcn_array = array();
+ $dhcpcn_array = array();
foreach ($result as $item){
$dhcpcn_array [] = $item['cn'];
}
@@ -696,7 +696,7 @@ function add_dhcppool ($dhcpsubnetdn,$range,$unknownclients,$dhcpservicedn){
}
}
$dhcppoolDN = "cn=".$cn.",cn=dhcp,".$auDN;
-
+
$entrydhcp ['objectclass'][0] = "dhcpPool";
$entrydhcp ['objectclass'][1] = "dhcpOptions";
$entrydhcp ['objectclass'][2] = "top";
@@ -710,15 +710,17 @@ function add_dhcppool ($dhcpsubnetdn,$range,$unknownclients,$dhcpservicedn){
}else{
$entrydhcp ['dhcpoptdeny'] = "unknown-clients";
}
+ if ( $rbssrvdn != "none" ){
+ $entrydhcp ['hlprbservice'] = $rbssrvdn;
+ }
print_r($dhcppoolDN);echo "<br><br>";
print_r($entrydhcp);echo "<br><br>";
-
+
if ($result = ldap_add($ds,$dhcppoolDN,$entrydhcp)){
return 1;
}else{return 0;}
-
}