<div dir="ltr"><div><div><div>Since I was really working with two months old version of SSSD, I made completely new mirror of the newest SSSD on my github account and made some changes in code of my sss_query, so it is compatible with it now. There should be no problem with compiling anymore.<br>
<br></div>I also went through the code and changed it according to coding guidelines. About indentation, I use 4 spaces as coding style suggests, could you please specify where do I have it wrong? I also wrapped most of lines so they are not exceeding the 80 character limit, I just have kept some of them longer, cause in my opinion they would become unreadable, if wrapped, but still they are never longer than about 100 characters. <br>
<br></div>I also corrected the memory leaks and memory handling through out the application, so hopefully it is alright now.<br><br></div>David Bambušek<br><div class="gmail_extra"><br><br><div class="gmail_quote">2013/4/10 Jakub Hrozek <span dir="ltr">&lt;<a href="mailto:jhrozek@redhat.com" target="_blank">jhrozek@redhat.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Tue, Apr 09, 2013 at 11:24:40PM +0200, David Bambušek wrote:<br>
&gt; Dne 25.2.2013 11:50, Jakub Hrozek napsal(a):<br>
&gt; &gt;On Mon, Feb 25, 2013 at 11:11:01AM +0100, David Bambušek wrote:<br>
&gt; &gt;&gt;Greetings,<br>
&gt; &gt;&gt;my name is David Bambusek, and I am working on an application , that will<br>
&gt; &gt;&gt;be used as a tool for querying SSSD database. I am curently a student of<br>
&gt; &gt;&gt;FIT VUT Brno and this is topic of my bachelor thesis. It will be a command<br>
&gt; &gt;&gt;line application able to query various types of data, that is stored in<br>
&gt; &gt;&gt;SSSD database. I made a web page, where I will add information about this<br>
&gt; &gt;&gt;application I named sss_query, so far, you can find there information about<br>
&gt; &gt;&gt;basic user interface ( <a href="http://www.bambusekd.cz/sss_query.html" target="_blank">www.bambusekd.cz/sss_query.html</a> ).<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;My project is on my Github account<br>
&gt; &gt;&gt;<a href="https://github.com/bambusekd/SSSD.git" target="_blank">https://github.com/bambusekd/SSSD.git</a><br>
&gt; &gt;&gt;there I created branch sss_query, where I work on my application<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;I will be glad for any advice, recommendation or comment to it.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;Thanks<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;David Bambusek<br>
&gt; &gt;Hi,<br>
&gt; &gt;<br>
&gt; &gt;I have some questions and comments related to design:<br>
&gt; &gt;<br>
&gt; &gt;1) I suggest to read the thread at:<br>
&gt; &gt;<a href="https://lists.fedorahosted.org/pipermail/sssd-devel/2012-February/008712.html" target="_blank">https://lists.fedorahosted.org/pipermail/sssd-devel/2012-February/008712.html</a><br>
&gt; &gt;if you haven&#39;t seen it already.<br>
&gt; &gt;<br>
&gt; &gt;2) Have you seen samba&#39;s wbinfo tool? Maybe in your thesis you could<br>
&gt; &gt;compare the two.<br>
&gt; &gt;<br>
&gt; &gt;3) The list of objects to operate on is incomplete. You also need to<br>
&gt; &gt;work with sudo rules, SSH hosts and I would also strongly suggest<br>
&gt; &gt;including domains and subdomains. (for domains, include info like sysdb<br>
&gt; &gt;domain version for instance). There should also be a way to perform<br>
&gt; &gt;unkeyed search (=all objects of type X).<br>
&gt; &gt;<br>
&gt; &gt;4) Is the output always going to include all attributes or were you<br>
&gt; &gt;going to have a &quot;human readable&quot; and &quot;raw&quot; output? What about group<br>
&gt; &gt;memberships? Are there any plans to merge functionality with the<br>
&gt; &gt;sss_groupshow tool ?<br>
&gt; &gt;<br>
&gt; &gt;5) There are a couple of tickets in the SSSD trac related to this<br>
&gt; &gt;effort. Depending on the scope of your thesis you might want to assign<br>
&gt; &gt;them to yourself.<br>
&gt; &gt;<br>
&gt; &gt;The related tickets are:<br>
&gt; &gt;<a href="https://fedorahosted.org/sssd/ticket/1220" target="_blank">https://fedorahosted.org/sssd/ticket/1220</a><br>
&gt; &gt;<a href="https://fedorahosted.org/sssd/ticket/1221" target="_blank">https://fedorahosted.org/sssd/ticket/1221</a><br>
&gt; &gt;<a href="https://fedorahosted.org/sssd/ticket/1222" target="_blank">https://fedorahosted.org/sssd/ticket/1222</a><br>
&gt; &gt;<a href="https://fedorahosted.org/sssd/ticket/1223" target="_blank">https://fedorahosted.org/sssd/ticket/1223</a><br>
&gt; &gt;<br>
&gt; &gt;Feel free to also create another ones.<br>
&gt; &gt;<br>
&gt; &gt;6) Please also include plans for unit tests in your design and<br>
&gt; &gt;implementation.<br>
&gt; &gt;_______________________________________________<br>
&gt; &gt;sssd-devel mailing list<br>
&gt; &gt;<a href="mailto:sssd-devel@lists.fedorahosted.org">sssd-devel@lists.fedorahosted.org</a><br>
&gt; &gt;<a href="https://lists.fedorahosted.org/mailman/listinfo/sssd-devel" target="_blank">https://lists.fedorahosted.org/mailman/listinfo/sssd-devel</a><br>
&gt; Greetings,<br>
&gt; I have uploaded a new version of my sss_query application on my<br>
&gt; Github account:<br>
&gt;<br>
&gt; <a href="https://github.com/bambusekd/SSSD.git" target="_blank">https://github.com/bambusekd/SSSD.git</a><br>
&gt; branch sss_query<br>
&gt;<br>
&gt; I added the missing objects and also option to perform search for<br>
&gt; all object of a certain type.<br>
&gt;<br>
&gt; I am still working on part for sudo rules and on tests...<br>
&gt;<br>
&gt; David Bambušek<br>
<br>
</div></div>The branch doesn&#39;t compile:<br>
<br>
make[1]: *** No rule to make target<br>
`src/providers/proxy/proxy_common.c&#39;, needed by<br>
`src/providers/proxy/libsss_proxy_la-proxy_common.lo&#39;.  Stop.<br>
<br>
Seems like you forgot to add proxy_common.c<br>
<br>
I would encourage you to regularly rebase your branch atop master,<br>
currently it&#39;s almost 2 months old and the rebase is just going to get<br>
harder.<br>
<br>
Also please set your real name and e-mail in .gitconfig:<br>
<a href="https://fedorahosted.org/sssd/wiki/DevelTutorials" target="_blank">https://fedorahosted.org/sssd/wiki/DevelTutorials</a><br>
One of the commits is authored by &quot;root&quot;.<br>
<br>
The code should follow our coding guidelines:<br>
<a href="http://www.freeipa.org/page/Coding_Style" target="_blank">http://www.freeipa.org/page/Coding_Style</a><br>
<br>
In your code the indentation seems too deep. Also please use spaces<br>
after &quot;if&quot;, &quot;for&quot; and other keywords. There&#39;s quite a couple of trailing<br>
whitespace -- if you&#39;re a vim user you can set:<br>
let c_no_tab_space_error=1<br>
let c_space_errors=1<br>
to your ~/.vimrc<br>
<br>
Also try to keep the lines under 80 characters if possible.<br>
<br>
I skimmed through the code real quick and I have a couple of comments<br>
before I can actually test the tool.<br>
<br>
* Why did you re-add srcdir to the PYTHON_TESTS directive? It was<br>
  explicitly removed.<br>
