[Freeipa-devel] [PATCH] 254 Sort password policies properly with --pkey-only

Petr Viktorin pviktori at redhat.com
Thu Apr 26 09:05:07 UTC 2012


On 04/25/2012 04:41 PM, Martin Kosek wrote:
> Password policy plugin sorts password policies by its COS priority.
> However, when the pwpolicy-find command is run with --pkey-only,
> the resulting entries do not contain COS priority and the sort
> function crashes.
>
> This patch makes sure that cospriority is present in the time
> of the result sorting process and removes the cospriority again
> when the sorting is done. This way, the entries are sorted properly
> both with and without --pkey-only flag.
>
> Previous entries_sortfn member attribute of LDAPSearch class
> containing custom user sorting function was replaced just with
> a flag indicating if a sorting in LDAPSearch shall be done at all.
> This change makes it possible to sort entries in a custom
> post_callback which is much more powerful (and essential for
> sorting like in pwpolicy plugin) approach than a plain sorting
> function.
>
> https://fedorahosted.org/freeipa/ticket/2676
>

ACK

-- 
Petr³




More information about the Freeipa-devel mailing list