Community
    • Categories
    • Recent
    • Popular
    • Users
    • Search
    • Register
    • Login
    1. Home
    2. hsz
    3. Posts
    H
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 4
    • Posts 12
    • Groups 0

    Posts

    Recent Best Controversial
    • Export Templtes werden nicht dargestellt

      in 0.9.9-7 werden die Exporttemplates nicht mehr angezeigt.
      der folgende Patch korrigiert das

      Index: src/themes/default/smarty/templates/modules/export/step1.tpl

      –- src/themes/default/smarty/templates/modules/export/step1.tpl (Revision 9230)
      +++ src/themes/default/smarty/templates/modules/export/step1.tpl (Arbeitskopie)
      @@ -4,7 +4,8 @@
          @ license: <http: www.i-doit.com="" en="" resources="" licensing-terms="">*}]

      -[{if $smarty.get.pid eq "2"}]
      +[{assign var="pid" value=$smarty.const.C__GET__SETTINGS_PAGE}]
      +[{if $smarty.get.$pid eq "2"}]
      [{if $g_list}]
      [{$g_list}]
      [{else}]</http:>

      posted in Entwicklung
      H
      hsz
    • Standard LDAP Filter funktioniert nicht mit OpenLdap

      objectClass=user als Standardfilter funktioniert bei mir nicht.
      der folgende patch setzt den Standardfilter auf objectClass=*

      Index: src/themes/default/smarty/templates/content/bottom/content/module__ldap.tpl

      –- src/themes/default/smarty/templates/content/bottom/content/module__ldap.tpl (Revision XX)
      +++ src/themes/default/smarty/templates/content/bottom/content/module__ldap.tpl (Arbeitskopie)
      @@ -33,7 +33,7 @@

      function add_filter(p_title, p_value, p_type, p_link_type, p_operator) {

      • if(p_title == "objectClass" && p_value == "user"){
      • if(p_title == "objectClass" && p_value == "*"){
        var disable_all = 'disabled';
        var onclick_disable = 'onclick="javascript: return false;"';
        var readonly = 'readonly';
        @@ -135,7 +135,7 @@
        '' + custom_select + '' +
        '' + custom_select2 + '';
      • if(p_title != "objectClass" && p_value != "user"){
      • if(p_title != "objectClass" && p_value != "*"){
        l_insert += '[ Entfernen](javascript:;)';
        }

      @@ -225,7 +225,7 @@

      Filter:

      • [{isys type="f_text" p_strTitle="Default: (objectClass=user)" name="C__MODULE__LDAP__FILTER" tab="60"}]
      • [{isys type="f_text" p_strTitle="Default: (objectClass=*)" name="C__MODULE__LDAP__FILTER" tab="60"}]

      @@ -269,4 +269,4 @@
      [{/foreach}]
      [{/if}]

      -[{/if}]
      \ No newline at end of file
      +[{/if}]
      Index: src/classes/modules/isys_module_ldap.class.php

      –- src/classes/modules/isys_module_ldap.class.php (Revision XX)
      +++ src/classes/modules/isys_module_ldap.class.php (Arbeitskopie)
      @@ -957,7 +957,7 @@
        $l_rules["C__MODULE__LDAP__ACTIVE"]["p_arData"] = isys_glob_pack(get_smarty_arr_YES_NO());
        $l_rules["C__MODULE__LDAP__PORT"]["p_strValue"] = "389";
        $l_rules["C__MODULE__LDAP__TIMELIMIT"]["p_strValue"] = "30";

      • $l_rules["C__MODULE__LDAP__FILTER"]["p_strValue"] = "(objectClass=user)";
      • $l_rules["C__MODULE__LDAP__FILTER"]["p_strValue"] = "(objectClass=*)";
        $l_rules["C__MODULE__LDAP__FILTER"]["p_bReadonly"] = true;
        $l_versions = array("1" => "1", "2" => "2", "3" => "3");
          $l_rules["C__MODULE__LDAP__VERSION"]["p_arData"] = isys_glob_pack($l_versions);
        @@ -983,11 +983,11 @@
        if (!$l_filter_exists)
        {
        $l_filter_data = array('attributes' => array('objectClass'),
      • 'values' => array('user'),
      • 'values' => array('*'),
          'field_type' => array('3'),
          'field_link_type' => array('&'),
          'field_operator' => array('='));
      • $l_filter = "(objectClass=user)";
      • $l_filter = "(objectClass=*)";
        }

      $g_comp_template->assign("g_recursive", $l_data["isys_ldap__recursive"]);
      @@ -1015,7 +1015,7 @@
      else
      {
        $l_filter_data = array('attributes' => array('objectClass'),

      • 'values' => array('user'),
      • 'values' => array('*'),
            'field_type' => array('3'),
            'field_link_type' => array('&'),
            'field_operator' => array('='));
        Index: setup/modules/ldap/files/src/themes/default/smarty/templates/content/bottom/content/module__ldap.tpl
        ===================================================================
        –- setup/modules/ldap/files/src/themes/default/smarty/templates/content/bottom/content/module__ldap.tpl (Revision XX)
        +++ setup/modules/ldap/files/src/themes/default/smarty/templates/content/bottom/content/module__ldap.tpl (Arbeitskopie)
        @@ -33,7 +33,7 @@

      function add_filter(p_title, p_value, p_type, p_link_type, p_operator) {

      • if(p_title == "objectClass" && p_value == "user"){
      • if(p_title == "objectClass" && p_value == "*"){
        var disable_all = 'disabled';
        var onclick_disable = 'onclick="javascript: return false;"';
        var readonly = 'readonly';
        @@ -135,7 +135,7 @@
        '' + custom_select + '' +
        '' + custom_select2 + '';
      • if(p_title != "objectClass" && p_value != "user"){
      • if(p_title != "objectClass" && p_value != "*"){
        l_insert += '[ Entfernen](javascript:;)';
        }

      @@ -225,7 +225,7 @@

      Filter:

      • [{isys type="f_text" p_strTitle="Default: (objectClass=user)" name="C__MODULE__LDAP__FILTER" tab="60"}]
      • [{isys type="f_text" p_strTitle="Default: (objectClass=*)" name="C__MODULE__LDAP__FILTER" tab="60"}]

      @@ -269,4 +269,4 @@
      [{/foreach}]
      [{/if}]

      -[{/if}]
      \ No newline at end of file
      +[{/if}]
      Index: setup/modules/ldap/files/src/classes/modules/isys_module_ldap.class.php

      –- setup/modules/ldap/files/src/classes/modules/isys_module_ldap.class.php (Revision XX)
      +++ setup/modules/ldap/files/src/classes/modules/isys_module_ldap.class.php (Arbeitskopie)
      @@ -957,7 +957,7 @@
        $l_rules["C__MODULE__LDAP__ACTIVE"]["p_arData"] = isys_glob_pack(get_smarty_arr_YES_NO());
        $l_rules["C__MODULE__LDAP__PORT"]["p_strValue"] = "389";
        $l_rules["C__MODULE__LDAP__TIMELIMIT"]["p_strValue"] = "30";

      • $l_rules["C__MODULE__LDAP__FILTER"]["p_strValue"] = "(objectClass=user)";
      • $l_rules["C__MODULE__LDAP__FILTER"]["p_strValue"] = "(objectClass=*)";
        $l_rules["C__MODULE__LDAP__FILTER"]["p_bReadonly"] = true;
        $l_versions = array("1" => "1", "2" => "2", "3" => "3");
          $l_rules["C__MODULE__LDAP__VERSION"]["p_arData"] = isys_glob_pack($l_versions);
        @@ -983,11 +983,11 @@
        if (!$l_filter_exists)
        {
        $l_filter_data = array('attributes' => array('objectClass'),
      • 'values' => array('user'),
      • 'values' => array('*'),
          'field_type' => array('3'),
          'field_link_type' => array('&'),
          'field_operator' => array('='));
      • $l_filter = "(objectClass=user)";
      • $l_filter = "(objectClass=*)";
        }

      $g_comp_template->assign("g_recursive", $l_data["isys_ldap__recursive"]);
      @@ -1015,7 +1015,7 @@
      else
      {
        $l_filter_data = array('attributes' => array('objectClass'),

      • 'values' => array('user'),
      • 'values' => array('*'),
            'field_type' => array('3'),
            'field_link_type' => array('&'),
            'field_operator' => array('='));
      posted in Entwicklung
      H
      hsz
    • LDAP Filter werden nicht richtig übernommen

      der folgende Patch behebt einen Fehler, wenn für LDAP Filter definiert werden.
      Die Funktion rtrim erntfernt mehr ")" als ltrim "(".

      Index: src/classes/libraries/isys_library_ldap.class.php

      –- src/classes/libraries/isys_library_ldap.class.php (Revision XX)
      +++ src/classes/libraries/isys_library_ldap.class.php (Arbeitskopie)
      @@ -84,8 +84,8 @@
      !strstr($p_connection_array["isys_ldap__filter"], "=")) {
      $l_filter = "(".$l_map_username."=".$p_username.")";
      } else {

      • $l_current_filter = rtrim(ltrim($p_connection_array["isys_ldap__filter"], "("), ")");
      • $l_filter = "(&(".$l_current_filter.")(".$l_map_username."=".$p_username."))";
      • $l_current_filter = $p_connection_array["isys_ldap__filter"];
      • $l_filter = "(&".$l_current_filter."(".$l_map_username."=".$p_username."))";
        }

      $this->set_search_path($p_connection_array["isys_ldap__user_search"]);

      posted in Entwicklung
      H
      hsz
    • RE: Keine Standortzuordnung möglich.

      Bei mir hat es geholfen, die mitgelieferte Datei src/tools/js/scripts.js durch die Datei http://demo.i-doit.org/src/tools/js/scripts.js aus dem Online Demo zu ersetzten.

      posted in Entwicklung
      H
      hsz
    • RE: Relation error

      there seem to be differences in the src/tools/js/scripts.js script of the online demo and the one that is shipped with the download zip. When I exchanged the later with http://demo.i-doit.org/src/tools/js/scripts.js the popup worked like a charm.

      posted in Development
      H
      hsz
    • RE: Relation error

      I get the same "Parameter error" when I want to assign Users to Groups or Groups to Users in a fresh installation
      no varibles an posted by the ajax request and the js console says:
      Browser is not defined

      posted in Development
      H
      hsz
    • RE: LDAP Server konfiguration - Fehler in Eingabemaske

      Hast Du das LDAP Debugging eingeschaltet (in src/config.inc.php)?
      die Ausgabe in temp/ldap_debug.txt wäre interessant.

      Hardcore geht immer 😉
      UPDATE isys_ldap SET isys_ldap__filter = '(objectClass=*)' WHERE isys_ldap__hostname = '<hostname ip="">'

      wird aber durch die Oberfläche wieder überschrieben</hostname>

      posted in Betrieb
      H
      hsz
    • RE: LDAP gegen MS-AD in 0.9.9-5 funktioniert nicht

      Wo kommt den der backslash "" im DN her, bzw. wo ist er hin?

      aus den Logs entnehme ich, daß die Anmeldung als
      DN: CN=Mantlik, Markus,OU=Users,OU=Hoechstaedt,OU=Sites,DC=siepha,DC=net
      nicht funktioniert, aber die Anmeldung als
      DN: CN=Mantlik, Markus,OU=Users,OU=Hoechstaedt,OU=Sites,DC=siepha,DC=net
      nachdem idoit den DN im LDAP anhand des Login ermittelt hat.

      Möglicherweise wird der DN nicht korrekt in die DB geschrieben.

      posted in Betrieb
      H
      hsz
    • RE: Einloggen mit LDAP führt zu "Invalid username or password!"

      gegen welches LDAP (OpenLdap,ADS,..) authentifizierst Du Dich, und wie?

      Evtl. hilft dir auch der Patch in http://forum.i-doit.org/index.php/topic,2356.msg8185.html#msg8185 weiter, wenn der Loginname nicht mit dem CN übereinstimmt.

      posted in Betrieb
      H
      hsz
    • RE: Fehler während Authentifizierung nach Editieren eines Nutzers

      Beim Update hat sich noch ein Bug eingeschlichen, da werden die ldap infos zweimal gesetzt.

      Index: classes/cmdb/dao/category/specific/isys_cmdb_dao_category_s_person_master.class.php
      ===================================================================
      --- classes/cmdb/dao/category/specific/isys_cmdb_dao_category_s_person_master.class.php	(Revision 37)
      +++ classes/cmdb/dao/category/specific/isys_cmdb_dao_category_s_person_master.class.php	(Arbeitskopie)
      @@ -122,15 +122,14 @@
       					"isys_cats_person_list__fax = ".$this->convert_sql_text($p_fax).", ".
       					"isys_cats_person_list__department = ".$this->convert_sql_text($p_department).", ".
       					"isys_cats_person_list__isys_connection__id = ".$this->convert_sql_id($l_id).", ".
      -					"isys_cats_person_list__isys_ldap__id = ".$this->convert_sql_id($p_ldap_server).", ".
      -					"isys_cats_person_list__ldap_dn = ".$this->convert_sql_text($p_ldap_dn).", ".
       					"isys_cats_person_list__description = ".$this->convert_sql_text($p_description).", ";
      
      -		if ($p_ldap_dn) {
      +		if ($p_ldap_dn>"")
       			$l_sql .= "isys_cats_person_list__ldap_dn = ".$this->convert_sql_text($p_ldap_dn).", ";
      -			$l_sql .= "isys_cats_person_list__isys_ldap__id = ".$this->convert_sql_text($p_ldap_server).", ";
      -		}
      -			
      +		
      +		if ($p_ldap_server > 0)
      +			$l_sql .= "isys_cats_person_list__isys_ldap__id = ".$this->convert_sql_id($p_ldap_server).", ";
      +		
       		$l_sql .= "isys_cats_person_list__status = ".$this->convert_sql_id($p_status)." ";
      
       		$l_sql .= "WHERE isys_cats_person_list__id = ".$this->convert_sql_id($p_id);
      @@ -170,11 +169,11 @@
       					"isys_cats_person_list__isys_obj__id = '".$p_obj_id."', ".
       					"isys_cats_person_list__description = ".$this->convert_sql_text($p_description).", ";
      
      -		if ($p_ldap_dn)
      +		if ($p_ldap_dn>"")
       			$l_sql .= "isys_cats_person_list__ldap_dn = ".$this->convert_sql_text($p_ldap_dn).", ";
      
       		if ($p_ldap_server > 0)
      -			$l_sql .= "isys_cats_person_list__isys_ldap__id = ".$this->convert_sql_text($p_ldap_server).", ";
      +			$l_sql .= "isys_cats_person_list__isys_ldap__id = ".$this->convert_sql_id($p_ldap_server).", ";
      
       		$l_sql .= "isys_cats_person_list__status = ".$this->convert_sql_id($p_status)." ";
      

      wer nicht will, dass die ldap-Einträge die Felder in der DB überschreiben, kann diesen patch nutzen

      
      Index: classes/cmdb/ui/specific/isys_cmdb_ui_category_s_person.class.php
      ===================================================================
      --- classes/cmdb/ui/specific/isys_cmdb_ui_category_s_person.class.php	(Revision 37)
      +++ classes/cmdb/ui/specific/isys_cmdb_ui_category_s_person.class.php	(Arbeitskopie)
      @@ -67,17 +67,25 @@
      
       				$p_data["ldap_cn"] = $l_ar["cn"][0];
      
      -				$p_data["isys_cats_person_list__mail_address"] = $l_ar["mail"][0];
      +				if($p_data["isys_cats_person_list__mail_address"]=="")
      +					$p_data["isys_cats_person_list__mail_address"] = $l_ar["mail"][0];
      
      -				$p_data["isys_cats_person_list__fist_name"] = utf8_decode($l_ar["givenname"][0]);
      -				$p_data["isys_cats_person_list__last_name"] = utf8_decode($l_ar["sn"][0]);
      +				if($p_data["isys_cats_person_list__fist_name"]=="")
      +					$p_data["isys_cats_person_list__fist_name"] = utf8_decode($l_ar["givenname"][0]);
      +				if($p_data["isys_cats_person_list__last_name"]=="")
      +					$p_data["isys_cats_person_list__last_name"] = utf8_decode($l_ar["sn"][0]);
      
      -				$p_data["isys_cats_person_list__phone_company"] = $l_ar["telephonenumber"][0];
      -				$p_data["isys_cats_person_list__phone_mobile"] = $l_ar["mobile"][0];
      -				$p_data["isys_cats_person_list__phone_home"] = $l_ar["homephone"][0];
      -				$p_data["isys_cats_person_list__fax"] = $l_ar["facsimiletelephonenumber"][0];
      +				if($p_data["isys_cats_person_list__phone_company"]=="")
      +					$p_data["isys_cats_person_list__phone_company"] = $l_ar["telephonenumber"][0];
      +				if($p_data["isys_cats_person_list__phone_mobile"]=="")
      +					$p_data["isys_cats_person_list__phone_mobile"] = $l_ar["mobile"][0];
      +				if($p_data["isys_cats_person_list__phone_home"]=="")
      +					$p_data["isys_cats_person_list__phone_home"] = $l_ar["homephone"][0];
      +				if($p_data["isys_cats_person_list__fax"]=="")
      +					$p_data["isys_cats_person_list__fax"] = $l_ar["facsimiletelephonenumber"][0];
      
      -				$p_data["isys_cats_person_list__department"] = utf8_decode($l_ar["department"][0]);
      +				if($p_data["isys_cats_person_list__department"]=="")
      +					$p_data["isys_cats_person_list__department"] = utf8_decode($l_ar["department"][0]);
      
       				$p_data["ldap_company"] = $l_ar["company"][0];
       				$p_data["ldap_description"] = $l_ar["description"][0];
      
      posted in Entwicklung
      H
      hsz
    • Keine Anmeldung trotz erfolgreicher LDAP Authentifizierung

      Bei folgendem "Spezialfall" funktioniert zwar die LDAP-Authentifizierung, i-doit springt aber in die Loginmaske zurück:
      wenn der DN nicht den loginnamen enthält, z.B. DN=cn=Max Musterman,dc=example,dc=org aber anhand der uid=musmax
      authentifiziert wird, dann liefert get_dn_by_username('cn=Max Musterman,dc=example,dc=org') nichts zurück.
      Folgender kleiner Patch behebt den Fehler in try_auth:

      Index: src/classes/libraries/ldapi/ldapi_acc.class.php
      ===================================================================
      --- src/classes/libraries/ldapi/ldapi_acc.class.php	(Revision 30)
      +++ src/classes/libraries/ldapi/ldapi_acc.class.php	(Arbeitskopie)
      @@ -95,7 +95,9 @@
      
        		if (!empty($l_username)) {
       			return $this->bind($l_username, utf8_encode($p_password));
      - 		}
      + 		} else {
      +			return $this->bind($p_username, utf8_encode($p_password));
      +		}
        	}
      
       	public function __construct($p_hostname = NULL) {
      
      
      posted in Entwicklung
      H
      hsz
    • RE: Fehler während Authentifizierung nach Editieren eines Nutzers

      Ich hab festgestellt, dass beim ersten anmelden eines LDAP Users eine andere ID in die linktabelle geschrieben wierd, als beim manuellen anlegen. Der folgende Patch holt sich die "richtige" ID. Dann funktioniert auch das editieren von LDAP-Benutzern

      
      Index: src/classes/modules/isys_module_ldap.class.php
      ===================================================================
      --- src/classes/modules/isys_module_ldap.class.php	(Revision 29)
      +++ src/classes/modules/isys_module_ldap.class.php	(Revision 30)
      @@ -137,6 +137,8 @@
       												);
      
       					if (is_numeric($l_user_id) && $l_user_id > 0) {
      +						$l_user=$l_user_dao->get_person_by_username($p_username)->__to_array();
      +						$l_user_id=$l_user['isys_cats_person_list__isys_obj__id'];
       						$this->debug("User account created. User-ID: ". $l_user_id);
      
       						/* Attach the recently created LDAP-user into the configured groups */
      @@ -159,6 +161,9 @@
       					} else {
       						$this->debug("Unknown error while creating the LDAP-User - Received an empty user-id.");
       					}
      +				} else {
      +					$l_user=$l_user_dao->get_person_by_username($p_username)->__to_array();
      +					$l_user_id=$l_user['isys_cats_person_list__isys_obj__id'];
       				}
      
       			} else if ($l_found_user == true) {
      
      
      posted in Entwicklung
      H
      hsz