提交 4fcc208f 编写于 作者: D Daniel Veillard

* libvirt.spec.in proxy/Makefile.am: do the chown at the rpm packaging

  level, to allow build as non-root
* src/xml.c: fix bug #197583 raised by markmc
Daniel
上级 567b42ce
Tue Jul 4 13:50:55 CEST 2006 Daniel Veillard <veillard@redhat.com>
* libvirt.spec.in proxy/Makefile.am: do the chown at the rpm packaging
level, to allow build as non-root
* src/xml.c: fix bug #197583 raised by markmc
Mon Jul 3 15:41:58 EDT 2006 Daniel Veillard <veillard@redhat.com>
* NEWS docs/* configure.in libvirt.spec.in include/libvirt/libvirt.h:
......
......@@ -14,7 +14,7 @@ Requires: readline
BuildRequires: libxml2-devel
BuildRequires: readline-devel
Obsoletes: libvir
ExclusiveArch: i386 x86_64 ia64
ExclusiveArch: i386 x86_64
%description
This C library provides an API to use the Xen virtualization framework,
......@@ -75,7 +75,7 @@ rm -fr %{buildroot}
%doc %{_mandir}/man1/virsh.1*
%{_bindir}/virsh
%{_libdir}/lib*.so.*
%{_libexecdir}/libvirt_proxy
%attr(4755, root, root) %{_libexecdir}/libvirt_proxy
%files devel
%defattr(-, root, root)
......
......@@ -16,5 +16,4 @@ libvirt_proxy_DEPENDENCIES =
libvirt_proxy_LDADD =
install-exec-hook:
chown root:root $(DESTDIR)$(libexecdir)/libvirt_proxy
chmod u+s $(DESTDIR)$(libexecdir)/libvirt_proxy
......@@ -591,27 +591,32 @@ virDomainParseXMLOSDesc(xmlNodePtr node, virBufferPtr buf, int bootloader)
if ((type == NULL)
&& (xmlStrEqual(cur->name, BAD_CAST "type"))) {
txt = cur->children;
if ((txt->type == XML_TEXT_NODE) && (txt->next == NULL))
if ((txt != NULL) && (txt->type == XML_TEXT_NODE) &&
(txt->next == NULL))
type = txt->content;
} else if ((kernel == NULL) &&
(xmlStrEqual(cur->name, BAD_CAST "kernel"))) {
txt = cur->children;
if ((txt->type == XML_TEXT_NODE) && (txt->next == NULL))
if ((txt != NULL) && (txt->type == XML_TEXT_NODE) &&
(txt->next == NULL))
kernel = txt->content;
} else if ((root == NULL) &&
(xmlStrEqual(cur->name, BAD_CAST "root"))) {
txt = cur->children;
if ((txt->type == XML_TEXT_NODE) && (txt->next == NULL))
if ((txt != NULL) && (txt->type == XML_TEXT_NODE) &&
(txt->next == NULL))
root = txt->content;
} else if ((initrd == NULL) &&
(xmlStrEqual(cur->name, BAD_CAST "initrd"))) {
txt = cur->children;
if ((txt->type == XML_TEXT_NODE) && (txt->next == NULL))
if ((txt != NULL) && (txt->type == XML_TEXT_NODE) &&
(txt->next == NULL))
initrd = txt->content;
} else if ((cmdline == NULL) &&
(xmlStrEqual(cur->name, BAD_CAST "cmdline"))) {
txt = cur->children;
if ((txt->type == XML_TEXT_NODE) && (txt->next == NULL))
if ((txt != NULL) && (txt->type == XML_TEXT_NODE) &&
(txt->next == NULL))
cmdline = txt->content;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册