<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Aug 11, 2015 at 1:34 AM, Jan Cholasta <span dir="ltr"><<a href="mailto:jcholast@redhat.com" target="_blank">jcholast@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 6.8.2015 21:43, Gabe Alford wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
Updated patch attached.<br>
<br>
- Time limit is -1 for unlimited. I found this<br>
<a href="https://www.redhat.com/archives/freeipa-devel/2011-January/msg00330.html" rel="noreferrer" target="_blank">https://www.redhat.com/archives/freeipa-devel/2011-January/msg00330.html</a><br>
in reference to keeping the time limit as -1 for unlimited.<br>
</blockquote>
<br></span>
This patch does two conflicting things: it coerces time limit of 0 to -1 and at the same time prohibits the user to use 0 for time limit. We should do just one of these and IMHO it should be the coercion of 0 to -1.<span class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Sure enough, testing time limit at 0 did not work for unlimited as well<br>
as appeared to have negative effects on IPA.<br>
</blockquote>
<br></span>
This is because the time limit read from ipa config is not converted to int in ldap2.find_entries(), so the coercion does not work. Fix this and 0 will work just fine.<span class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Also, I believe that<br>
<a href="http://www.python-ldap.org/doc/html/ldap.html#ldap.LDAPObject.search_ext_s" rel="noreferrer" target="_blank">http://www.python-ldap.org/doc/html/ldap.html#ldap.LDAPObject.search_ext_s</a><br>
specifies unlimited for time limit as -1. (Please correct me if I am wrong.)<br>
</blockquote>
<br></span>
python-ldap is layers below our API and should not determine what we use for unlimited time limit. I would prefer if we were self-consistent and use 0 for both time limit and size limit.<br></blockquote><div><br></div><div>A misunderstanding on my part as I thought it was higher up in the API for some reason. Updated patch attached.</div><div> <br></div></div></div><div class="gmail_extra">Thanks,<br><br></div><div class="gmail_extra">Gabe<br></div></div>