1. 02 9月, 2009 15 次提交
    • D
      Remove redundant base64 include file · 721d3f06
      Daniel P. Berrange 提交于
      * src/storage_encryption_conf.c: Remove base64.h
      721d3f06
    • D
      Add Miloslav Trmač to AUTHORS file · 24121aa9
      Daniel P. Berrange 提交于
      24121aa9
    • M
      Make handling of monitor prompts more general. · 28b8cc31
      Miloslav Trmač 提交于
      * src/qemu_driver.c: Support arbitrary callbacks for "secondary
        prompts".  Reimplement qemudMonitorCommandExtra using such a
        callback.
      28b8cc31
    • M
      Don't assume buffered output echoes the command. · 077cd917
      Miloslav Trmač 提交于
      The if ((nlptr...)) implicitly assumes commptr != NULL (and that "buf"
      starts with "cmd").  Make the assumption explicit, it will be broken in
      a future patch.
      
      * src/qemu_driver.c: Don't assume buffered monitor output echoes the
        command.
      077cd917
    • M
      Attach encryption information to virDomainDiskDef. · f340964d
      Miloslav Trmač 提交于
      The XML allows <encryption format='unencrypted'/>, this implementation
      canonicalizes the internal representation so that "disk->encryption" is
      non-NULL iff encryption information is available.
      
      A domain with partial encryption information can be defined,
      completeness of the information is not verified.  The domain won't
      start until the remaining information is added, of course.
      
      * docs/formatdomain.html, docs/formatdomain.html.in: Document
        new encryption options for disks
      * docs/schemas/domain.rng: Pull in storage encryption schema
        rules
      * src/domain_conf.h, src/domain_conf.c: Wire up storage encryption
        XML parsing/formatting APIs
      f340964d
    • M
      Add support for encrypted (qcow) volume creation. · 46acb0f2
      Miloslav Trmač 提交于
      Supports only virStorageVolCreateXML, not virStorageVolCreateXMLFrom.
      
      Curiously, qemu-img does not need the passphrase for anything to create
      an encrypted volume.  This implementation thus does not need to touch
      any secrets to work with cooperating clients.  More generic passphrase
      handling is added in the next patch.
      
      * src/storage_backend.c: Request encryption when creating qcow/qcow2
        files
      * src/storage_backend_disk.c, src/storage_backend_fs.c,
        src/storage_backend_logical.c: Refuse to create volumes with
        encryption params set.
      46acb0f2
    • M
      Recognize encryption format of qcow volumes. · d288703d
      Miloslav Trmač 提交于
      (The implementation is not very generic, but that can be very
      easily rectified if/when new encryption formats appear.)
      
      * src/storage_backend_fs.c: Probe for qcow/qcow2 encryption
        algorithm field
      d288703d
    • M
      Attach encryption information to virStorageVolDef. · eda3af24
      Miloslav Trmač 提交于
      The XML allows <encryption format='unencrypted'/>, this implementation
      canonicalizes the internal representation so that "vol->encryption" is
      non-NULL iff the volume is encrypted.
      
      Note that partial encryption information (e.g. specifying an encryption
      format, but not the key/passphrase) is valid, libvirt will automatically
      choose value for the missing information during volume creation.  The
      user can read the volume XML, and use the unmodified <encryption> tag in
      future operations (without having to be able to understand) its contents.
      
      * docs/formatstorage.html, docs/formatstorage.html.in: Document
        storage volume encryption options
      * src/storage_conf.c, src/storage_conf.h: Hook up storage
        encryption XML handling
      * tests/storagevolschemadata/vol-qcow2.xml: Test case for encryption
        schema changes
      eda3af24
    • M
      Add volume encryption information handling. · 05b9b8fd
      Miloslav Trmač 提交于
      Define an <encryption> tag specifying volume encryption format and
      format-depenedent parameters (e.g. passphrase, cipher name, key
      length, key).
      
      Currently the only defined parameter is a reference to a "secret"
      (passphrase/key) managed using the virSecret* API.
      
      Only the qcow/qcow2 encryption format, and a "default" format used to
      let libvirt choose the format during volume creation, is currently
      supported.
      
      This patch does not add any users; the <encryption> tag is added in
      the following patches to both volumes (to support encrypted volume
      creation) and domains.
      
      * docs/*.html: Re-generate
      * docs/formatstorageencryption.html.in, docs/sitemap.html.in:
        Add page describing storage encryption data format
      * docs/schemas/Makefile.am, docs/schemas/storageencryption.rng:
        Add RNG schema for storage encryption format
      * po/POTFILES.in: Add src/storage_encryption_conf.c
      * src/libvirt_private.syms: Export virStorageEncryption* functions
      * src/storage_encryption_conf.h, src/storage_encryption_conf.c: Internal
        helper APIs for dealing with storage encryption format
      * libvirt.spec.in, mingw32-libvirt.spec.in: Add storageencryption.rng
        RNG schema
      05b9b8fd
    • M
      Secret manipulation API docs refresh & wire up python generator · 9dc3b993
      Miloslav Trmač 提交于
      Sample session:
      
      >>> import libvirt
      >>> c = libvirt.open('qemu:///session')
      
      >>> c.listSecrets()
      ['12247729-47d2-a783-88ce-b329d4781cd3', 'reee', 'abc']
      
      >>> s = c.secretDefineXML("<secret ephemeral='no' private='no'>\n<description>Something for use</description>\n<volume>/foo/bar</volume>\n</secret>\n")
      
      >>> s.UUIDString()
      '340c2dfb-811b-eda8-da9e-25ccd7bfd650'
      
      >>> s.XMLDesc()
      "<secret ephemeral='no' private='no'>\n  <uuid>340c2dfb-811b-eda8-da9e-25ccd7bfd650</uuid>\n  <description>Something for use</description>\n  <volume>/foo/bar</volume>\n</secret>\n"
      
      >>> s.setValue('abc\0xx\xffx')
      0
      
      >>> s.value()
      'abc\x00xx\xffx'
      
      >>> s.undefine()
      0
      
      * python/generator.py: Add rules for virSecret APIs
      * python/libvir.c, python/libvirt-python-api.xml: Manual impl of
        virSecretSetValue, virSecretGetValue$ and virConnectListSecrets APIs
      * python/libvirt_wrap.h, python/types.c: Wrapper for virSecret objects
      * docs/libvirt-api.xml, docs/libvirt-refs.xml,
        docs/html/libvirt-virterror.html, docs/html/libvirt-libvirt.html,
        docs/devhelp/libvirt-virterror.html, docs/devhelp/libvirt-libvirt.html:
        Re-generate with 'make api'
      9dc3b993
    • M
      Secret manipulation remote client · f68c91fa
      Miloslav Trmač 提交于
      * src/remote_internal.c: Implement client binding for new secrets
        APIs
      * src/datatypes.h: Add 'void *secretPrivateData' to virConnectPtr
        struct
      f68c91fa
    • M
      Secret manipulation libvirtd wire protocol & remote dispatcher · 0de63c67
      Miloslav Trmač 提交于
      * qemud/remote_protocol.x: Define wire protocol for secrets public
        APIs
      * qemud/remote_protocol.h, qemud/remote_protocol.c,
        qemud/remote_dispatch_table.h, qemud/remote_dispatch_ret.h,
        qemud/remote_dispatch_prototypes.h, qemud/remote_dispatch_args.h:
        Re-generate from updated protocol definition
      * qemud/remote.c: Implement RPC dispatchers for new secrets APIs
      0de63c67
    • M
      Secret manipulation public API implementation · b35f0131
      Miloslav Trmač 提交于
      * include/libvirt/virterror.h, src/virterror.c: Add VIR_ERR_INVALID_SECRET
        and VIR_FROM_SECRET
      * src/libvirt.c: Define stubs for every new public API
      b35f0131
    • M
      Secret manipulation internal API · eb42e0ab
      Miloslav Trmač 提交于
      * include/libvirt/virterror.h, src/virterror.c: Add VIR_WAR_NO_SECRET
      * src/libvirt_private.syms, src/datatypes.h, src/datatypes.c: Type
        virSecret struct definition and helper APIs
      * src/driver.h: Sub-driver API definitions for secrets
      * src/libvirt.c: Define new sub-driver for secrets
      eb42e0ab
    • M
      Secret manipulation public API · 6acc17af
      Miloslav Trmač 提交于
      This patch adds a "secret" as a separately managed object, using a
      special-purpose API to transfer the secret values between nodes and
      libvirt users.
      
      * docs/schemas/secret.rng, docs/schemas/Makefilem.am: Add new
        schema for virSecret objects
      * docs/*html: Re-generated
      * docs/formatsecret.html.in, docs/sitemap.html.in: Add page
        describing the virSecret XML schema
      * include/libvirt/libvirt.h.in: Define the new virSecret public
        API
      * src/libvirt_public.syms: Export symbols for new public APIs
      * mingw32-libvirt.spec.in, libvirt.spec.in: Add secret.rng to
        files list
      6acc17af
  2. 01 9月, 2009 5 次提交
  3. 30 8月, 2009 1 次提交
    • J
      Fix sexpr2string() to handle empty list. · 8fd7eee9
      Jim Fehlig 提交于
      S-expression containing empty lists, e.g. (cpus (() () () ())),
      was not being handled properly in sexpr2string() serialization.
      Emit an empty list when encountering NIL sexpr kind.
      8fd7eee9
  4. 28 8月, 2009 2 次提交
  5. 26 8月, 2009 1 次提交
  6. 25 8月, 2009 1 次提交
    • D
      Support new PolicyKit 1.0 API · 8e06c8b3
      Daniel P. Berrange 提交于
      * configure.in: Check for pkcheck which indicates new policykit
      * qemud/Makefile.am: Install different versions of policy
      * qemud/libvirtd.policy: Rename to libvirtd.policy-0
      * qemud/libvirtd.policy-1: new style policy
      * qemud/qemud.c, qemud/qemud.h, qemud/remote.c: Support new
        policykit API via external pkcheck helper
      * src/remote_internal.c: Don't prompt for polkit auth with new
        policykit API
      * libvirt.spec.in: deal with new policy install locations & deps
      8e06c8b3
  7. 21 8月, 2009 2 次提交
  8. 20 8月, 2009 5 次提交
    • M
      Fix phypOpen() escape_specialcharacters · 40d46934
      Mattias Bolte 提交于
      Matthias correctly points out that escape_specialcharaters() takes a
      length, and since we are now malloc()'ing string in phypOpen instead of
      making it a static array, we can't use sizeof(string) anymore.  Calculate
      the proper strlen and then use that both to allocate the string and also
      pass it to escape_specialcharacters().
      Signed-off-by: NChris Lalancette <clalance@redhat.com>
      40d46934
    • M
      Power Hypervisor: fix potential segfault · 1aa16833
      Mattias Bolte 提交于
      I came across this line in the phypOpen function:
      
      char string[strlen(conn->uri->path)];
      
      Here the path part of the given URI is used without checking it for
      NULL, this can cause a segfault as strlen expects a string != NULL.
      Beside that uuid_db and connection_data leak in case of an error.
      
      In this line
      
      conn->uri->path = string;
      
      the original path of the URI leaks. The patch adds a VIR_FREE call
      before setting the new path.
      
      The attached patch is compile-tested but I don't have a Power
      Hypervisor installation at hand to test it for real.
      
      Matthias
      Signed-off-by: NChris Lalancette <clalance@redhat.com>
      1aa16833
    • C
      Small fixes for qemu save compression. · 2e7c8b0b
      Chris Lalancette 提交于
      Fix up a small memory leak pointed out by DanB; I was forgetting
      to release memory allocated to driver->saveImageFormat.
      Also add the "save_image_format" and "security" entries to
      the augeas lens.
      Signed-off-by: NChris Lalancette <clalance@redhat.com>
      2e7c8b0b
    • D
      Add test for recently fixed crash with latest XenD · da8b7c9f
      Daniel P. Berrange 提交于
      Test case for the fix applied in
      
        commit 14435163
        Author: Daniel Veillard <veillard@redhat.com>
        Date:   Fri Jun 26 18:14:16 2009 +0000
      
      * tests/sexpr2xmldata/sexpr2xml-pv-vfb-type-crash.sexpr,
        tests/sexpr2xmldata/sexpr2xml-pv-vfb-type-crash.xml: Data
        files exhibiting the crash
      * tests/sexpr2xmltest.c: Process new data files
      da8b7c9f
    • D
      14194f1d
  9. 19 8月, 2009 1 次提交
  10. 18 8月, 2009 7 次提交
    • M
      Fix bridge/tap system error reporting · 3ec80d01
      Mark McLoughlin 提交于
      * src/qemu_conf.c, src/uml_conf.c: use virReportSystemError() to report
        system errors
      3ec80d01
    • M
      Don't expose 'vnet%d' to the user · 2b1f67d4
      Mark McLoughlin 提交于
      https://bugzilla.redhat.com/517371
      
      Matt Booth points out that if you use a non-existent bridge name when
      start a guest you get a weird error message:
      
        Failed to add tap interface 'vnet%d' to bridge 'virbr0'
      
      and dev='vnet%d' appears in the dumpxml output.
      
      Fix that by not including 'vnet%d' in the error message and freeing the
      'vnet%d' string if adding the tap device to the bridge fails.
      
      * src/qemu_conf.c, src/uml_conf.c: fix qemudNetworkIfaceConnect()
        and umlConnectTapDevice() to not expose 'vnet%d' to the user
      2b1f67d4
    • M
      Maintain a list of active PCI hostdevs and use it in pciResetDevice() · e8ad3393
      Mark McLoughlin 提交于
      As we start/shutdown guests, or hotplug/hot-unplug devices, we can add
      or delete devices as appropriate from a list of active devices.
      
      Then, in pciReset(), we can use this to determine whether its safe to
      reset a device as a side effect of resetting another device.
      
      * src/qemu_conf.h: add activePciHostdevs to qemud_driver
      
      * src/qemu_driver.c: maintain the activePciHostdevs list, and pass it
        to pciResetDevice()
      
      * src/pci.[ch]: pass the activeDevs list to pciResetDevice() and use
        it to determine whether a Secondary Bus Reset is safe
      e8ad3393
    • M
      Simplify PCI hostdev prepare/re-attach using a pciDeviceList type · 78675b22
      Mark McLoughlin 提交于
      The qemuPrepareHostDevices() and qemuDomainReAttachHostDevices()
      functions are clutter with a bunch of calls to pciGetDevice() and
      pciFreeDevice() obscuring the basic logic.
      
      Add a pciDeviceList type and add a qemuGetPciHostDeviceList() function
      to build a list from a domain definition. Use this in prepare/re-attach
      fto simplify things and eliminate the multiple pciGetDevice calls.
      
      This is especially useful because in the next patch we need to iterate
      the hostdevs list a third time and we also need a list type for keeping
      track of active devices.
      
      * src/pci.[ch]: add pciDeviceList type and also a per-device 'managed'
        property
      
      * src/libvirt_private.syms: export the new functions
      
      * src/qemu_driver.c: add qemuGetPciHostDeviceList() and re-write
        qemuPrepareHostDevices() and qemuDomainReAttachHostDevices() to use it
      78675b22
    • M
      Use pci_addr=auto with QEMU's pci_add monitor command · 60ff0758
      Mark McLoughlin 提交于
      Newer versions of QEMU accept 'pci_add auto', but older versions require
      'pci_add pci_addr=auto'
      
      * src/qemu_driver.c: use pci_addr= in qemudDomainAttachHostPciDevice()
        for older versions of QEMU
      60ff0758
    • M
      Fix thinko in PCI hostdev detach · 457e0506
      Mark McLoughlin 提交于
      * src/qemu_driver.c: Add missing break statement in
        qemudDomainDetachHostDevice()
      457e0506
    • M
      Reset PCI host devices after hot-unplug · 12edef9a
      Mark McLoughlin 提交于
      When we hot-unplug a PCI host device from a guest, we should reset it.
      
      Both managed and unmanaged devices should be reset, but only managed
      devices should be re-attached.
      
      * src/qemu_driver.c: reset devices in qemudDomainDetachHostPciDevice()
      12edef9a