[SSSD] [PATCH] Fix broken client in master

Jakub Hrozek jhrozek at redhat.com
Wed Mar 20 10:53:27 UTC 2013


On Mon, Mar 18, 2013 at 11:09:30AM +0100, Jakub Hrozek wrote:
> On Mon, Mar 18, 2013 at 09:47:13AM +0100, Lukas Slebodnik wrote:
> > On (16/03/13 15:46), Simo Sorce wrote:
> > >On Sat, 2013-03-16 at 15:40 +0100, Lukas Slebodnik wrote:
> > >> On (16/03/13 14:38), Lukas Slebodnik wrote:
> > >> >On (15/03/13 21:35), Simo Sorce wrote:
> > >> >>Fixes https://fedorahosted.org/sssd/ticket/1838
> > >> >>
> > >> >>Simo.
> > >> >>
> > >> >>-- 
> > >> >>Simo Sorce * Red Hat, Inc * New York
> > >> >
> > >> >I tried to grep sources in src/sss_client directory
> > >> >(with reverted commit 22d381367c27910fe82f476a76b9f4ede555e35a)
> > >> >
> > >> >$ grep -Rn '#include "util/util.h"'
> > >> >sudo/sss_sudo.c:28:#include "util/util.h"
> > >> >ssh/sss_ssh_knownhostsproxy.c:33:#include "util/util.h"
> > >> >ssh/sss_ssh_client.c:33:#include "util/util.h"
> > >> >ssh/sss_ssh_authorizedkeys.c:25:#include "util/util.h"
> > >> >autofs/sss_autofs_private.h:22:#include "util/util.h"
> > >> >autofs/autofs_test_client.c:31:#include "util/util.h"
> > >> >
> > >> >Is the difference among pam, nss and others clients?
> > >> >
> > >> >LS
> > >> 
> > >> Oh,
> > >> I see the problem. But wouldn't be better solution to add another
> > >> dependency (src/util/io.c) for libnss_sss instead of code duplication
> > >> Because there is also another dependency to file src/util/murmurhash3.c,
> > >> which is outside src/sss_client. Patch attached.
> > >
> > >Yes murmurhash is a necessary dependency due to the mmap code.
> > >
> > >As for the patch if you want to keep using common code we need to do 2
> > >things:
> > >
> > >1) create a header file just for this file util/io.h for example.
> > >Include this file in util/util.h and include just io.h in sss_client/
> > >code.
> > >
> > >2) add a comment on top of io.c that this file is also used by
> > >sss_client so it cannot include things like DEBUG macros and it should
> > >not include util.h
> > >
> > >Simo.
> > >
> > >-- 
> > >Simo Sorce * Red Hat, Inc * New York
> > >
> > Thak you very much for explanation in both mails.
> > Updated patch attached.
> > 
> > LS
> 
> These patches fix the problem. I was wondering for a while if
> introducing a new header file etc is worth saving the code duplication
> of a couple of lines, but getting file IO right is important I think, so
> we should be trying to reuse already proved patterns.
> 
> In other words, Ack.

The patches were pushed to master already.



More information about the sssd-devel mailing list