|
Lines 217-222
Link Here
|
| 217 |
if object['attributes'].has_key(dn_attr): |
217 |
if object['attributes'].has_key(dn_attr): |
| 218 |
dn_attr_val=object['attributes'][dn_attr][0] |
218 |
dn_attr_val=object['attributes'][dn_attr][0] |
| 219 |
|
219 |
|
|
|
220 |
if dn_attr: ## this is set to 'cn' by calling functions for (ocs4 == u'computer') |
| 221 |
ucs_rdn_attr = dn_attr |
| 222 |
else: |
| 223 |
ucs_rdn_attr = ucsattrib |
| 224 |
|
| 220 |
def dn_premapped(object, dn_key, dn_mapping_stored): |
225 |
def dn_premapped(object, dn_key, dn_mapping_stored): |
| 221 |
if (not dn_key in dn_mapping_stored) or (not object[dn_key]): |
226 |
if (not dn_key in dn_mapping_stored) or (not object[dn_key]): |
| 222 |
ud.debug(ud.LDAP, ud.INFO, "samaccount_dn_mapping: not premapped (in first instance)") |
227 |
ud.debug(ud.LDAP, ud.INFO, "samaccount_dn_mapping: not premapped (in first instance)") |
|
Lines 252-259
Link Here
|
| 252 |
pos = string.find(dn,'=') |
257 |
pos = string.find(dn,'=') |
| 253 |
pos2 = len(univention.s4connector.s4.explode_unicode_dn(dn)[0]) |
258 |
pos2 = len(univention.s4connector.s4.explode_unicode_dn(dn)[0]) |
| 254 |
attrib = dn[:pos] |
259 |
attrib = dn[:pos] |
| 255 |
if ucsobject and object.get('attributes') and object['attributes'].get(ucsattrib): |
260 |
|
| 256 |
value = object['attributes'][ucsattrib][0] |
261 |
if ucsobject and object.get('attributes') and object['attributes'].get(ucs_rdn_attr): |
|
|
262 |
value = object['attributes'][ucs_rdn_attr][0] |
| 263 |
if ocs4 == u'computer': ## equivalent to (dn_attr == 'cn') at the time of writing |
| 264 |
value = "%s$" % value |
| 257 |
else: |
265 |
else: |
| 258 |
value = dn[pos+1:pos2] |
266 |
value = dn[pos+1:pos2] |
| 259 |
|
267 |
|