tpokorra / KolabScripts

some scripts useful for Kolab3 and higher, written by TBits.net, including patches already submitted to Kolab Bugzilla
14 stars 13 forks source link

problem with ldap changes for TBits schema #61

Closed tpokorra closed 8 years ago

tpokorra commented 8 years ago

there is a cache used in classes_allowed in /usr/share/php/Net/LDAP3.php which is for 24 hours (86400 seconds)

when changing user attributes (eg uid readonly) within 24 hours in the Kolab Webadmin, the special objectclass (eg tbitsKolabUser) will not be saved.

tpokorra commented 8 years ago

in ./lib/client/kolab_client_task_settings.php type_form_prepare data[objectclass] does have all objectclasses

$sd = $this->form_element_select_data($fields['objectclass'], null, true);

does not show our special object classes eg tbitsKolabUser

form_element_select_data in ./lib/kolab_client_task.php

select_options_objectclass in lib/api/kolab_api_service_form_value.php

classes_allowed /usr/share/php/Net/LDAP3.php

init_schema in /usr/share/php/Net/LDAP3.php:

comment $_ldap->registerSchemaCache($_ldap_schema_cache); then it works!!!

see also /usr/share/pear/Net/LDAP2/SimpleFileSchemaCache.php

tpokorra commented 8 years ago

cache is supposedly in /tmp/localhost:389-Net_LDAP2_Schema.cache but I cannot find it there

http://help.directadmin.com/item.php?id=561

The reason for this, is that with CentOS 7 supports a feature called: 
PrivateTmp=true
What this feature does, is mounts /tmp and /var/tmp as private file systems, visible only to that proces

ok, the file is in /tmp/systemd-private-d61f14f8fb4047738b64557906db7b08-httpd.service-hfpphA/tmp/localhost:389-Net_LDAP2_Schema.cache