1. 25 4月, 2008 1 次提交
  2. 11 4月, 2008 1 次提交
  3. 04 4月, 2008 1 次提交
  4. 14 3月, 2008 1 次提交
    • D
      String fixes #436620 · a7892ee0
      Daniel Veillard 提交于
      * qemud/qemud.c src/virsh.c: fixing some user facing strings
        problems pointed out by Francesco Tombolini should fix #436620
      Daniel
      a7892ee0
  5. 11 3月, 2008 1 次提交
  6. 04 3月, 2008 1 次提交
  7. 03 3月, 2008 3 次提交
  8. 23 2月, 2008 1 次提交
    • J
      avoid format string warnings · b1b23f76
      Jim Meyering 提交于
      Avoid warnings like this:
      file:nnn:format not a string literal and no format arguments
      
      * qemud/qemud.c: Insert a "%s" format argument.
      * qemud/remote.c: Likewise.
      * src/iptables.c: Likewise.
      * src/qemu_driver.c: Likewise.
      * src/storage_backend.c: Likewise.
      * src/storage_backend_fs.c: Likewise.
      * src/storage_backend_iscsi.c Likewise.
      * src/storage_backend_logical.c: Likewise.
      * src/storage_conf.c: Likewise.
      * src/storage_driver.c: Likewise.
      b1b23f76
  9. 22 2月, 2008 1 次提交
    • J
      Use safewrite in place of write, in many cases. · b59d9c85
      Jim Meyering 提交于
      Also add "make syntax-check" rules to ensure no new uses sneak in.
      
      There are many uses of write like this:
      
          if (write (fd, xml, towrite) != towrite)
              return -1;
      
      The problem is that the syscall can succeed, yet write less than
      the requested number of bytes, so the caller should retry
      rather than simply failing.
      
      This patch changes most of them to use util.c's safewrite wrapper,
      which encapsulates the process.  Also, there were a few cases in
      which the retry loop was open-coded, and I replaced those, too.
      
      * Makefile.maint (sc_avoid_write): New rule, to avoid recurrence.
      * .x-sc_avoid_write: New file.  Record two legitimate exemptions.
      * qemud/qemud.c (sig_handler, qemudClientWriteBuf): Use safewrite, not write.
      * src/conf.c (__virConfWriteFile): Likewise.
      * src/qemu_conf.c (qemudSaveConfig, qemudSaveNetworkConfig): Likewise.
      * src/qemu_driver.c (qemudWaitForMonitor, qemudStartVMDaemon)
      (qemudVMData, PROC_IP_FORWARD): Likewise.
      * proxy/libvirt_proxy.c: Include "util.h".
      (proxyWriteClientSocket): Use safewrite.
      * src/test.c (testDomainSave, testDomainCoreDump): Likewise.
      * src/proxy_internal.c (virProxyWriteClientSocket): Likewise.
      * src/virsh.c: Include "util-lib.h".
      (vshOutputLogFile): Use safewrite.
      * src/console.c: Include "util-lib.h".
      (vshRunConsole): Use safewrite.
      b59d9c85
  10. 20 2月, 2008 1 次提交
  11. 08 2月, 2008 2 次提交
    • M
      Fix gcc-4.3.0 "inlining failed" warning. · 3da5504e
      Mark McLoughlin 提交于
      * src/internal.h: move xstrol() variants from here ...
      
      * src/util.[ch]: ... to here and rename to virStrToLong()
      
      * src/libvirt_sym.version: export __virStrToLong_i() for
      virsh and qemud.
      
      * src/nodeinfo.c, src/stats_linux.c, src/virsh.c,
        src/xend_internal.c, qemud/qemud.c: replace xstrtol()
      calls with virStrToLong()
      
      * src/nodeinfo.h: don't include internal.h, which was only
      needed for xstrtol(), but instead include libvirt.h which
      is suffificient for the declarations in the header.
      3da5504e
    • J
      Mark all qemudLog diagnostics for translation. · 247df6e4
      Jim Meyering 提交于
      * po/POTFILES.in: Add names of many new files.
      * Makefile.maint (err_func_re): Add qemudLog.
      Mark diagnostics with _(...).  Split some long lines.
      * qemud/qemud.c (remoteCheckCertFile, remoteInitializeGnuTLS):
      (qemudDispatchSignalEvent, qemudSetCloseExec, qemudSetNonBlock):
      (qemudWritePidFile, qemudListenUnix, remoteMakeSockets):
      (remoteListenTCP, qemudInitPaths, qemudInitialize):
      (qemudNetworkInit, remoteInitializeTLSSession, remoteCheckDN):
      (remoteCheckCertificate, remoteCheckAccess, qemudDispatchServer):
      (qemudClientReadBuf, qemudDispatchClientRead):
      (qemudClientWriteBuf, qemudDispatchClientWrite, qemudOneLoop):
      (remoteConfigGetStringList, checkType, GET_CONF_STR):
      (remoteConfigGetAuth, remoteReadConfigFile, main):
      * qemud/remote.c (remoteDispatchAuthSaslInit, remoteSASLCheckSSF):
      (remoteSASLCheckAccess, remoteDispatchAuthSaslStart):
      (remoteDispatchAuthSaslStep, remoteDispatchAuthSaslInit):
      (remoteDispatchAuthSaslStart, remoteDispatchAuthSaslStep):
      (qemudGetSocketIdentity, remoteDispatchAuthPolkit):
      * src/iptables.c (notifyRulesUpdated, MAX_FILE_LEN, iptRulesSave):
      (iptRulesReload):
      * src/qemu_conf.c (qemudExtractVersionInfo, qemudLoadConfig):
      (qemudLoadNetworkConfig, qemudScanConfigDir):
      * src/qemu_driver.c (qemudSetCloseExec, qemudSetNonBlock):
      (qemudAutostartConfigs, qemudStartup, qemudReload):
      (qemudWaitForMonitor, qemudStartVMDaemon, qemudVMData):
      (qemudShutdownVMDaemon, qemudStartNetworkDaemon):
      (qemudShutdownNetworkDaemon, qemudMonitorCommand):
      (qemudDomainUndefine, qemudNetworkUndefine):
      * src/uuid.c (virUUIDGenerate):
      * src/xm_internal.c (xenXMAttachInterface):
      247df6e4
  12. 30 1月, 2008 3 次提交
    • J
      Enable the <assert.h>-checking test; fix violations. · 2c725623
      Jim Meyering 提交于
      * Makefile.cfg (local-checks-to-skip)
      [sc_prohibit_assert_without_use]: Enable.
      * qemud/mdns.c: Don't include <assert.h>; no uses of assert here.
      * qemud/qemud.c: Likewise.
      * qemud/remote.c: Likewise.
      2c725623
    • J
      Enable the <config.h>-requiring test; fix violations · a3781881
      Jim Meyering 提交于
      Use <config.h>, not "config.h", per autoconf documentation.
      * Makefile.cfg (local-checks-to-skip) [sc_require_config_h]: Enable.
      * .x-sc_require_config_h: New file, to list exempted files.
      * Makefile.am (EXTRA_DIST): Add .x-sc_require_config_h.
      a3781881
    • J
      Given code like if (foo) free (foo); remove the useless "if (foo) " part. · acff2d11
      Jim Meyering 提交于
      Likewise, given if (foo != NULL) free (foo); remove the useless "if" test.
      
      * proxy/libvirt_proxy.c: Remove unnecessary "if" test before free.
      * python/generator.py: Likewise.
      * qemud/qemud.c: Likewise.
      * src/buf.c: Likewise.
      * src/conf.c: Likewise.
      * src/hash.c: Likewise.
      * src/iptables.c: Likewise.
      * src/libvirt.c: Likewise.
      * src/openvz_conf.c: Likewise.
      * src/qemu_conf.c: Likewise.
      * src/qemu_driver.c: Likewise.
      * src/remote_internal.c: Likewise.
      * src/test.c: Likewise.
      * src/virsh.c: Likewise.
      * src/virterror.c: Likewise.
      * src/xen_internal.c: Likewise.
      * src/xen_unified.c: Likewise.
      * src/xend_internal.c: Likewise.
      * src/xm_internal.c: Likewise.
      * src/xml.c: Likewise.
      * src/xmlrpc.c: Likewise.
      * src/xs_internal.c: Likewise.
      * tests/testutils.c: Likewise.
      * tests/xencapstest.c: Likewise.
      * tests/xmconfigtest.c: Likewise.
      acff2d11
  13. 23 1月, 2008 1 次提交
    • R
      Portability improvements for Mac OS X. · 9cf2573c
      Richard W.M. Jones 提交于
              * configure.in: Use PortableXDR if available.
              * qemud/internal.h: Use "socketcompat.h".
              * qemud/qemud.c: Use <signal.h>.
              * src/sexpr.c: Use <stdlib.h> instead of <malloc.h>.
              * src/socketcompat.h: Include <sys/un.h> for Mac OS X.
      9cf2573c
  14. 12 12月, 2007 2 次提交
    • J
      Use a variable name as sizeof argument, not a type name. · 49230350
      Jim Meyering 提交于
      Given code like: T *var = calloc (n, sizeof (T));
      Convert to this: T *var = calloc (n, sizeof (*var));
      This first-cut change adjusts all malloc, calloc, and
      realloc statements.
      
      The only binary differences are in remote_internal.c
      (due to the bug fix) and in xmlrpc.c (due to factorization).
      
      * python/libvir.c: As above.
      * qemud/event.c: Likewise.
      * qemud/mdns.c: Likewise.
      * qemud/qemud.c: Likewise.
      * qemud/remote.c: Likewise.
      * src/bridge.c: Likewise.
      * src/buf.c: Likewise.
      * src/conf.c: Likewise.
      * src/hash.c: Likewise.
      * src/iptables.c: Likewise.
      * src/openvz_conf.c: Likewise.
      * src/qemu_conf.c: Likewise.
      * src/qemu_driver.c: Likewise.
      * src/test.c: Likewise.
      * src/xen_internal.c: Likewise.
      * src/xen_unified.c: Likewise.
      * src/xm_internal.c: Likewise.
      * src/xml.c: Likewise.
      * tests/qemuxml2argvtest.c: Likewise.
      * src/xmlrpc.c (xmlRpcValuePtr): Likewise, and minor factorization.
      * src/remote_internal.c (remoteAuthMakeCredentials): Use the right
      type when allocating space for an array of cred _pointers_.
      49230350
    • J
      Test libvirtd's config-processing code. · 5a190594
      Jim Meyering 提交于
      And remove a minor diagnostic inconsistency.
      * tests/daemon-conf: New test.
      * tests/Makefile.am (TESTS_ENVIRONMENT): Prepend qemud/ to PATH,
      so we can invoke libvirtd without an absolute name.
      (test_scripts): Add daemon-conf.
      * qemud/qemud.c (remoteConfigGetAuth): Use checkType,
      rather than open-coding it with a different diagnostic.
      5a190594
  15. 07 12月, 2007 1 次提交
  16. 06 12月, 2007 4 次提交
    • J
      Use gnulib, starting with its physmem and getaddrinfo modules. · 261e7581
      Jim Meyering 提交于
      New files go into these directories:
        gnulib/lib
        gnulib/m4
        gnulib/tests
      
      * bootstrap: A wrapper around gnulib-tool.
      * configure.in: Invoke gl_EARLY and gl_INIT, being careful to put gl_EARLY
      before any macro that uses AC_COMPILE_IFELSE.
      (AC_OUTPUT): Add lib/Makefile and gl-tests/Makefile.  Remove m4/Makefile.
      * Makefile.am (SUBDIRS): Add gnulib/lib and remove m4.  Add gnulib/tests
      early enough that those tests run before any libvirt unit tests.
      * m4/Makefile.am: Remove file.  Not needed.
      * src/Makefile.am (INCLUDES): Add -I$(top_srcdir)/gnulib/lib -I../gnulib/lib.
      (LDADDS, libvirt_la_LIBADD): Add ../gnulib/lib/libgnu.la.
      * src/nodeinfo.c: Include "physmem.h".
      * qemud/qemud.c, src/remote_internal.c: Include "getaddrinfo.h".
      (MEMINFO_PATH, linuxNodeInfoMemPopulate): Remove definitions.
      (virNodeInfoPopulate): Use physmem_total, not linuxNodeInfoMemPopulate.
      * tests/Makefile.am (INCLUDES): Add -I$(top_srcdir)/gnulib/lib -I../gnulib/lib.
      (LDADDS): Add ../gnulib/lib/libgnu.la.
      * qemud/Makefile.am (libvirtd_LDADD): Add ../gnulib/lib/libgnu.la.
      * tests/nodeinfotest.c (linuxTestCompareFiles): No longer read total
      memory from a file.
      Update expected output not to include "Memory: NNNN"
      * tests/nodeinfodata/linux-nodeinfo-1.txt:
      * tests/nodeinfodata/linux-nodeinfo-2.txt:
      * tests/nodeinfodata/linux-nodeinfo-3.txt:
      * tests/nodeinfodata/linux-nodeinfo-4.txt:
      * tests/nodeinfodata/linux-nodeinfo-5.txt:
      * tests/nodeinfodata/linux-nodeinfo-6.txt:
      * src/test.c [WITH_TEST]: Remove definition of _GNU_SOURCE that
      would conflict with the one now in "config.h".
      * autogen.sh: Add -I gnulib/m4.
      * src/conf.c, src/sexpr.c: Don't define _GNU_SOURCE.
      Instead, include "config.h".
      * qemud/qemud.c: Remove definition of _GNU_SOURCE.
      * src/openvz_driver.c: Likewise.
      * src/qemu_driver.c: Likewise.
      * src/remote_internal.c: Likewise.
      
      * configure.in: Use AC_CONFIG_AUX_DIR(build-aux), so that a bunch
      of gettextize-generated files go into build-aux/, rather than in
      the top-level directory.
      * .cvsignore: Adjust.
      * build-aux/.cvsignore: New file.
      
      
      Author: Jim Meyering <meyering@redhat.com>
      261e7581
    • D
      Fix compile issues when SASL is disabled · 2add6b30
      Daniel P. Berrange 提交于
      2add6b30
    • D
      60a6bbe6
    • D
      Added PolicyKit authentication support · 282342c1
      Daniel P. Berrange 提交于
      282342c1
  17. 05 12月, 2007 4 次提交
  18. 04 12月, 2007 1 次提交
  19. 30 11月, 2007 1 次提交
    • J
      Detect heap allocation failure; factor out some duplication. · c3c80a18
      Jim Meyering 提交于
      * qemud/qemud.c (tls_port, tcp_port, mdns_name, tls_allowed_ip_list):
        (tls_allowed_dn_list): Remove "const", now that we free these.
        (unix_sock_rw_mask): Rename from unix_sock_rw_perms, so that
        the latter name can be used as a local string variable, so that the
        variable name matches the config attribute name.
        (unix_sock_ro_mask): Rename from unix_sock_ro_perms, likewise.
        (remoteCheckDN, remoteCheckAccess): Adapt to const removal.
        (qemudDispatchServer): Check for heap allocation failure.
        (remoteConfigGetStringList): New function, based on code from Dan Berrangé.
        (CHECK_TYPE): Remove macro.
        (checkType): New function.
        (GET_CONF_INT, GET_CONF_STR): New macros.
        (remoteReadConfigFile): Use new macros to avoid duplication and to
        check for allocation failure.
      * src/conf.h (virConfTypeName): New static inline function.
      c3c80a18
  20. 26 11月, 2007 1 次提交
  21. 22 11月, 2007 1 次提交
    • J
      Fix a typo in a variable name. · 3e4ea067
      Jim Meyering 提交于
      * qemud/qemud.c: Check crl_file, not ca_file, for revocation list,
      in remoteInitializeGnuTLS.
      
      
      Author: Jim Meyering <meyering@redhat.com>
      3e4ea067
  22. 17 11月, 2007 1 次提交
  23. 14 11月, 2007 1 次提交
    • J
      Parse integers more carefully, cont'd. · 5d254191
      Jim Meyering 提交于
      * qemud/qemud.c: Replace uses of strtol with uses of xstrtol_i.
        Avoid overflow for very large --timeout=N values.
      * src/nodeinfo.c: In linuxNodeInfoMemPopulate and
        linuxNodeInfoCPUPopulate, use xstrtol_i rather than strtol.
        Unlike in qemud.c, here we allow trailing "isspace", and in
        the case of "cpuinfo cpu MHz", also allow a "." terminator,
        since we ignore the decimal and any following digits.
      * src/internal.h: Define xstrtol_ui, too.
      
      
      Author: Jim Meyering <meyering@redhat.com>
      5d254191
  24. 19 9月, 2007 3 次提交
  25. 07 8月, 2007 2 次提交