diff options
author | Petr Viktorin <pviktori@redhat.com> | 2014-05-27 12:21:33 +0200 |
---|---|---|
committer | Petr Viktorin <pviktori@redhat.com> | 2014-05-28 15:58:24 +0200 |
commit | 8bbd52e347f3e6395d469528e1220fd9158e5609 (patch) | |
tree | b9f8362d643633c0a8f60c1f7abce20bd2b01c0b /ipalib/plugins/pwpolicy.py | |
parent | 8b7daf675e77d7a5e2de6eadb26ca3b682c0d67f (diff) | |
download | freeipa-8bbd52e347f3e6395d469528e1220fd9158e5609.tar.gz freeipa-8bbd52e347f3e6395d469528e1220fd9158e5609.tar.xz freeipa-8bbd52e347f3e6395d469528e1220fd9158e5609.zip |
pwpolicy-mod: Fix crash when priority is changed
The exc_callback was expecting the old update_entry signature,
(dn, attrs). This was changed to just (entry) for ticket #2660,
see http://www.freeipa.org/page/HowTo/Migrate_your_code_to_the_new_LDAP_API.
Update the exc_callback to expect the entry as first argument,
and add some tests.
https://fedorahosted.org/freeipa/ticket/4309
Reviewed-By: Martin Kosek <mkosek@redhat.com>
Diffstat (limited to 'ipalib/plugins/pwpolicy.py')
-rw-r--r-- | ipalib/plugins/pwpolicy.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ipalib/plugins/pwpolicy.py b/ipalib/plugins/pwpolicy.py index 9c8b711b8..ee7f388ba 100644 --- a/ipalib/plugins/pwpolicy.py +++ b/ipalib/plugins/pwpolicy.py @@ -456,7 +456,7 @@ class pwpolicy_mod(LDAPUpdate): def exc_callback(self, keys, options, exc, call_func, *call_args, **call_kwargs): if call_func.func_name == 'update_entry': if isinstance(exc, errors.EmptyModlist): - entry_attrs = call_args[1] + entry_attrs = call_args[0] cosupdate = getattr(context, 'cosupdate') if not entry_attrs or cosupdate: return |