diff options
author | Martin Kosek <mkosek@redhat.com> | 2011-11-14 17:03:44 +0100 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2011-11-15 13:17:44 +0100 |
commit | 2a3a4ae64a9c3fa41520058e24f20f4d3d941e48 (patch) | |
tree | 3c51f7b993602df309269244c429f85974b86ec2 /ipalib/plugins/pwpolicy.py | |
parent | 714b0d11ec5e6d756739bfca2cdf3bad31979615 (diff) | |
download | freeipa-2a3a4ae64a9c3fa41520058e24f20f4d3d941e48.tar.gz freeipa-2a3a4ae64a9c3fa41520058e24f20f4d3d941e48.tar.xz freeipa-2a3a4ae64a9c3fa41520058e24f20f4d3d941e48.zip |
Fix LDAP object parameter encoding
Parameters in LDAP objects missed an information if they are real
LDAP attributes or not. Real LDAP attributes are written to
entry_attrs dictionary in plugin callbacks and are being encoded.
This causes issues when plugin callbacks does not expect that
the parameters values are already encoded for submission to LDAP.
This patch introduces a new flag "noattribute" used to mark that
a parameter is not an LDAP attribute and thus should not be encoded
or added to entry_attrs. Param documentation is improved to describe
the meaning of this and other Param flags or attributes.
https://fedorahosted.org/freeipa/ticket/2097
Diffstat (limited to 'ipalib/plugins/pwpolicy.py')
-rw-r--r-- | ipalib/plugins/pwpolicy.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/ipalib/plugins/pwpolicy.py b/ipalib/plugins/pwpolicy.py index 6c5e6c56..db42bca0 100644 --- a/ipalib/plugins/pwpolicy.py +++ b/ipalib/plugins/pwpolicy.py @@ -263,6 +263,7 @@ class pwpolicy(LDAPObject): label=_('Priority'), doc=_('Priority of the policy (higher number means lower priority'), minvalue=0, + flags=('virtual_attribute',), ), ) + lockout_params @@ -344,8 +345,6 @@ class pwpolicy_add(LDAPCreate): keys[-1], krbpwdpolicyreference=dn, cospriority=options.get('cospriority') ) - if 'cospriority' in entry_attrs: - del entry_attrs['cospriority'] return dn def post_callback(self, ldap, dn, entry_attrs, *keys, **options): @@ -406,7 +405,6 @@ class pwpolicy_mod(LDAPUpdate): raise e else: setattr(context, 'cosupdate', True) - del entry_attrs['cospriority'] return dn def post_callback(self, ldap, dn, entry_attrs, *keys, **options): |