mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-28 09:06:44 -06:00
Remove GetEffectiveRights control when ldap2.get_effective_rights fails.
Reviewed-By: Martin Kosek <mkosek@redhat.com>
This commit is contained in:
parent
d6fb110b77
commit
8b8774d138
@ -333,9 +333,11 @@ class ldap2(LDAPClient, CrudBackend):
|
|||||||
"krbPrincipalAux", base_dn=api.env.basedn)
|
"krbPrincipalAux", base_dn=api.env.basedn)
|
||||||
sctrl = [GetEffectiveRightsControl(True, "dn: " + str(entry.dn))]
|
sctrl = [GetEffectiveRightsControl(True, "dn: " + str(entry.dn))]
|
||||||
self.conn.set_option(_ldap.OPT_SERVER_CONTROLS, sctrl)
|
self.conn.set_option(_ldap.OPT_SERVER_CONTROLS, sctrl)
|
||||||
entry = self.get_entry(dn, attrs_list)
|
try:
|
||||||
# remove the control so subsequent operations don't include GER
|
entry = self.get_entry(dn, attrs_list)
|
||||||
self.conn.set_option(_ldap.OPT_SERVER_CONTROLS, [])
|
finally:
|
||||||
|
# remove the control so subsequent operations don't include GER
|
||||||
|
self.conn.set_option(_ldap.OPT_SERVER_CONTROLS, [])
|
||||||
return entry
|
return entry
|
||||||
|
|
||||||
def can_write(self, dn, attr):
|
def can_write(self, dn, attr):
|
||||||
|
Loading…
Reference in New Issue
Block a user