[Libvir] PATCH: 4/4: Configuration & whitelisting users

Daniel P. Berrange berrange at redhat.com
Mon Nov 26 10:41:27 UTC 2007


On Wed, Nov 21, 2007 at 08:34:17PM +0100, Jim Meyering wrote:
> "Daniel P. Berrange" <berrange at redhat.com> wrote:
> > This patch provides the ability to configure what authentication mechanism
> > is used on each socket - UNIX RW, UNIX RO, TCP, and TLS sockets - all can
> > have independant settings. By default the UNIX & TLS sockets have no auth,
> ...
> 
> Hi Dan,
> 
> I've gone through part 3/4 and had no further feedback
> beyond the two comments I already made there.
> 
> As usual, it looks very good.
> I spotted a few minor problems below.
> 
> ...
> > diff -r 54ffed012e46 qemud/qemud.c
> > --- a/qemud/qemud.c	Thu Nov 01 16:33:15 2007 -0400
> > +++ b/qemud/qemud.c	Thu Nov 01 16:35:57 2007 -0400
> ...
> > +static int remoteConfigGetStringList(virConfPtr conf, const char *key, char ***list, const char *filename) {
> > +    virConfValuePtr p;
> > +
> > +    p = virConfGetValue (conf, key);
> > +    if (p) {
> > +        switch (p->type) {
> > +        case VIR_CONF_STRING:
> > +            *list = malloc (2 * sizeof (char *));
> > +            (*list)[0] = strdup (p->str);
> 
> check for malloc and strdup failure
> [I do see you're just moving this existing code.]

Looks like basically the entire remoteReadConfigFile() method needs to be
fixed to check malloc() / strdup() return values actually, so might as
well fix everything in one go.


Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 




More information about the libvir-list mailing list