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

Martin Kosek mkosek at redhat.com
Wed Apr 25 14:41:28 UTC 2012


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-mkosek-254-sort-password-policies-properly-with-pkey-only.patch
Type: text/x-patch
Size: 5102 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20120425/950ee694/attachment.bin>


More information about the Freeipa-devel mailing list