Univention Bugzilla – Attachment 10262 Details for
Bug 50630
ADC sync_from_ucs: Group members are replaced as whole instead of applying a diff
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch? (git:fbest/50630-group-member-sync-from-ucs)
50630.patch (text/plain), 1.84 KB, created by
Florian Best
on 2019-12-12 08:32:07 CET
(
hide
)
Description:
patch? (git:fbest/50630-group-member-sync-from-ucs)
Filename:
MIME Type:
Creator:
Florian Best
Created:
2019-12-12 08:32:07 CET
Size:
1.84 KB
patch
obsolete
>commit 993dcf36062f559a5d4d2010c5a02442219201d2 >Author: Florian Best <best@univention.de> >Date: Thu Dec 12 08:30:52 2019 +0100 > > Bug #50630: Patch? > >diff --git services/univention-ad-connector/modules/univention/connector/ad/__init__.py services/univention-ad-connector/modules/univention/connector/ad/__init__.py >index b94c391f98..5f82791d58 100644 >--- services/univention-ad-connector/modules/univention/connector/ad/__init__.py >+++ services/univention-ad-connector/modules/univention/connector/ad/__init__.py >@@ -1802,24 +1802,10 @@ class ad(univention.connector.ucs): > ud.debug(ud.LDAP, ud.INFO, "group_members_sync_from_ucs: members to add: %s" % add_members) > ud.debug(ud.LDAP, ud.INFO, "group_members_sync_from_ucs: members to del: %s" % del_members) > >- if add_members or del_members: >- ad_members = ad_members + add_members >- for member in del_members: >- ad_members.remove(member) >- ud.debug(ud.LDAP, ud.INFO, "group_members_sync_from_ucs: members result: %s" % ad_members) >- object_ucs['dn'].lower() >- >- modlist_members = [] >- for member in ad_members: >- modlist_members.append(compatible_modstring(member)) >- >- try: >- self.lo_ad.lo.modify_s(compatible_modstring(object['dn']), [(ldap.MOD_REPLACE, 'member', modlist_members)]) >- except (ldap.SERVER_DOWN, SystemExit): >- raise >- except: # FIXME: which exception is to be caught? >- ud.debug(ud.LDAP, ud.WARN, "group_members_sync_from_ucs: failed to sync members: (%s,%s)" % (object['dn'], [(ldap.MOD_REPLACE, 'member', modlist_members)])) >- raise >+ if add_members: >+ self.lo_s4.lo.modify_s(compatible_modstring(object['dn']), [(ldap.MOD_ADD, 'member', list(map(compatible_modstring, add_members)))]) >+ if del_members: >+ self.lo_s4.lo.modify_s(compatible_modstring(object['dn']), [(ldap.MOD_DEL, 'member', list(map(compatible_modstring, del_members)))]) > > return True >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 50630
: 10262