1. 29 4月, 2014 1 次提交
    • E
      drivers: use virDirRead API · ddcf4730
      Eric Blake 提交于
      Convert all remaining clients of readdir to use the new
      interface, so that we can ensure (unlikely) errors while
      reading a directory are reported.
      
      * src/openvz/openvz_conf.c (openvzAssignUUIDs): Use new
      interface.
      * src/parallels/parallels_storage.c (parallelsFindVolumes)
      (parallelsFindVmVolumes): Report readdir failures.
      * src/qemu/qemu_driver.c (qemuDomainSnapshotLoad): Ignore readdir
      failures.
      * src/secret/secret_driver.c (loadSecrets): Likewise.
      * src/qemu/qemu_hostdev.c
      (qemuHostdevHostSupportsPassthroughVFIO): Report readdir failures.
      * src/xen/xen_inotify.c (xenInotifyOpen): Likewise.
      * src/xen/xm_internal.c (xenXMConfigCacheRefresh): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      ddcf4730
  2. 25 3月, 2014 1 次提交
  3. 21 3月, 2014 1 次提交
  4. 18 3月, 2014 1 次提交
  5. 17 3月, 2014 1 次提交
  6. 11 7月, 2013 1 次提交
  7. 10 7月, 2013 1 次提交
  8. 03 7月, 2013 1 次提交
  9. 24 6月, 2013 1 次提交
  10. 09 5月, 2013 1 次提交
  11. 02 5月, 2013 1 次提交
    • M
      virutil: Move string related functions to virstring.c · 7c9a2d88
      Michal Privoznik 提交于
      The source code base needs to be adapted as well. Some files
      include virutil.h just for the string related functions (here,
      the include is substituted to match the new file), some include
      virutil.h without any need (here, the include is removed), and
      some require both.
      7c9a2d88
  12. 24 4月, 2013 3 次提交
  13. 22 3月, 2013 1 次提交
  14. 21 12月, 2012 6 次提交
  15. 04 12月, 2012 1 次提交
  16. 30 11月, 2012 1 次提交
  17. 01 11月, 2012 1 次提交
    • E
      build: prefer mkostemp for multi-thread safety · 4dbd6e96
      Eric Blake 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=871756
      
      Commit cd1e8d1c assumed that systems new enough to have journald
      also have mkostemp; but this is not true for uclibc.
      
      For that matter, use of mkstemp[s] is unsafe in a multi-threaded
      program.  We should prefer mkostemp[s] in the first place.
      
      * bootstrap.conf (gnulib_modules): Add mkostemp, mkostemps; drop
      mkstemp and mkstemps.
      * cfg.mk (sc_prohibit_mkstemp): New syntax check.
      * tools/virsh.c (vshEditWriteToTempFile): Adjust caller.
      * src/qemu/qemu_driver.c (qemuDomainScreenshot)
      (qemudDomainMemoryPeek): Likewise.
      * src/secret/secret_driver.c (replaceFile): Likewise.
      * src/vbox/vbox_tmpl.c (vboxDomainScreenshot): Likewise.
      4dbd6e96
  18. 21 9月, 2012 1 次提交
  19. 18 9月, 2012 1 次提交
    • M
      secret: Fix error for private secrets · 54106114
      Martin Kletzander 提交于
      When trying to get the value of a private secret, the code used
      'operation denied' error. That error is specified as a error for
      read-only connections trying to perform denied operation. The
      following error seems more accurate.
      
      To compare the difference:
       - BEFORE
      error: operation secret is private forbidden for read only access
      
       - AFTER
      error: Invalid secret: secret is private
      54106114
  20. 17 9月, 2012 1 次提交
    • O
      list: Implement listAllSecrets · 288f9b13
      Osier Yang 提交于
      Simply returns the object list. Supports to filter the secrets
      by its storage location, and whether it's private or not.
      
      src/secret/secret_driver.c: Implement listAllSecrets
      288f9b13
  21. 23 7月, 2012 1 次提交
    • O
      Desert the FSF address in copyright · f9ce7dad
      Osier Yang 提交于
      Per the FSF address could be changed from time to time, and GNU
      recommends the following now: (http://www.gnu.org/licenses/gpl-howto.html)
      
        You should have received a copy of the GNU General Public License
        along with Foobar.  If not, see <http://www.gnu.org/licenses/>.
      
      This patch removes the explicit FSF address, and uses above instead
      (of course, with inserting 'Lesser' before 'General').
      
      Except a bunch of files for security driver, all others are changed
      automatically, the copyright for securify files are not complete,
      that's why to do it manually:
      
        src/security/security_selinux.h
        src/security/security_driver.h
        src/security/security_selinux.c
        src/security/security_apparmor.h
        src/security/security_apparmor.c
        src/security/security_driver.c
      f9ce7dad
  22. 19 7月, 2012 2 次提交
  23. 28 5月, 2012 1 次提交
  24. 14 5月, 2012 1 次提交
    • W
      Use XDG Base Directories instead of storing in home directory · 32a9aac2
      William Jon McCann 提交于
      As defined in:
      http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
      
      This offers a number of advantages:
       * Allows sharing a home directory between different machines, or
      sessions (eg. using NFS)
       * Cleanly separates cache, runtime (eg. sockets), or app data from
      user settings
       * Supports performing smart or selective migration of settings
      between different OS versions
       * Supports reseting settings without breaking things
       * Makes it possible to clear cache data to make room when the disk
      is filling up
       * Allows us to write a robust and efficient backup solution
       * Allows an admin flexibility to change where data and settings are stored
       * Dramatically reduces the complexity and incoherence of the
      system for administrators
      32a9aac2
  25. 29 10月, 2011 1 次提交
  26. 22 7月, 2011 1 次提交
    • E
      build: rename files.h to virfile.h · 8e22e089
      Eric Blake 提交于
      In preparation for a future patch adding new virFile APIs.
      
      * src/util/files.h, src/util/files.c: Move...
      * src/util/virfile.h, src/util/virfile.c: ...here, and rename
      functions to virFile prefix.  Macro names are intentionally
      left alone.
      * *.c: All '#include "files.h"' uses changed.
      * src/Makefile.am (UTIL_SOURCES): Reflect rename.
      * cfg.mk (exclude_file_name_regexp--sc_prohibit_close): Likewise.
      * src/libvirt_private.syms: Likewise.
      * docs/hacking.html.in: Likewise.
      * HACKING: Regenerate.
      8e22e089
  27. 19 7月, 2011 1 次提交
    • E
      libvirt: do not mix internal flags into public API · 33ba6e68
      Eric Blake 提交于
      There were two API in driver.c that were silently masking flags
      bits prior to calling out to the drivers, and several others
      that were explicitly masking flags bits.  This is not
      forward-compatible - if we ever have that many flags in the
      future, then talking to an old server that masks out the
      flags would be indistinguishable from talking to a new server
      that can honor the flag.  In general, libvirt.c should forward
      _all_ flags on to drivers, and only the drivers should reject
      unknown flags.
      
      In the case of virDrvSecretGetValue, the solution is to separate
      the internal driver callback function to have two parameters
      instead of one, with only one parameter affected by the public
      API.  In the case of virDomainGetXMLDesc, it turns out that
      no one was ever mixing VIR_DOMAIN_XML_INTERNAL_STATUS with
      the dumpxml path in the first place; that internal flag was
      only used in saving and restoring state files, which happened
      to be in functions internal to a single file, so there is no
      mixing of the internal flag with a public flags argument.
      Additionally, virDomainMemoryStats passed a flags argument
      over RPC, but not to the driver.
      
      * src/driver.h (VIR_DOMAIN_XML_FLAGS_MASK)
      (VIR_SECRET_GET_VALUE_FLAGS_MASK): Delete.
      (virDrvSecretGetValue): Separate out internal flags.
      (virDrvDomainMemoryStats): Provide missing flags argument.
      * src/driver.c (verify): Drop unused check.
      * src/conf/domain_conf.h (virDomainObjParseFile): Delete
      declaration.
      (virDomainXMLInternalFlags): Move...
      * src/conf/domain_conf.c: ...here.  Delete redundant include.
      (virDomainObjParseFile): Make static.
      * src/libvirt.c (virDomainGetXMLDesc, virSecretGetValue): Update
      clients.
      (virDomainMemoryPeek, virInterfaceGetXMLDesc)
      (virDomainMemoryStats, virDomainBlockPeek, virNetworkGetXMLDesc)
      (virStoragePoolGetXMLDesc, virStorageVolGetXMLDesc)
      (virNodeNumOfDevices, virNodeListDevices, virNWFilterGetXMLDesc):
      Don't mask unknown flags.
      * src/interface/netcf_driver.c (interfaceGetXMLDesc): Reject
      unknown flags.
      * src/secret/secret_driver.c (secretGetValue): Update clients.
      * src/remote/remote_driver.c (remoteSecretGetValue)
      (remoteDomainMemoryStats): Likewise.
      * src/qemu/qemu_process.c (qemuProcessGetVolumeQcowPassphrase):
      Likewise.
      * src/qemu/qemu_driver.c (qemudDomainMemoryStats): Likewise.
      * daemon/remote.c (remoteDispatchDomainMemoryStats): Likewise.
      33ba6e68
  28. 13 7月, 2011 1 次提交
    • E
      util: reject unknown flags, and prefer unsigned flags · 833fe8ab
      Eric Blake 提交于
      Silently ignored flags get in the way of new features that
      use those flags.  Also, an upcoming syntax check will favor
      unsigned flags.
      
      * src/nodeinfo.h (nodeGetCPUStats, nodeGetMemoryStats): Drop
      unused attribute.
      * src/interface/netcf_driver.c (interfaceOpenInterface)
      (interfaceDefineXML, interfaceCreate, interfaceDestroy): Reject
      unknown flags.
      * src/network/bridge_driver.c (networkOpenNetwork)
      (networkGetXMLDesc): Likewise.
      * src/nwfilter/nwfilter_driver.c (nwfilterOpen): Likewise.
      * src/secret/secret_driver.c (secretOpen, secretDefineXML)
      (secretGetXMLDesc, secretSetValue): Likewise.
      * src/util/logging.c (virLogDefineFilter, virLogDefineOutput)
      (virLogMessage): Likewise; also use unsigned flags.
      * src/util/logging.h (virLogDefineFilter, virLogDefineOutput)
      (virLogMessage): Change signature.
      * src/util/command.c (virExecWithHook): Likewise.
      833fe8ab
  29. 08 7月, 2011 1 次提交
    • E
      drivers: prefer unsigned int for flags · 1740c381
      Eric Blake 提交于
      Now that the public APIs always use unsigned flags, the internal
      driver callbacks might as well do likewise.
      
      * src/driver.h (vrDrvOpen, virDrvDomainCoreDump)
      (virDrvDomainGetXMLDesc, virDrvNetworkGetXMLDesc)
      (virDrvNWFilterGetXMLDesc): Update type.
      * src/remote/remote_protocol.x (remote_open_args)
      (remote_domain_core_dump_args, remote_domain_get_xml_desc_args)
      (remote_network_get_xml_desc_args)
      (remote_nwfilter_get_xml_desc_args): Likewise.
      * src/test/test_driver.c: Update clients.
      * src/remote/remote_driver.c: Likewise.
      * src/xen/xen_hypervisor.c: Likewise.
      * src/xen/xen_hypervisor.h: Likewise.
      * src/xen/xen_driver.c: Likewise.
      * src/xen/xend_internal.c: Likewise.
      * src/xen/xend_internal.h: Likewise.
      * src/xen/xm_internal.c: Likewise.
      * src/xen/xm_internal.h: Likewise.
      * src/xen/xs_internal.c: Likewise.
      * src/xen/xs_internal.h: Likewise.
      * src/xen/xen_inotify.c: Likewise.
      * src/xen/xen_inotify.h: Likewise.
      * src/phyp/phyp_driver.c: Likewise.
      * src/openvz/openvz_driver.c: Likewise.
      * src/vmware/vmware_driver.c: Likewise.
      * src/vbox/vbox_driver.c: Likewise.
      * src/vbox/vbox_tmpl.c: Likewise.
      * src/xenapi/xenapi_driver.c: Likewise.
      * src/esx/esx_driver.c: Likewise.
      * src/esx/esx_interface_driver.c: Likewise.
      * src/esx/esx_network_driver.c: Likewise.
      * src/esx/esx_storage_driver.c: Likewise.
      * src/esx/esx_device_monitor.c: Likewise.
      * src/esx/esx_secret_driver.c: Likewise.
      * src/esx/esx_nwfilter_driver.c: Likewise.
      * src/interface/netcf_driver.c: Likewise.
      * src/nwfilter/nwfilter_driver.c: Likewise.
      * src/libxl/libxl_driver.c: Likewise.
      * src/qemu/qemu_driver.c: Likewise.
      * src/lxc/lxc_driver.c: Likewise.
      * src/uml/uml_driver.c: Likewise.
      * src/network/bridge_driver.c: Likewise.
      * src/secret/secret_driver.c: Likewise.
      * src/storage/storage_driver.c: Likewise.
      * src/node_device/node_device_hal.c: Likewise.
      * src/node_device/node_device_udev.c: Likewise.
      * src/remote_protocol-structs: Likewise.
      1740c381
  30. 08 6月, 2011 1 次提交
    • E
      secret: drop dead code · ba4983da
      Eric Blake 提交于
      Detected by Coverity.  The only ways to get to the cleanup label
      were by an early abort (list still unassigned) or after successfully
      transferring list to dest, so there is no list to clean up.
      
      * src/secret/secret_driver.c (loadSecrets): Kill dead code.
      ba4983da
  31. 16 5月, 2011 1 次提交
  32. 12 5月, 2011 1 次提交
    • L
      libvirt,logging: cleanup VIR_XXX0() · b65f37a4
      Lai Jiangshan 提交于
      These VIR_XXXX0 APIs make us confused, use the non-0-suffix APIs instead.
      
      How do these coversions works? The magic is using the gcc extension of ##.
      When __VA_ARGS__ is empty, "##" will swallow the "," in "fmt," to
      avoid compile error.
      
      example: origin				after CPP
      	high_level_api("%d", a_int)	low_level_api("%d", a_int)
      	high_level_api("a  string")	low_level_api("a  string")
      
      About 400 conversions.
      
      8 special conversions:
      VIR_XXXX0("") -> VIR_XXXX("msg") (avoid empty format) 2 conversions
      VIR_XXXX0(string_literal_with_%) -> VIR_XXXX(%->%%) 0 conversions
      VIR_XXXX0(non_string_literal) -> VIR_XXXX("%s", non_string_literal)
        (for security) 6 conversions
      Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
      b65f37a4