<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jan 28, 2014 at 4:10 PM, Simo Sorce <span dir="ltr">&lt;<a href="mailto:ssorce@redhat.com" target="_blank">ssorce@redhat.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="im">----- Original Message -----<br>
&gt; On Sun, Jan 26, 2014 at 9:36 PM, Simo Sorce &lt; <a href="mailto:simo@redhat.com">simo@redhat.com</a> &gt; wrote:<br>
<br>
</div><div class="im">&gt; &gt; I think we should have a conversation with them because this code could<br>
&gt; &gt; be also contributed directly to linux-nfs instead of sssd as it is now.<br>
<br>
&gt; That was my initial intention too, but after reading looking into the sssd<br>
&gt; source code and the various clients it provides, it felt more appropriate to<br>
&gt; make this plugin part of the sssd project.<br>
&gt; However, for that we&#39;ll need to have public API to access sssd. At the<br>
&gt; moment, I only see &quot;sss_nss_idmap.h&quot;, &quot;sss_idmap.h&quot; &amp; &quot;ipa_hbac.h&quot; publicly<br>
&gt; exported. Am I missing something here?<br>
<br>
</div>Well,<br>
technically getpw[nam|uid] and getgr[nam|gid] will give you access to the same<br>
data you are now pulling from sssd, or you can call the sssd client functions<br>
directly, if you are so inclined, by dlopening() the libnss_sss.so library and<br>
using the same standard interface glibc uses,<br>
eg: _nss_sss_getpwnam_r(); _nss_sss_getpwuid_r(); .. etc...<br>
<span class=""></span><br></blockquote></div>Calling getpw[nam|uid] and getgr[nam|gid] will go through NSS which misses the point of having a dedicated plugin (and there&#39;s already an NSS plugin for rpc.idmap).<br></div>
<div class="gmail_extra">Using dlopen() and calling _nss_sss_getpwnam_r() sound too much like a hack.<br></div><div class="gmail_extra">So I think we need sssd to export an official API if we&#39;re going in that direction.<br>
</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br>-- <br><div dir="ltr"><table cellpadding="0" cellspacing="0"><tbody><tr><td>Noam Meltzer<br>Linux Software Engineer<br>PRIMARY DATA<br><br>P.O. Box 12650, Herzliya Pituach 4673300<br>
9 Hamenofim St. Akerstein Towers, Tower A, 5th fl. Herzliya<br><br>Office: +972-77-8981888 | Fax: +972-3-7617140 | Mobile: +972-54-5873843<br><br>Email: <a href="mailto:noam@primarydata.com" target="_blank">noam@primarydata.com</a><br>
</td><td><span><label></label></span><br></td></tr></tbody></table></div>
</div></div>