[Freeipa-devel] [PATCH 363 find all group pwd policy
Rob Crittenden
rcritten at redhat.com
Wed Feb 3 18:28:19 UTC 2010
Pavel Zuna wrote:
> Rob Crittenden wrote:
>> Provide pwpolicy-find command to display all group-specific password
>> policies.
>>
>> find is a bit of a misnomer since you can't provide any terms to limit
>> the search scope, but it's a start. I'm not sure this is the kind of
>> thing we need/want to be able to query things like "give me all the
>> policies where the max lifetime is > 20 days". But I could be wrong.
>>
>> rob
>>
>
> entries = tuple(e for (dn, e) in entries)
> for entry in xrange(len(entries)):
> _convert_time_for_output(entries[entry])
>
> Should be:
>
> for e in entries:
> _convert_time_for_output(e[1])
> e[1]['dn'] = e[0]
> entries = tuple(e for (dn, e) in entries)
>
> Otherwise DNs is lost in the conversion from (dn, entry_attrs) to
> entry_with_dn_as_dict. Also, there's no need for xrange - I'm using it
> myself in LDAPSearch.execute(), but that's because I overwrite elements
> in the entries list. (And as I think about it now, overwriting elements
> there is also unnecessary, so it will be removed in a future patch.)
>
> Everything else about the patch is fine.
>
> Pavel
Good point about the dn, fixed and pushed to master.
rob
More information about the Freeipa-devel
mailing list