<div dir="ltr">Hi,<div>I use the following code for calling <span class="gmail-s1" style="font-family:monaco;font-size:11px">sasl_client_init</span><span style="font-family:monaco;font-size:11px">():</span></div>
<div>
<p class="gmail-p1"> callback-><span class="gmail-s1">id</span> = <span class="gmail-s1">SASL_CB_GETPATH</span>;</p>
<p class="gmail-p1"> callback-><span class="gmail-s1">proc</span> = (<span class="gmail-s1">sasl_callback_ft</span>) &GetPluginPath;</p>
<p class="gmail-p1"> callback-><span class="gmail-s1">context</span> = (<span class="gmail-s2">void</span> *)(sasl_plugin_dir_path.<span class="gmail-s1">c_str</span>());</p>
<p class="gmail-p1"> ++callback;</p>
<p class="gmail-p2"><br></p>
<p class="gmail-p3"><span class="gmail-s3"> </span>/* user */</p>
<p class="gmail-p1"> callback-><span class="gmail-s1">id</span> = <span class="gmail-s1">SASL_CB_USER</span>;</p>
<p class="gmail-p1"> callback-><span class="gmail-s1">proc</span> = (<span class="gmail-s1">sasl_callback_ft</span>) &Simple;</p>
<p class="gmail-p1"> callback-><span class="gmail-s1">context</span> = <span class="gmail-s2">const_cast</span><<span class="gmail-s2">char</span> *>(<span class="gmail-s4">user_name_</span>.<span class="gmail-s1">c_str</span>());</p>
<p class="gmail-p1"> ++callback;</p>
<p class="gmail-p2"><br></p>
<p class="gmail-p3"><span class="gmail-s3"> </span>/* termination */</p>
<p class="gmail-p1"> callback-><span class="gmail-s1">id</span> = <span class="gmail-s1">SASL_CB_LIST_END</span>;</p>
<p class="gmail-p1"> callback-><span class="gmail-s1">proc</span> = <span class="gmail-s1">NULL</span>;</p>
<p class="gmail-p1"> callback-><span class="gmail-s1">context</span> = <span class="gmail-s1">NULL</span>;</p>
<p class="gmail-p1"> ++callback;</p>
<p class="gmail-p1"> rc = <span class="gmail-s1">sasl_client_init</span>(callbacks);</p><p class="gmail-p1"><br></p><p class="gmail-p1">
</p><p class="gmail-p1"><span class="gmail-s1">sasl_client_init</span>() returned 0.</p><p class="gmail-p1">But the following:</p><p class="gmail-p1"> <span class="gmail-s1">const</span> <span class="gmail-s1">char</span> *mechusing, *mechlist = <span class="gmail-s2">"GSSAPI"</span>;</p><p class="gmail-p2"><br></p><p class="gmail-p1"> <span class="gmail-s1">do</span> {</p><p class="gmail-p3"><span class="gmail-s3"> </span><span class="gmail-s4">currentReturnCode</span><span class="gmail-s3"> = </span><span class="gmail-s5">sasl_client_start</span><span class="gmail-s3">(</span><span class="gmail-s4">sconn_</span><span class="gmail-s3">, </span>/* the same context from above */<br></p><p class="gmail-p3"><span class="gmail-s3"> mechlist, </span>/* the list of mechanisms</p><p class="gmail-p3"> from the server */</p><p class="gmail-p1"> <span class="gmail-s6">NULL</span>, <span class="gmail-s7">/* filled in if an</span></p><p class="gmail-p3"> interaction is needed */</p><p class="gmail-p3"><span class="gmail-s3"> &out, </span>/* filled in on success */</p><p class="gmail-p3"><span class="gmail-s3"> &outlen, </span>/* filled in on success */</p><p class="gmail-p1">
</p><p class="gmail-p1"> &mechusing);</p><p class="gmail-p1">gave me -4.</p><p class="gmail-p1">I saw this auth log:</p><p class="gmail-p1"> Mar 14 09:01:33 5f4a350528ca client-test: No worthy mechs found<br></p><p class="gmail-p1">Under CYRUS_SASL_PLUGINS_DIR :</p><p class="gmail-p1"># ls /usr/lib/sasl2</p><p class="gmail-p1"><a href="http://libanonymous.la">libanonymous.la</a> <a href="http://libcrammd5.la">libcrammd5.la</a> <a href="http://libdigestmd5.la">libdigestmd5.la</a> <a href="http://libgs2.la">libgs2.la</a> <a href="http://libgssapiv2.la">libgssapiv2.la</a> <a href="http://libotp.la">libotp.la</a> <a href="http://libplain.la">libplain.la</a> <a href="http://libscram.la">libscram.la</a></p><p class="gmail-p1">libanonymous.so libcrammd5.so libdigestmd5.so libgs2.so libgssapiv2.so libotp.so libplain.so libscram.so</p><p class="gmail-p1">libanonymous.so.3 libcrammd5.so.3 libdigestmd5.so.3 libgs2.so.3 libgssapiv2.so.3 libotp.so.3 libplain.so.3 libscram.so.3</p><p class="gmail-p1">libanonymous.so.3.0.0 libcrammd5.so.3.0.0 libdigestmd5.so.3.0.0 libgs2.so.3.0.0 libgssapiv2.so.3.0.0 libotp.so.3.0.0 libplain.so.3.0.0 libscram.so.3.0.0</p><p class="gmail-p1"><br></p><p class="gmail-p1">Is there any lib which was missing ?</p><p class="gmail-p1">Thanks</p></div></div>