* I think you should learn how talloc works. Here is an excellent<br>
  tutorial written by one of the SSSD developers:<br>
  <a href="https://talloc.samba.org/talloc/doc/html/libtalloc__tutorial.html" target="_blank">https://talloc.samba.org/talloc/doc/html/libtalloc__tutorial.html</a><br>
  There is two patterns I see in the code that are wrong:<br>
  ** some functions allocate tmp_ctx on NULL and never free it. That&#39;s a<br>
  memory leak. I saw that some of the functions also allocate output<br>
  data on mem_ctx, you should either allocate the output data on mem_ctx<br>
  and ditch tmp_ctx or talloc_steal from tmp_ctx to mem_ctx before<br>
  return.<br>
  ** some functions allocate structure components on top of a memory<br>
  context but then free the components of the structure individually<br>
  (that&#39;s in init_domains). You can just free the top-level context.<br>
<br>
That&#39;s it for now. It&#39;s a decent start, but needs some work before it can<br>
be accepted upstream.<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
sssd-devel mailing list<br>
<a href="mailto:sssd-devel@lists.fedorahosted.org">sssd-devel@lists.fedorahosted.org</a><br>
<a href="https://lists.fedorahosted.org/mailman/listinfo/sssd-devel" target="_blank">https://lists.fedorahosted.org/mailman/listinfo/sssd-devel</a><br>
</div></div></blockquote></div><br></div></div>