<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 01/09/14 16:26, Martin Basti wrote:<br>
    </div>
    <blockquote cite="mid:54048203.4060708@redhat.com" type="cite">On
      28/08/14 14:01, Jan Cholasta wrote:
      <br>
      <blockquote type="cite">Hi,
        <br>
        <br>
        Dne 27.8.2014 v 15:22 Martin Basti napsal(a):
        <br>
        <blockquote type="cite">Patch attached.
          <br>
          <br>
        </blockquote>
        <br>
        1) Please rename object_exists to entry_exists.
        <br>
        <br>
        <br>
        2) Use empty attribute list in get_entry() in
        object_exists/entry_exists.
        <br>
        <br>
        <br>
        3) Please update LDAPObject.get_dn_if_exists() to use
        object_exists/entry_exists.
        <br>
        <br>
        <br>
        4) I'm not a fan of how do_bind() is laid out, IMHO something
        like this would be better (untested):
        <br>
        <br>
        +    def do_bind(self, dm_password=None, autobind=AUTOBIND_AUTO,
        timeout=DEFAULT_TIMEOUT):
        <br>
        +        if dm_password:
        <br>
        +            self.do_simple_bind(bindpw=dm_password,
        timeout=timeout)
        <br>
        +            return
        <br>
        +
        <br>
        +        if autobind != AUTOBIND_DISABLED and os.getegid() == 0
        and self.ldapi:
        <br>
        +            try:
        <br>
        +                # autobind
        <br>
        +                pw_name = pwd.getpwuid(os.geteuid()).pw_name
        <br>
        +                self.do_external_bind(pw_name, timeout=timeout)
        <br>
        +                return
        <br>
        +            except errors.NotFound:
        <br>
        +                if autobind == AUTOBIND_ENABLED:
        <br>
        +                    # autobind was required and failed, raise
        <br>
        +                    # exception that it failed
        <br>
        +                    raise
        <br>
        +
        <br>
        +        # Fall back
        <br>
        +        self.do_sasl_gssapi_bind(timeout=timeout)
        <br>
        <br>
        <br>
        Honza
        <br>
        <br>
      </blockquote>
      3) skipped as we discuss on IRC
      <br>
      <br>
      Updated patch attached
      <br>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Freeipa-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Freeipa-devel@redhat.com">Freeipa-devel@redhat.com</a>
<a class="moz-txt-link-freetext" href="https://www.redhat.com/mailman/listinfo/freeipa-devel">https://www.redhat.com/mailman/listinfo/freeipa-devel</a></pre>
    </blockquote>
    Please review, this should be in 4.1<br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Martin Basti</pre>
  </body>
</html>