[libvirt] [PATCH 01/11] Convert Xen domain lookup driver methods to use virDomainDefPtr
Daniel P. Berrange
berrange at redhat.com
Fri May 10 09:42:59 UTC 2013
On Thu, May 09, 2013 at 11:52:39AM -0600, Jim Fehlig wrote:
> Daniel P. Berrange wrote:
> > From: "Daniel P. Berrange" <berrange at redhat.com>
> >
> > Introduce use of a virDomainDefPtr in the domain lookup
> > APIs to simplify introduction of ACL security checks.
> > The virDomainPtr cannot be safely used, since the app
> > may have supplied mis-matching name/uuid/id fields. eg
> > the name points to domain X, while the uuid points to
> > domain Y. Resolving the virDomainPtr to a virDomainDefPtr
> > ensures a consistent name/uuid/id set.
> >
> > Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
> > ---
> > src/conf/domain_conf.c | 24 ++++++++
> > src/conf/domain_conf.h | 4 ++
> > src/libvirt_private.syms | 1 +
> > src/xen/xen_driver.c | 147 +++++++++++++++++++++++++++++++----------------
> > src/xen/xen_hypervisor.c | 17 +++---
> > src/xen/xen_hypervisor.h | 8 +--
> > src/xen/xen_inotify.c | 14 ++---
> > src/xen/xend_internal.c | 34 +++++------
> > src/xen/xend_internal.h | 4 +-
> > src/xen/xm_internal.c | 30 ++++------
> > src/xen/xm_internal.h | 5 +-
> > 11 files changed, 173 insertions(+), 115 deletions(-)
> >
> > diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> > index d55ce6b..61995cd 100644
> > --- a/src/conf/domain_conf.c
> > +++ b/src/conf/domain_conf.c
> > @@ -2048,6 +2048,30 @@ error:
> > return NULL;
> > }
> >
> > +
> >
>
> Extra newline? I've noticed inconsistencies throughout most of the files
> wrt 1 or 2 newlines between function definitions, so difficult to say
> which is preferred.
Yep, my preference is to use 2 newlines of whitespace between
functions, so you'll see that throughout these patches, though
as you say we don't enforce that strongly.
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
More information about the libvir-list
mailing list