<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 09/07/2012 05:53 AM, Ariel Barria
      wrote:<br>
    </div>
    <blockquote cite="mid:SNT120-W559C37AFD2034F85442354D2AF0@phx.gbl"
      type="cite">
      <style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
      <div dir="ltr">
        Patch sent for review.<br>
        <br>
        <a class="moz-txt-link-freetext" href="https://fedorahosted.org/sssd/ticket/1371">https://fedorahosted.org/sssd/ticket/1371</a> </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
sssd-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sssd-devel@lists.fedorahosted.org">sssd-devel@lists.fedorahosted.org</a>
<a class="moz-txt-link-freetext" href="https://lists.fedorahosted.org/mailman/listinfo/sssd-devel">https://lists.fedorahosted.org/mailman/listinfo/sssd-devel</a>
</pre>
    </blockquote>
    <br>
    Hi Ariel,<br>
    <br>
    I have not tested your patch, but I see some problems in it.<br>
    Do not set errno variable explicitly to 0. It is not how it is ment<br>
    to be used. Also ENOENT is not the only possible error, we<br>
    should check for the other errors as well. Also do not clear<br>
    the return value of stat.<br>
    <br>
    The check should look something like:<br>
    <br>
    ret = stat( ... );<br>
    if (ret != 0) {<br>
        if (errno == ENOENT) {<br>
            /* resolv.conf not found. This is the reason for this patch
    ...*/;<br>
        } else {<br>
            /* ... but we must check for other errors as well<br>
             (the error msg here can be more general) */<br>
        }<br>
    } else {<br>
        /* Here is everything OK */<br>
    }<br>
    <br>
    Thanks<br>
    Michal<br>
  </body>
</html>