<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"><<a href="mailto:jhrozek@redhat.com" target="_blank">jhrozek@redhat.com</a>></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>
> Dne 25.2.2013 11:50, Jakub Hrozek napsal(a):<br>
> >On Mon, Feb 25, 2013 at 11:11:01AM +0100, David Bambušek wrote:<br>
> >>Greetings,<br>
> >>my name is David Bambusek, and I am working on an application , that will<br>
> >>be used as a tool for querying SSSD database. I am curently a student of<br>
> >>FIT VUT Brno and this is topic of my bachelor thesis. It will be a command<br>
> >>line application able to query various types of data, that is stored in<br>
> >>SSSD database. I made a web page, where I will add information about this<br>
> >>application I named sss_query, so far, you can find there information about<br>
> >>basic user interface ( <a href="http://www.bambusekd.cz/sss_query.html" target="_blank">www.bambusekd.cz/sss_query.html</a> ).<br>
> >><br>
> >>My project is on my Github account<br>
> >><a href="https://github.com/bambusekd/SSSD.git" target="_blank">https://github.com/bambusekd/SSSD.git</a><br>
> >>there I created branch sss_query, where I work on my application<br>
> >><br>
> >>I will be glad for any advice, recommendation or comment to it.<br>
> >><br>
> >>Thanks<br>
> >><br>
> >>David Bambusek<br>
> >Hi,<br>
> ><br>
> >I have some questions and comments related to design:<br>
> ><br>
> >1) I suggest to read the thread at:<br>
> ><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>
> >if you haven't seen it already.<br>
> ><br>
> >2) Have you seen samba's wbinfo tool? Maybe in your thesis you could<br>
> >compare the two.<br>
> ><br>
> >3) The list of objects to operate on is incomplete. You also need to<br>
> >work with sudo rules, SSH hosts and I would also strongly suggest<br>
> >including domains and subdomains. (for domains, include info like sysdb<br>
> >domain version for instance). There should also be a way to perform<br>
> >unkeyed search (=all objects of type X).<br>
> ><br>
> >4) Is the output always going to include all attributes or were you<br>
> >going to have a "human readable" and "raw" output? What about group<br>
> >memberships? Are there any plans to merge functionality with the<br>
> >sss_groupshow tool ?<br>
> ><br>
> >5) There are a couple of tickets in the SSSD trac related to this<br>
> >effort. Depending on the scope of your thesis you might want to assign<br>
> >them to yourself.<br>
> ><br>
> >The related tickets are:<br>
> ><a href="https://fedorahosted.org/sssd/ticket/1220" target="_blank">https://fedorahosted.org/sssd/ticket/1220</a><br>
> ><a href="https://fedorahosted.org/sssd/ticket/1221" target="_blank">https://fedorahosted.org/sssd/ticket/1221</a><br>
> ><a href="https://fedorahosted.org/sssd/ticket/1222" target="_blank">https://fedorahosted.org/sssd/ticket/1222</a><br>
> ><a href="https://fedorahosted.org/sssd/ticket/1223" target="_blank">https://fedorahosted.org/sssd/ticket/1223</a><br>
> ><br>
> >Feel free to also create another ones.<br>
> ><br>
> >6) Please also include plans for unit tests in your design and<br>
> >implementation.<br>
> >_______________________________________________<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>
> Greetings,<br>
> I have uploaded a new version of my sss_query application on my<br>
> Github account:<br>
><br>
> <a href="https://github.com/bambusekd/SSSD.git" target="_blank">https://github.com/bambusekd/SSSD.git</a><br>
> branch sss_query<br>
><br>
> I added the missing objects and also option to perform search for<br>
> all object of a certain type.<br>
><br>
> I am still working on part for sudo rules and on tests...<br>
><br>
> David Bambušek<br>
<br>
</div></div>The branch doesn't compile:<br>
<br>
make[1]: *** No rule to make target<br>
`src/providers/proxy/proxy_common.c', needed by<br>
`src/providers/proxy/libsss_proxy_la-proxy_common.lo'. 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'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 "root".<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 "if", "for" and other keywords. There's quite a couple of trailing<br>
whitespace -- if you'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'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's in init_domains). You can just free the top-level context.<br>
<br>
That's it for now. It'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>