View | Details | Raw Unified | Return to bug 17852
Collapse All | Expand All

(-)a/univention/admin/locking.py (-4 / +8 lines)
 Lines 33-44   import univention.debug Link Here 
33
import univention.admin.uexceptions
33
import univention.admin.uexceptions
34
34
35
def lockDn(lo, position, type, value, scope):
35
def lockDn(lo, position, type, value, scope):
36
	dn='cn=%s,cn=%s,cn=temporary,cn=univention,' % (value, type)
36
	dn = [ [('cn', value,        ldap.AVA_STRING)],
37
	       [('cn', type,         ldap.AVA_STRING)],
38
	       [('cn', 'temporary',  ldap.AVA_STRING)],
39
	       [('cn', 'univention', ldap.AVA_STRING)],
40
	       ]
37
	if scope == 'domain':
41
	if scope == 'domain':
38
		dn+=position.getDomain()
42
		dn += ldap.dn.str2dn(position.getDomain())
39
	else:
43
	else:
40
		dn+=position.getBase()
44
		dn += ldap.dn.str2dn(position.getBase())
41
	return dn
45
	return ldap.dn.dn2str(dn)
42
46
43
def lock(lo, position, type, value, scope='domain', timeout=300):
47
def lock(lo, position, type, value, scope='domain', timeout=300):
44
48

Return to bug 17852