summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e20e320)
raw | patch | inline | side by side (parent: e20e320)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 11 Sep 2008 07:14:06 +0000 (07:14 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 11 Sep 2008 07:14:06 +0000 (07:14 +0000) |
- DNS was only available for hosts if the tab object was configured in lowercase <tab class="servDNS"> was not working.
- Fixed problem with duplicated domain parts in ldap2zone. The doamin part in the host name will now be cut in the DNS settings.
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@12412 594d385d-05f5-0310-b6e9-bd551577e9d8
- Fixed problem with duplicated domain parts in ldap2zone. The doamin part in the host name will now be cut in the DNS settings.
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@12412 594d385d-05f5-0310-b6e9-bd551577e9d8
include/functions_dns.inc | patch | blob | history | |
plugins/admin/groups/class_groupMail.inc | patch | blob | history | |
plugins/admin/systems/class_termDNS.inc | patch | blob | history |
index 9a62acf4c0a2c5da9720620c3c180febe2cb42e5..d300589d76d39bd34866e486fc7f1fe35c9e0c70 100644 (file)
foreach($zonesArr as $nameServer => $nameServerArr){
$foundInTmp = array();
foreach($nameServerArr as $zoneArr => $zone){
+
+ /* Strip eventually domain part from hostname
+ */
+ $zN = trim($zone,".");
+ $nN = trim($name,".");
+ if(preg_match("/".normalizePreg($zN)."$/",$nN)){
+ $nN = preg_replace("/[\.]*".normalizePreg($zN)."[\.]*$/","",$nN);
+ }else{
+ $nN = $name;
+ }
+
$zoneMix = $nameServer."/".$zone;
$zoneDn = getDNSZoneDN($config,$zoneMix);
- $ldap->ls("(&(objectClass=dNSZone)(zoneName=*)(relativeDomainName=".$name.")(!(relativeDomainName=@)))", $zoneDn,$attrs = array("*"));
+ $ldap->ls("(&(objectClass=dNSZone)(zoneName=*)(relativeDomainName=".$nN.")(!(relativeDomainName=@)))", $zoneDn,$attrs = array("*"));
while($attrs = $ldap->fetch()){
$foundInTmp [$zoneMix] = $attrs['dn'];
$foundIn [$zoneMix] = $attrs['dn'];
$ldap->search("(&(objectClass=dNSZone)(zoneName=*)(!(relativeDomainName=@)))",array("*"));
while($attrs = $ldap->fetch()){
- /* If relative domainname == cn
- * Try to read dnsclass / TTl / zone
+ /* Strip eventually domain part from hostname
*/
- if($attrs['relativeDomainName'][0] == $name){
+ $zN = trim($attrs['zoneName'][0],".");
+ $nN = trim($name,".");
+ $testname = $attrs['relativeDomainName'][0].".".$zN;
+
+ /* Check given host name with zone settings
+ */
+ if(preg_match("/".normalizePreg($testname)."[\.]*$/",$nN) || $attrs['relativeDomainName'][0] == $name){
$ret['exists'] = true;
$ret['zoneName'] = $id_tmp;
foreach(array("dNSClass","dNSTTL") as $atr){
$zoneDn = getDNSZoneDN($config,$zoneNameMix);
$tmp = array_flip($zones);
$zoneName = getNameFromMix($zoneNameMix);
+
+ /* Strip domain part out of dns host entry
+ */
+ $zN = trim($zoneName,".");
+ $nN = trim($newName,".");
+ $oN = trim($oldName,".");
+ $newName = preg_replace("/[\.]*".normalizePreg($zN)."$/i","",$nN);
+ $oldName = preg_replace("/[\.]*".normalizePreg($zN)."$/i","",$oN);
/* If reverseZone can't be resolved ... this
* can't be a valid entry, so remove this account
index 775763c56ce61f3b794e6ace68a1733a3fac83d0..ab86f0fb3a8e43fb4676eda62f5e43c091830f22 100644 (file)
$method= new $this->method($this->config);
$method->fixAttributesOnStore($this);
if (($method->connect($this->gosaMailServer))){
- $method->updateMailbox($this->uid);
- $method->setQuota($this->uid, $this->gosaMailQuota);
+ $method->updateMailbox("share+".$this->uid);
+ $method->setQuota("share+".$this->uid, $this->gosaMailQuota);
/* Only write imap acls directly if we are not
* using a kolab like mail method.
index a9568b3c0cfb260516c8203aa06d76de3ca64730..9e90cb8bf3916db769bde4b5b4813d4019747aa4 100644 (file)
*/
$DNSenabled = false;
foreach($this->config->data['TABS']['SERVTABS'] as $tab){
- if(preg_match("/^servdns$/",$tab['CLASS'])){
+ if(preg_match("/^servdns$/i",$tab['CLASS'])){
$this->DNSenabled = true;
}
}