mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-27 00:26:33 -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)
|
||||
sctrl = [GetEffectiveRightsControl(True, "dn: " + str(entry.dn))]
|
||||
self.conn.set_option(_ldap.OPT_SERVER_CONTROLS, sctrl)
|
||||
entry = self.get_entry(dn, attrs_list)
|
||||
# remove the control so subsequent operations don't include GER
|
||||
self.conn.set_option(_ldap.OPT_SERVER_CONTROLS, [])
|
||||
try:
|
||||
entry = self.get_entry(dn, attrs_list)
|
||||
finally:
|
||||
# remove the control so subsequent operations don't include GER
|
||||
self.conn.set_option(_ldap.OPT_SERVER_CONTROLS, [])
|
||||
return entry
|
||||
|
||||
def can_write(self, dn, attr):
|
||||
|
Loading…
Reference in New Issue
Block a user