- 19 1月, 2011 1 次提交
-
-
由 Matthias Bolte 提交于
-
- 15 1月, 2011 1 次提交
-
-
由 Eric Blake 提交于
virLibConnError already includes __FUNCTION__ in its output, so we were redundant. Furthermore, clang warns that __FUNCTION__ is not a string literal (at least __FUNCTION__ will never contain %, so it was not a security risk). * src/datatypes.c: Replace __FUNCTION__ with a descriptive string.
-
- 25 11月, 2010 1 次提交
-
-
由 Matthias Bolte 提交于
virConnectClose calls virUnrefConnect which in turn closes all open drivers when the refcount of that connection dropped to zero. This works fine when you free all other objects that hold a ref to the connection before you close it, because in this case virUnrefConnect is the one that removes the last ref to the connection. But it doesn't work when you close the connection first before freeing the other objects. This is because the other virUnref* functions call virReleaseConnect when they detect that the connection's refcount dropped to zero. In this case another virUnref* function (different from virUnrefConnect) removes the last ref to the connection. This results in not closing the open drivers and leaking things that should have been cleaned up in the driver close functions. To fix this move the driver close calls to virReleaseConnect.
-
- 21 6月, 2010 4 次提交
-
-
由 Jiri Denemark 提交于
- Fix documentation for virGetStorageVol: it has 'key' argument instead of 'uuid'. - Remove TODO comment from virReleaseStorageVol: we use volume key as an identifier instead of UUID. - Print human-readable UUID string in debug message in virReleaseSecret.
-
由 Jiri Denemark 提交于
As anywhere else, uuid is defined as a fixed size array inside _virSecret structure; we shouldn't try to free it.
-
由 Jiri Denemark 提交于
The first thing we do in all these functions is to check uuid != NULL and fail if it isn't.
-
由 Jiri Denemark 提交于
Per-connection hashes for domains, networks, storage pools and network filter pools were indexed by names which was not the best choice. UUIDs are better identifiers, so lets use them.
-
- 13 5月, 2010 1 次提交
-
-
由 Eric Blake 提交于
* src/datatypes.c: Use correct word.
-
- 18 4月, 2010 1 次提交
-
-
由 Matthias Bolte 提交于
And close the driver on connection close.
-
- 06 4月, 2010 1 次提交
-
-
由 Matthias Bolte 提交于
-
- 05 4月, 2010 1 次提交
-
-
由 Chris Lalancette 提交于
Signed-off-by: NChris Lalancette <clalance@redhat.com>
-
- 27 3月, 2010 1 次提交
-
-
由 Stefan Berger 提交于
This patch adds the implementation of the public API for the network filtering (ACL) extensions to libvirt.c . Signed-off-by: NStefan Berger <stefanb@us.ibm.com>
-
- 08 3月, 2010 1 次提交
-
-
由 Eric Blake 提交于
Prior to this patch, there was an inconsistent mix between GNU and C99. For consistency, and potential portability to other compilers, stick with the C99 vararg macro syntax. * src/conf/cpu_conf.c (virCPUReportError): Use C99 rather than GNU vararg macro syntax. * src/conf/domain_conf.c (virDomainReportError): Likewise. * src/conf/domain_event.c (eventReportError): Likewise. * src/conf/interface_conf.c (virInterfaceReportError): Likewise. * src/conf/network_conf.c (virNetworkReportError): Likewise. * src/conf/node_device_conf.h (virNodeDeviceReportError): Likewise. * src/conf/secret_conf.h (virSecretReportError): Likewise. * src/conf/storage_conf.h (virStorageReportError): Likewise. * src/esx/esx_device_monitor.c (ESX_ERROR): Use C99 rather than GNU vararg macro syntax. * src/esx/esx_driver.c (ESX_ERROR): Likewise. * src/esx/esx_interface_driver.c (ESX_ERROR): Likewise. * src/esx/esx_network_driver.c (ESX_ERROR): Likewise. * src/esx/esx_secret_driver.c (ESX_ERROR): Likewise. * src/esx/esx_storage_driver.c (ESX_ERROR): Likewise. * src/esx/esx_util.c (ESX_ERROR): Likewise. * src/esx/esx_vi.c (ESX_VI_ERROR): Likewise. * src/esx/esx_vi_methods.c (ESX_VI_ERROR): Likewise. * src/esx/esx_vi_types.c (ESX_VI_ERROR): Likewise. * src/esx/esx_vmx.c (ESX_ERROR): Likewise. * src/util/hostusb.c (usbReportError): Use C99 rather than GNU vararg macro syntax. * src/util/json.c (virJSONError): Likewise. * src/util/macvtap.c (ReportError): Likewise. * src/util/pci.c (pciReportError): Likewise. * src/util/stats_linux.c (virStatsError): Likewise. * src/util/util.c (virUtilError): Likewise. * src/util/xml.c (virXMLError): Likewise. * src/xen/proxy_internal.c (virProxyError): Use C99 rather than GNU vararg macro syntax. * src/xen/sexpr.c (virSexprError): Likewise. * src/xen/xen_driver.c (xenUnifiedError): Likewise. * src/xen/xen_hypervisor.c (virXenError): Likewise. * src/xen/xen_inotify.c (virXenInotifyError): Likewise. * src/xen/xend_internal.c (virXendError): Likewise. * src/xen/xm_internal.c (xenXMError): Likewise. * src/xen/xs_internal.c (virXenStoreError): Likewise. * src/cpu/cpu.h (virCPUReportError): Use C99 rather than GNU vararg macro syntax. * src/datatypes.c (virLibConnError): Likewise. * src/interface/netcf_driver.c (interfaceReportError): Likewise. * src/libvirt.c (virLibStreamError): Likewise. * src/lxc/lxc_conf.h (lxcError): Likewise. * src/network/bridge_driver.c (networkReportError): Likewise. * src/nodeinfo.c (nodeReportError): Likewise. * src/opennebula/one_conf.h (oneError): Likewise. * src/openvz/openvz_conf.h (openvzError): Likewise. * src/phyp/phyp_driver.c (PHYP_ERROR): Likewise. * src/qemu/qemu_conf.h (qemuReportError): Likewise. * src/remote/remote_driver.c (errorf): Likewise. * src/security/security_driver.h (virSecurityReportError): Likewise. * src/test/test_driver.c (testError): Likewise. * src/uml/uml_conf.h (umlReportError): Likewise. * src/vbox/vbox_driver.c (vboxError): Likewise. * src/vbox/vbox_tmpl.c (vboxError): Likewise.
-
- 09 2月, 2010 1 次提交
-
-
由 Matthias Bolte 提交于
-
- 03 11月, 2009 1 次提交
-
-
由 Laine Stump 提交于
There are places where an interface will not have a mac address, and netcf returns this as a NULL pointer rather than a pointer to an empty string. Rather than checking for this all over the place in libvirt, just save it in the virInterface object as an empty string. * src/datatypes.c: allow NULL mac in virGetInterface()
-
- 27 10月, 2009 1 次提交
-
-
由 Dan Kenigsberg 提交于
-
- 08 10月, 2009 1 次提交
-
-
由 Daniel P. Berrange 提交于
* daemon/Makefile.am: Fix missing sasl rule * src/datatypes.c: Add unistd.h to avoid gnulib bug * src/util/cgroup.c: Disable mntent if not available
-
- 29 9月, 2009 1 次提交
-
-
由 Daniel P. Berrange 提交于
* include/libvirt/libvirt.h.in: Public API contract for virStreamPtr object * src/libvirt_public.syms: Export data stream APIs * src/libvirt_private.syms: Export internal helper APIs * src/libvirt.c: Data stream API driver dispatch * src/datatypes.h, src/datatypes.c: Internal helpers for virStreamPtr object * src/driver.h: Define internal driver API for streams * .x-sc_avoid_write: Ignore src/libvirt.c because it trips up on comments including write() * python/Makefile.am: Add libvirt-override-virStream.py * python/generator.py: Add rules for virStreamPtr class * python/typewrappers.h, python/typewrappers.c: Wrapper for virStreamPtr * docs/libvirt-api.xml, docs/libvirt-refs.xml: Regenerate with new APIs
-
- 23 9月, 2009 1 次提交
-
-
由 Chris Lalancette 提交于
Add the virStrncpy function, which takes a dst string, source string, the number of bytes to copy and the number of bytes available in the dest string. If the source string is too large to fit into the destination string, including the \0 byte, then no data is copied and the function returns NULL. Otherwise, this function copies n bytes from source into dst, including the \0, and returns a pointer to the dst string. This function is intended to replace all unsafe uses of strncpy in the code base, since strncpy does *not* guarantee that the buffer terminates with a \0. Signed-off-by: NChris Lalancette <clalance@redhat.com>
-
- 15 9月, 2009 2 次提交
-
-
由 Daniel P. Berrange 提交于
* include/libvirt/libvirt.h, include/libvirt/libvirt.h.in: Add virSecretGetUsageType, virSecretGetUsageID and virLookupSecretByUsage * python/generator.py: Mark virSecretGetUsageType, virSecretGetUsageID as not throwing exceptions * qemud/remote.c: Implement dispatch for virLookupSecretByUsage * qemud/remote_protocol.x: Add usage type & ID as attributes of remote_nonnull_secret. Add RPC calls for new public APIs * qemud/remote_dispatch_args.h, qemud/remote_dispatch_prototypes.h, qemud/remote_dispatch_ret.h, qemud/remote_dispatch_table.h, qemud/remote_protocol.c, qemud/remote_protocol.h: Re-generate * src/datatypes.c, src/datatypes.h: Add usageType and usageID as properties of virSecretPtr * src/driver.h: Add virLookupSecretByUsage driver entry point * src/libvirt.c: Implement virSecretGetUsageType, virSecretGetUsageID and virLookupSecretByUsage * src/libvirt_public.syms: Export virSecretGetUsageType, virSecretGetUsageID and virLookupSecretByUsage * src/remote_internal.c: Implement virLookupSecretByUsage entry * src/secret_conf.c, src/secret_conf.h: Remove the virSecretUsageType enum, now in public API. Make volume path mandatory when parsing XML * src/secret_driver.c: Enforce usage uniqueness when defining secrets. Implement virSecretLookupByUsage api method * src/virsh.c: Include usage for secret-list command
-
由 Daniel P. Berrange 提交于
Convert all the secret/storage encryption APIs / wire format to handle UUIDs in raw format instead of non-canonical printable format. Guarentees data format correctness. * docs/schemas/storageencryption.rng: Make UUID mandatory for a secret and validate fully * docs/schemas/secret.rng: Fully validate UUID * include/libvirt/libvirt.h, include/libvirt/libvirt.h.in, Add virSecretLookupByUUID and virSecretGetUUID. Make virSecretGetUUIDString follow normal API design pattern * python/generator.py: Skip generation of virSecretGetUUID, virSecretGetUUIDString and virSecretLookupByUUID * python/libvir.c, python/libvirt-python-api.xml: Manual impl of virSecretGetUUID,virSecretGetUUIDString and virSecretLookupByUUID * qemud/remote.c: s/virSecretLookupByUUIDString/virSecretLookupByUUID/ Fix get_nonnull_secret/make_nonnull_secret to use unsigned char * qemud/remote_protocol.x: Fix remote_nonnull_secret to use a remote_uuid instead of remote_nonnull_string for UUID field. Rename REMOTE_PROC_SECRET_LOOKUP_BY_UUID_STRING to REMOTE_PROC_SECRET_LOOKUP_BY_UUID_STRING and make it take an remote_uuid value * qemud/remote_dispatch_args.h, qemud/remote_dispatch_prototypes.h, qemud/remote_dispatch_ret.h, qemud/remote_dispatch_table.h, qemud/remote_protocol.c, qemud/remote_protocol.h: Re-generate * src/datatypes.h, src/datatypes.c: Store UUID in raw format instead of printable. Change virGetSecret to use raw format UUID * src/driver.h: Rename virDrvSecretLookupByUUIDString to virDrvSecretLookupByUUID and use raw format UUID * src/libvirt.c: Add virSecretLookupByUUID and virSecretGetUUID and re-implement virSecretLookupByUUIDString and virSecretGetUUIDString in terms of those * src/libvirt_public.syms: Add virSecretLookupByUUID and virSecretGetUUID * src/remote_internal.c: Rename remoteSecretLookupByUUIDString to remoteSecretLookupByUUID. Fix typo in args for remoteSecretDefineXML impl. Use raw UUID format for get_nonnull_secret and make_nonnull_secret * src/storage_encryption_conf.c, src/storage_encryption_conf.h: Storage UUID in raw format, and require it to be present in XML. Use UUID parser to validate. * secret_conf.h, secret_conf.c: Generate a UUID if none is provided. Storage UUID in raw format. * src/secret_driver.c: Adjust to deal with raw UUIDs. Save secrets in a filed with printable UUID, instead of base64 UUID. * src/virsh.c: Adjust for changed public API contract of virSecretGetUUIDString. * src/storage_Backend.c: DOn't undefine secret we just generated upon successful volume creation. Fix to handle raw UUIDs. Generate a non-clashing UUID * src/qemu_driver.c: Change to use lookupByUUID instead of lookupByUUIDString
-
- 02 9月, 2009 1 次提交
-
-
由 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
-
- 18 8月, 2009 1 次提交
-
-
由 Chris Lalancette 提交于
Currently the reference counting for connections is busted. I first noticed it while trying to use virConnectRef; it would eventually cause a crash in the remote_internal driver, although that was really just a victim. Really, we should only call the close callbacks on the methods when the references drop to 0. To accomplish this, move all of the close callbacks into virUnrefConnect (since there are lots of internal users of that function), and arrange for virConnectClose to call that. V2: Make sure to drop the connection lock before we call the close callbacks, otherwise we could deadlock the daemon V3: Fix up a crash when we got an error from one of the drivers Signed-off-by: NChris Lalancette <clalance@redhat.com>
-
- 24 7月, 2009 1 次提交
-
-
由 Laine Stump 提交于
* src/datatypes.c src/domain_conf.c src/interface_conf.c src/lxc_driver.c src/qemu_driver.c src/storage_backend.c src/virsh.c: add bare %s format string to printf-derivatives called with no format string
-
- 23 7月, 2009 1 次提交
-
-
由 Laine Stump 提交于
* src/datatypes.c: more cleanup, where lock must be released before calling error handling which tries to get it.
-
- 22 7月, 2009 2 次提交
-
-
由 Laine Stump 提交于
* src/datatypes.c: fix a lock problem on error handling, as the error report takes the lock, it must be released before, fixes the problem but just for Interface objects
-
由 Laine Stump 提交于
* src/datatypes.c: handle the nasty case where an interface mac address change, while it's already in use
-
- 21 7月, 2009 1 次提交
-
-
由 Laine Stump 提交于
MAC address of a particular interface may change over time, and the reduced virInterface object (which contains just name and mac) needs to reflect these changes. Since we can't modify the mac address of an existing virInterface (some other thread may currently be using it) we just create a new virInterface, and let the old one die a dignified death when its refct goes to 0. * src/datatypes.c: fix the matching and lifetime of virInterface object accordingly
-
- 29 5月, 2009 1 次提交
-
-
由 Daniel P. Berrange 提交于
-
- 20 5月, 2009 1 次提交
-
-
由 Daniel Veillard 提交于
* configure.in include/libvirt/libvirt.h[.in] include/libvirt/virterror.h qemud/remote.c qemud/remote_dispatch_args.h qemud/remote_dispatch_prototypes.h qemud/remote_dispatch_ret.h qemud/remote_dispatch_table.h qemud/remote_protocol.[chx] src/Makefile.am src/datatypes.c src/datatypes.h src/driver.h src/libvirt.c src/remote_internal.c src/virterror.c src/libvirt_private.syms src/libvirt_public.syms: Add the Interface config APIs and remote stubs for those, patch by Laine Stump * AUTHORS: add Laine daniel
-
- 11 5月, 2009 1 次提交
-
-
由 Daniel P. Berrange 提交于
-
- 01 4月, 2009 1 次提交
-
-
由 Daniel P. Berrange 提交于
-
- 29 1月, 2009 1 次提交
-
-
由 Jim Meyering 提交于
* src/uml_conf.c (VIR_FROM_THIS): Define to VIR_FROM_UML. * src/xs_internal.c (VIR_FROM_THIS): Define to VIR_FROM_XEN. * src/xml.c (VIR_FROM_THIS): Define to VIR_FROM_XML. * src/stats_linux.c (VIR_FROM_THIS): Define to VIR_FROM_STATS_LINUX. * src/datatypes.c (VIR_FROM_THIS): Define to VIR_FROM_NONE. * src/lxc_conf.c (VIR_FROM_THIS): Define to VIR_FROM_LXC. * src/libvirt.c (VIR_FROM_THIS): Define to VIR_FROM_NONE. * src/node_device_conf.c (VIR_FROM_THIS): Define to VIR_FROM_NODEDEV. * src/openvz_conf.c (VIR_FROM_THIS): Define to VIR_FROM_OPENVZ. * src/openvz_driver.c (VIR_FROM_THIS): Define to VIR_FROM_OPENVZ. * src/conf.c (VIR_FROM_THIS): Define to VIR_FROM_CONF. Note: this loses config_filename:config_lineno diagnostics, but that's ok. * src/node_device.c (VIR_FROM_THIS): Define to VIR_FROM_NODEDEV. * src/sexpr.c (VIR_FROM_THIS): Define to VIR_FROM_SEXPR. * po/POTFILES.in: remove src/sexpr.c and src/lxc_conf.c
-
- 20 1月, 2009 1 次提交
-
-
由 Daniel P. Berrange 提交于
-
- 16 1月, 2009 1 次提交
-
-
由 Daniel P. Berrange 提交于
-
- 05 12月, 2008 1 次提交
-
-
由 Daniel P. Berrange 提交于
-
- 21 11月, 2008 1 次提交
-
-
由 Daniel P. Berrange 提交于
-
- 17 11月, 2008 2 次提交
-
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
- 07 11月, 2008 1 次提交
-
-
由 Daniel Veillard 提交于
* src/logging.c src/logging.h proxy/Makefile.am proxy/libvirt_proxy.c src/Makefile.am src/cgroup.c src/datatypes.c src/domain_event.c src/internal.h src/libvirt.c src/lxc_container.c src/lxc_controller.c src/lxc_driver.c src/proxy_internal.c src/qemu_driver.c src/remote_internal.c src/storage_backend_disk.c src/util.c src/veth.c src/xen_internal.c src/xen_unified.c src/xend_internal.c: add new logging module, and move existing definitions there Daniel
-