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