Univention Bugzilla – Attachment 6591 Details for
Bug 34451
Import new license fails on DC Backup
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
34451.patch (text/plain), 1.43 KB, created by
Florian Best
on 2015-01-12 12:52 CET
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Florian Best
Created:
2015-01-12 12:52 CET
Size:
1.43 KB
patch
obsolete
>diff --git a/ucs-4.0-0/management/univention-management-console-module-udm/umc/python/udm/tools.py b/ucs-4.0-0/management/univention-management-console-module-udm/umc/python/udm/tools.py >index 969acc7..6f43f21 100644 >--- a/ucs-4.0-0/management/univention-management-console-module-udm/umc/python/udm/tools.py >+++ b/ucs-4.0-0/management/univention-management-console-module-udm/umc/python/udm/tools.py >@@ -38,6 +38,7 @@ import ldif > import binascii > > import univention.admin.uldap >+import univention.uldap > from univention.lib.i18n import Translation > > from univention.management.console.config import ucr >@@ -103,14 +104,13 @@ class LicenseImport(ldif.LDIFParser): > # self.mod_list.insert( 0, ( ldap.MOD_REPLACE, atr, entry[ atr ] ) ) > > def write(self, user_dn, passwd): >- ldap_con = ldap.open("localhost", port=int(ucr.get('ldap/server/port', 7389))) >- ldap_con.simple_bind_s(user_dn, passwd) >+ lo = univention.uldap.access(host=ucr['ldap/master'], port=int(ucr.get('ldap/master/port', 7389)), base=ucr['ldap/base'], binddn=user_dn, bindpw=passwd, follow_referral=True) > try: >- ldap_con.add_s(self.dn, self.addlist) >+ lo.add(self.dn, self.addlist) > except ldap.ALREADY_EXISTS: >- ldap_con.delete_s(self.dn) >- ldap_con.add_s(self.dn, self.addlist) >- ldap_con.unbind_s() >+ lo.delete(self.dn) >+ lo.add(self.dn, self.addlist) >+ lo.lo.unbind_s() > > # TODO: this should probably go into univention-lib > # and hide urllib/urllib2 completely
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 34451
: 6591