summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a683d09)
raw | patch | inline | side by side (parent: a683d09)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 2 Oct 2009 14:23:26 +0000 (14:23 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 2 Oct 2009 14:23:26 +0000 (14:23 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14490 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_config.inc | patch | blob | history | |
gosa-core/include/functions.inc | patch | blob | history |
index 6c7ed800886425a698dddb83c975506dbbee6d72..d696c19e155bdea925bf73741920c75d64b14462 100644 (file)
{
$this->current= $this->data['LOCATIONS'][$name];
- if (!isset($this->current['SAMBAVERSION'])){
- $this->current['SAMBAVERSION']= 3;
- }
if (!isset($this->current['USERRDN'])){
$this->current['USERRDN']= "ou=people";
}
}
/* Get samba servers from LDAP, in case of samba3 */
- if ($this->current['SAMBAVERSION'] == 3){
- $this->data['SERVERS']['SAMBA']= array();
- $ldap->cd ($this->current['BASE']);
- $ldap->search ("(objectClass=sambaDomain)");
- while ($attrs= $ldap->fetch()){
- $this->data['SERVERS']['SAMBA'][$attrs['sambaDomainName'][0]]= array( "SID" =>"","RIDBASE" =>"");
- if(isset($attrs["sambaSID"][0])){
- $this->data['SERVERS']['SAMBA'][$attrs['sambaDomainName'][0]]["SID"] = $attrs["sambaSID"][0];
- }
- if(isset($attrs["sambaAlgorithmicRidBase"][0])){
- $this->data['SERVERS']['SAMBA'][$attrs['sambaDomainName'][0]]["RIDBASE"] = $attrs["sambaAlgorithmicRidBase"][0];
- }
+ $this->data['SERVERS']['SAMBA']= array();
+ $ldap->cd ($this->current['BASE']);
+ $ldap->search ("(objectClass=sambaDomain)");
+ while ($attrs= $ldap->fetch()){
+ $this->data['SERVERS']['SAMBA'][$attrs['sambaDomainName'][0]]= array( "SID" =>"","RIDBASE" =>"");
+ if(isset($attrs["sambaSID"][0])){
+ $this->data['SERVERS']['SAMBA'][$attrs['sambaDomainName'][0]]["SID"] = $attrs["sambaSID"][0];
}
+ if(isset($attrs["sambaAlgorithmicRidBase"][0])){
+ $this->data['SERVERS']['SAMBA'][$attrs['sambaDomainName'][0]]["RIDBASE"] = $attrs["sambaAlgorithmicRidBase"][0];
+ }
+ }
- /* If no samba servers are found, look for configured sid/ridbase */
- if (count($this->data['SERVERS']['SAMBA']) == 0){
- if (!isset($this->current["SAMBASID"]) || !isset($this->current["SAMBARIDBASE"])){
- msg_dialog::display(_("Configuration error"), _("sambaSID and/or sambaRidBase missing in the configuration!"), ERROR_DIALOG);
- } else {
- $this->data['SERVERS']['SAMBA']['DEFAULT']= array(
- "SID" => $this->current["SAMBASID"],
- "RIDBASE" => $this->current["SAMBARIDBASE"]);
- }
+ /* If no samba servers are found, look for configured sid/ridbase */
+ if (count($this->data['SERVERS']['SAMBA']) == 0){
+ if (!isset($this->current["SAMBASID"]) || !isset($this->current["SAMBARIDBASE"])){
+ msg_dialog::display(_("Configuration error"), _("sambaSID and/or sambaRidBase missing in the configuration!"), ERROR_DIALOG);
+ } else {
+ $this->data['SERVERS']['SAMBA']['DEFAULT']= array(
+ "SID" => $this->current["SAMBASID"],
+ "RIDBASE" => $this->current["SAMBARIDBASE"]);
}
}
+
}
index 2eae062515b0a6657105affdd7fa3fa31eb91fa5..c09a59acf896815a5d55d8a12754e2fd47275bef 100644 (file)
list($lm,$nt)= split (":", trim($hash));
- if ($config->get_cfg_value("sambaversion") == 3) {
- $attrs['sambaLMPassword']= $lm;
- $attrs['sambaNTPassword']= $nt;
- $attrs['sambaPwdLastSet']= date('U');
- $attrs['sambaBadPasswordCount']= "0";
- $attrs['sambaBadPasswordTime']= "0";
- } else {
- $attrs['lmPassword']= $lm;
- $attrs['ntPassword']= $nt;
- $attrs['pwdLastSet']= date('U');
- }
+ $attrs['sambaLMPassword']= $lm;
+ $attrs['sambaNTPassword']= $nt;
+ $attrs['sambaPwdLastSet']= date('U');
+ $attrs['sambaBadPasswordCount']= "0";
+ $attrs['sambaBadPasswordTime']= "0";
return($attrs);
}