<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <br>
    <br>
    <div class="moz-cite-prefix">On 07/15/2015 08:53 AM, Petr Cech
      wrote:<br>
    </div>
    <blockquote cite="mid:55A6036D.3030401@redhat.com" type="cite">Hi,
      <br>
      <br>
      I investigated the situation around the log message, which
      mentioned Lukas. I prepared this patch. The result is that the
      original message
      <br>
      &gt; [sssd[be[cygnus.dev]]] [be_get_account_info] (0x0200): Got
      request for [0x1001][1][name=celestian]
      <br>
      changed to
      <br>
      &gt; [sssd[be[cygnus.dev]]] [be_get_account_info] (0x0200): Got
      request for [0x1001][FAST BE_REQ_USER][1][name=celestian]
      <br>
      <br>
      <br>
      A)
      <br>
      I would like to ask if mark 'FAST' is useful, or if I should
      remove it.
      <br>
    </blockquote>
    I think it can't hurt and might be useful, so IMO leave it.<br>
    <blockquote cite="mid:55A6036D.3030401@redhat.com" type="cite">
      <br>
      <br>
      B)
      <br>
      While writing a patch Lukas noticed another similar logging
      messages
      <br>
      &gt; [sssd[pam]] [sss_dp_get_account_msg] (0x0400): Creating
      request for [LDAP][3][1][name=mof_user6]
      <br>
      <br>
      I investigated it. This is the same thing -- BE_REQ_*, but it is
      no longer in the provider, but in the responder. Can you please
      advise me where I could the function 'be_req2str' write?<br>
    </blockquote>
    I think you should move it to separate file, as you don't want to
    share more code then necessary. <br>
    There are 2 possibilities where to have this file<br>
    a) in src/providers  - responders already link with some modules
    from this folder, so I suppose it's viable<br>
    <br>
    SSSD_RESPONDER_OBJ = \<br>
        ...<br>
        src/providers/data_provider_iface_generated.c \<br>
        src/providers/data_provider_iface_generated.h<br>
    <br>
    b) move it to src/util which is a natural place for shared code<br>
    <br>
    In my opinion a) is better because code is closely coupled with back
    end and is not general enough to be part of utils.<br>
    <br>
    Sorry for not giving definitive answers. :-)<br>
    <br>
    <blockquote type="cite">
      <pre wrap="">+
+const char* be_req2str(dbus_uint32_t req_type)
+{</pre>
    </blockquote>
    // I was thinking whether you should use some<br>
    static char output[??];<br>
    <br>
    //and fill it with "FAST" in a single condition and thus simplifying
    subsequent case<br>
    <pre wrap="">if (req_type &amp; BE_REQ_FAST0)
        sprintf(output, "FAST");
</pre>
    <br>
    <blockquote type="cite">
      <pre wrap="">
+    switch (req_type &amp; BE_REQ_TYPE_MASK) {
+    case BE_REQ_USER:
+        return req_type &amp; BE_REQ_FAST ? "FAST BE_REQ_USER" : "BE_REQ_USER";
+    case BE_REQ_GROUP:
+        return req_type &amp; BE_REQ_FAST ? "FAST BE_REQ_GROUP" : "BE_REQ_GROUP";
+    case BE_REQ_INITGROUPS:
+        return req_type &amp; BE_REQ_FAST ? "FAST BE_REQ_INITGROUPS" : "BE_REQ_INITGROUPS";
+    case BE_REQ_NETGROUP:
+        return req_type &amp; BE_REQ_FAST ? "FAST BE_REQ_NETGROUP" : "BE_REQ_NETGROUP";
+    case BE_REQ_SERVICES:
+        return req_type &amp; BE_REQ_FAST ? "FAST BE_REQ_SERVICES" : "BE_REQ_SERVICES";
+    case BE_REQ_SUDO_FULL:
+        return req_type &amp; BE_REQ_FAST ? "FAST BE_REQ_SUDO_FULL" : "BE_REQ_SUDO_FULL";
+    case BE_REQ_SUDO_RULES:
+        return req_type &amp; BE_REQ_FAST ? "FAST BE_REQ_SUDO_RULES" : "BE_REQ_SUDO_RULES";
+    case BE_REQ_AUTOFS:
+        return req_type &amp; BE_REQ_FAST ? "FAST BE_REQ_AUTOFS" : "BE_REQ_AUTOFS";
+    case BE_REQ_HOST:
+        return req_type &amp; BE_REQ_FAST ? "FAST BE_REQ_HOST" : "BE_REQ_HOST";
+    case BE_REQ_BY_SECID:
+        return req_type &amp; BE_REQ_FAST ? "FAST BE_REQ_BY_SECID" : "BE_REQ_BY_SECID";
+    case BE_REQ_USER_AND_GROUP:
+        return req_type &amp; BE_REQ_FAST ? "FAST BE_REQ_USER_AND_GROUP" : "BE_REQ_USER_AND_GROUP";
+    case BE_REQ_BY_UUID:
+        return req_type &amp; BE_REQ_FAST ? "FAST BE_REQ_BY_UUID" : "BE_REQ_BY_UUID";
+    case BE_REQ_BY_CERT:
+        return req_type &amp; BE_REQ_FAST ? "FAST BE_REQ_BY_CERT" : "BE_REQ_BY_CERT";
+    }
+    return "UNKNOWN_REQ";
+}
</pre>
    </blockquote>
    <br>
    <br>
    <blockquote cite="mid:55A6036D.3030401@redhat.com" type="cite">
      <br>
      The first message is coming from
      <br>
      &gt; src/providers/data_provider_be.c --&gt; be_get_account_info,
      <br>
      the second is from
      <br>
      &gt; src/responder/common/responder_dp --&gt;
      sss_dp_get_account_msg
      <br>
      <br>
      <br>
      Thanks.
      <br>
      <br>
      Petr
      <br>
      <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>
  </body>
</html>