]> xenbits.xensource.com Git - libvirt.git/commitdiff
* libvirt.spec.in proxy/Makefile.am: do the chown at the rpm packaging
authorDaniel Veillard <veillard@redhat.com>
Tue, 4 Jul 2006 12:46:14 +0000 (12:46 +0000)
committerDaniel Veillard <veillard@redhat.com>
Tue, 4 Jul 2006 12:46:14 +0000 (12:46 +0000)
  level, to allow build as non-root
* src/xml.c: fix bug #197583 raised by markmc
Daniel

ChangeLog
libvirt.spec.in
proxy/Makefile.am
src/xml.c

index dea5e32c3abbffaaf80bdd8b2e420e6a7561548d..1c7e2230750051a80485dd76a99ad5ced8d6c5a2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+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:
index 3ccadc7bc80b3646622a01915b8a6d5bdc2e1d4a..8fcf3aba0cc8800367bc912f0729c74f89bfed37 100644 (file)
@@ -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)
index 87cdb2fb197e5cf83a7e0ab5d1a0fcaa2dd5babc..c1a841d97120d5a5b8d6ce288fff61de0f50d3ca 100644 (file)
@@ -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
index 01619b8504bb0c4eebe55e59a28f827656788f35..e269a240cc4ce4daa1f426ab931f6d9ae3d17a78 100644 (file)
--- a/src/xml.c
+++ b/src/xml.c
@@ -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;
             }
         }