1. 25 12月, 2013 1 次提交
  2. 14 12月, 2013 1 次提交
  3. 05 12月, 2013 1 次提交
    • P
      examples: Remove broken bad example · 5eb4b042
      Peter Krempa 提交于
      The domsuspend example code is a really old and bad exmample of (how not
      to use) the libvirt API. Remove it as it's apparent that nobody tried to
      use it. It was broken and nobody complained.
      5eb4b042
  4. 26 11月, 2013 2 次提交
  5. 21 10月, 2013 1 次提交
    • D
      Don't link virt-login-shell against libvirt.so (CVE-2013-4400) · 3e2f27e1
      Daniel P. Berrange 提交于
      The libvirt.so library has far too many library deps to allow
      linking against it from setuid programs. Those libraries can
      do stuff in __attribute__((constructor) functions which is
      not setuid safe.
      
      The virt-login-shell needs to link directly against individual
      files that it uses, with all library deps turned off except
      for libxml2 and libselinux.
      
      Create a libvirt-setuid-rpc-client.la library which is linked
      to by virt-login-shell. A config-post.h file allows this library
      to disable all external deps except libselinux and libxml2.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      3e2f27e1
  6. 17 10月, 2013 1 次提交
    • G
      build: use the gnulib version of the .m4 files when present · 70dadfa7
      Giuseppe Scrivano 提交于
      prevent aclocal from preferring .m4 files under m4/ over the version
      provided by gnulib, by using only one directory.
      
      I have noticed this after './configure --help' gave me two different
      versions of "--enable-threads".  This was caused by aclocal that
      preferred the version of lock.m4 provided by autopoint instead of
      using the newer version distributed with gnulib.
      
      Having two different directories made sense back when we checked
      gnulib files into libvirt.git, but that was ages ago.
      Signed-off-by: NGiuseppe Scrivano <gscrivan@redhat.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      70dadfa7
  7. 24 9月, 2013 1 次提交
    • E
      build: ensure 'make check' sees up-to-date config.h · b0d9207b
      Eric Blake 提交于
      Nehal J. Wani reported on IRC a rather interesting build failure:
      
      In file included from util/virnetdevbridge.c:53:0:
      /usr/include/linux/in6.h:30:8: error: redefinition of 'struct in6_addr'
       struct in6_addr {
              ^
      
      I traced it to the fact that he ran 'git pull; make check' across
      commit e62e0094.  What happened is that the configure changes
      result in a new variable that was set to be defined on his system,
      but config.h was not regenerated to contain the value of that
      variable.  Running 'make' instead of 'make check' cleaned up the
      problem.  A bit more investigation, and I see that in Makefile.am,
      automake sticks rules that rebuild config.h as part of 'make all',
      and that we also had a dependency 'check-local: all'; BUT the
      rule for check-local is run only at the point when the top-level
      directory is visited.  Automake documents that SUBDIRS should
      contain an explicit '.' at the point the top-level should be
      visited (defaulting to last, if it doesn't appear).  Sure enough,
      with this patch, 'make check' now does the top-level 'all' rules,
      which regenerates 'config.h' BEFORE compiling any code that might
      depend on changed content of that file.
      
      * Makefile.am (SUBDIRS): Put '.' first, not last.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      b0d9207b
  8. 19 7月, 2013 1 次提交
    • E
      maint: split long lines in Makefiles · d21d40bf
      Eric Blake 提交于
      Makefiles are another easy file to enforce line limits.
      
      Mostly straightforward; interesting tricks worth noting:
      src/Makefile.am: $(confdir) was already defined, use it in more places
      tests/Makefile.am: path_add and VG required some interesting compression
      
      * cfg.mk (sc_prohibit_long_lines): Add another test.
      * Makefile.am: Fix offenders.
      * daemon/Makefile.am: Likewise.
      * docs/Makefile.am: Likewise.
      * python/Makefile.am: Likewise.
      * src/Makefile.am: Likewise.
      * tests/Makefile.am: Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      d21d40bf
  9. 21 5月, 2013 1 次提交
    • E
      maint: use LGPL correctly · d7f53c7b
      Eric Blake 提交于
      Several files called out COPYING or COPYING.LIB instead of using
      the normal boilerplate.  It's especially important that we don't
      call out COPYING from an LGPL file, since COPYING is traditionally
      used for the GPL.  A few files were lacking copyright altogether.
      
      * src/rpc/gendispatch.pl: Add missing copyright.
      * Makefile.nonreentrant: Likewise.
      * src/check-symfile.pl: Likewise.
      * src/check-symsorting.pl: Likewise.
      * src/driver.h: Likewise.
      * src/internal.h: Likewise.
      * tools/libvirt-guests.sh.in: Likewise.
      * tools/virt-pki-validate.in: Mention copyright in comment, not just code.
      * tools/virt-sanlock-cleanup.in: Likewise.
      * src/rpc/genprotocol.pl: Spell out license terms.
      * src/xen/xend_internal.h: Likewise.
      * src/xen/xend_internal.c: Likewise.
      * Makefile.am: Likewise.
      * daemon/Makefile.am: Likewise.
      * docs/Makefile.am: Likewise.
      * docs/schemas/Makefile.am: Likewise.
      * examples/apparmor/Makefile.am: Likewise.
      * examples/domain-events/events-c/Makefile.am: Likewise.
      * examples/dominfo/Makefile.am: Likewise.
      * examples/domsuspend/Makefile.am: Likewise.
      * examples/hellolibvirt/Makefile.am: Likewise.
      * examples/openauth/Makefile.am: Likewise.
      * examples/python/Makefile.am: Likewise.
      * examples/systemtap/Makefile.am: Likewise.
      * examples/xml/nwfilter/Makefile.am: Likewise.
      * gnulib/lib/Makefile.am: Likewise.
      * gnulib/tests/Makefile.am: Likewise.
      * include/Makefile.am: Likewise.
      * include/libvirt/Makefile.am: Likewise.
      * python/Makefile.am: Likewise.
      * python/tests/Makefile.am: Likewise.
      * src/Makefile.am: Likewise.
      * tests/Makefile.am: Likewise.
      * tools/Makefile.am: Likewise.
      * configure.ac: Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      d7f53c7b
  10. 18 12月, 2012 1 次提交
    • J
      build: Fix AUTHORS generation · 7f193f1f
      Jiri Denemark 提交于
      Using s/#authorslist#/$$out/ makes perl eat @domain part of all email
      addresses from $out since it tries to interpret them as array variables.
      I'm not sure if we can escape those in s/// but I know we can use print:
      
          s/#authorslist#// and print '$$out'
      
      to tell perl not to even look inside $out.
      
      This patch also fixes gen-AUTHORS so that it works in VPATH.
      7f193f1f
  11. 12 12月, 2012 1 次提交
    • E
      maint: mention when HACKING is rebuilt during make · cdf1a372
      Eric Blake 提交于
      I noticed that on Fedora 18, xlstproc decides to regenerate
      HACKING with additional whitespace.  I haven't figured out why
      that is happening (although fixing it would probably be a task
      for xlstproc), but in the process of investigating, I noticed
      that 'make HACKING' was completely silent, for no good reason.
      
      * Makefile.am (gen-ChangeLog, gen-AUTHORS, NEWS)
      ($(top_srcdir)/HACKING): Mention which files we are generating.
      cdf1a372
  12. 20 10月, 2012 1 次提交
    • C
      Autogenerate AUTHORS · 7b21981c
      Cole Robinson 提交于
      AUTHORS.in tracks the maintainers, as well as some folks who were
      previously in AUTHORS but don't have a git commit with proper
      attribution.
      
      Generated output is sorted alphabetically and lacks pretty spacing, so
      tweak AUTHORS.in to follow the same format.
      
      Additionally, drop the syntax-check rule that previously validated
      AUTHORS against git log.
      7b21981c
  13. 18 9月, 2012 1 次提交
    • R
      Add a ./run script for running programs from the local directory. · 5090c576
      Richard W.M. Jones 提交于
      With this script you can run libvirt programs without needing to
      install them first.  You just have to do for example:
      
        ./run ./tools/virsh [args ...]
      
      If you are already in the tools/ subdirectory, then the following
      command will also work:
      
        ../run ./virsh [...]
      
      You can also run the C programs under valgrind like this:
      
        ./run valgrind [valgrind opts...] ./program
      
      or under gdb:
      
        ./run gdb --args ./program
      
      This also works with sudo (eg. if you need root access for libvirt):
      
        sudo ./run ./tools/virsh list --all
      
      Derived from libguestfs and simplified.  The ./run script in
      libguestfs is much more sophisticated:
      
      https://github.com/libguestfs/libguestfs/blob/master/run.in
      5090c576
  14. 25 6月, 2012 1 次提交
  15. 29 7月, 2011 1 次提交
    • E
      maint: add missing copyright notices · ff81956a
      Eric Blake 提交于
      I went with the shorter license notice used by src/libvirt.c,
      rather than spelling out the full LGPLv2+ clause into each of
      these files.
      
      * configure.ac: Declare copyright.
      * all Makefile.am: Likewise.
      ff81956a
  16. 09 5月, 2011 1 次提交
  17. 07 5月, 2011 1 次提交
    • E
      build: drop files generated by config.status from tarball · e6972165
      Eric Blake 提交于
      The rule of thumb is that any file generated by config.status
      is a) reproducible by any user, b) dependent on configure options.
      Therefore, it is inappropriate to include such generated files
      in the tarball (for proof, Makefile is generated from Makefile.in;
      the former is not in the tarball while the latter is).
      
      * Makefile.am (EXTRA_DIST): Remove files covered by AC_OUTPUT.
      e6972165
  18. 24 3月, 2011 1 次提交
    • E
      build: nuke all .x-sc* files, and fix VPATH syntax-check · 2d24037d
      Eric Blake 提交于
      Not every day you see a patch that nukes 27 files!
      
      * .gnulib: Update to latest, for maint.mk improvements
      * bootstrap: Resync to gnulib.
      * bootstrap.conf (ACLOCAL): Swap the secondary aclocal include
      directory, now that bootstrap picks up gnulib/m4 instead of m4.
      * Makefile.am (syntax_check_exceptions, EXTRA_DIST): No longer
      worry about nuked files.
      * cfg.mk (sc_x_sc_dist_check): Delete dead rule.
      (VC_LIST_ALWAYS_EXCLUDE_REGEX): Add HACKING.
      (exclude_file_name_regexp--sc_*): Inline and simplify contents...
      * .x-sc_*: ...from here, then delete the files.
      2d24037d
  19. 10 2月, 2011 1 次提交
  20. 30 1月, 2011 1 次提交
    • E
      maint: reject raw close, popen in 'make syntax-check' · 030ce43b
      Eric Blake 提交于
      commit f1fe9671 was supposed to make sure we use files.h
      macros to avoid double close, but it didn't work.
      
      Meanwhile, virCommand is vastly superior to system(), fork(),
      and popen() (also to virExec, but we haven't completed that
      conversion), so enforce that, too.
      
      * cfg.mk (sc_prohibit_close): Fix typo that excluded close, and
      add pclose.
      (sc_prohibit_fork_wrappers): New rule, for fork, system, and popen.
      * .x-sc_prohibit_close: More exemptions.
      * .x-sc_prohibit_fork_wrappers: New file.
      * Makefile.am (syntax_check_exceptions): Ship new file.
      * src/datatypes.c (virReleaseConnect): Tweak comment to avoid
      false positive.
      * src/util/files.h (VIR_CLOSE): Likewise.
      030ce43b
  21. 15 1月, 2011 1 次提交
    • E
      maint: improve sc_prohibit_strncmp syntax check · 63dbc84a
      Eric Blake 提交于
      * .gnulib: Update, for sc_prohibit_strcmp fix.
      * cfg.mk: Adjust copyright; the only FSF portions come from when
      this file was copied from coreutils.
      (sc_prohibit_strncmp): Copy bug-fixes from sc_prohibit_strcmp.
      * .x-sc_prohibit_strcmp: Delete, now that rule is smarter.
      * .x-sc_prohibit_strncmp: Likewise.
      * Makefile.am (syntax_check_exceptions): Track deletion.
      63dbc84a
  22. 25 11月, 2010 3 次提交
    • E
      maint: prohibit most uses of xmlGetProp · 416c09bc
      Eric Blake 提交于
      Making this change makes it easier to spot the memory leaks
      that will be fixed in the next patch.
      
      * cfg.mk (sc_prohibit_xmlGetProp): New rule.
      * .x-sc_prohibit_xmlGetProp: New exception.
      * Makefile.am (EXTRA_DIST): Ship exception file.
      * tools/virsh.c (cmdDetachInterface, cmdDetachDisk): Adjust
      offenders.
      * src/conf/storage_conf.c (virStoragePoolDefParseSource):
      Likewise.
      * src/conf/network_conf.c (virNetworkDHCPRangeDefParseXML)
      (virNetworkIPParseXML): Likewise.
      416c09bc
    • E
      maint: ensure syntax check exceptions are distributed · 97cde147
      Eric Blake 提交于
      * Makefile.am (EXTRA_DIST): Factor exceptions files...
      (syntax_check_excpetions): into new list.  Include recently added
      exceptions.
      * cfg.mk (sc_x_sc_dist_check): New check, copied from coreutils.
      97cde147
    • E
      build: enforce files.h usage · f1fe9671
      Eric Blake 提交于
      * cfg.mk (sc_prohibit_close): New syntax-check rule.
      * src/util/pci.c (pciWaitForDeviceCleanup): Fix violation.
      * .x-sc_prohibit_close: New exceptions.
      * Makefile.am (EXTRA_DIST): Distribute new file.
      f1fe9671
  23. 19 11月, 2010 1 次提交
    • E
      maint: tighten strncmp syntax check · d2af8ffc
      Eric Blake 提交于
      Using 'int ret = strcmp(a, b)' in a qsort function is a valid use of
      str[n]cmp that should _not_ be turned to STREQ, but it was falling
      foul of our specific syntax-check.  Meanwhile, gnulib's maint.mk
      already has a tighter bound for strcmp, so we can copy that regex and
      just check for strncmp, which results in fewer false positives that
      require exceptions.
      
      * cfg.mk (sc_prohibit_strcmp_and_strncmp): Rename...
      (sc_prohibit_strncmp): ...to this, and tighten, to mirror
      maint.mk's sc_prohibit_strcmp's better regex.
      * Makefile.am (syntax_check_exceptions): Update exception rule.
      * .x-sc_prohibit_strcmp_and_strncmp: Rename...
      * .x-sc_prohibit_strncmp: ...and trim.
      d2af8ffc
  24. 18 11月, 2010 2 次提交
    • E
      maint: avoid remaining sprintf uses · e8aba782
      Eric Blake 提交于
      * cfg.mk (sc_prohibit_sprintf): New rule.
      (sc_prohibit_asprintf): Avoid false positives.
      * docs/hacking.html.in (Printf-style functions): Document the
      policy.
      * HACKING: Regenerate.
      * .x-sc_prohibit_sprintf: New exemptions.
      * Makefile.am (syntax_check_exceptions): Ship new file.
      * src/vbox/vbox_tmpl.c (vboxStartMachine, vboxAttachUSB): Use
      virAsprintf instead.
      * src/uml/uml_driver.c (umlOpenMonitor): Use snprintf instead.
      * tools/virsh.c (cmdDetachInterface): Likewise.
      * src/security/security_selinux.c (SELinuxGenSecurityLabel):
      Likewise.
      * src/openvz/openvz_driver.c (openvzDomainDefineCmd): Likewise,
      and ensure large enough buffer.
      e8aba782
    • E
      maint: update to latest gnulib · 144c06d4
      Eric Blake 提交于
      Allows bootstrap to work on FreeBSD, where gzip doesn't have a '.'
      in its version; and silences false positives in the new
      'make syntax-check' rule.
      
      * .gnulib: Update to latest.
      * bootstrap: Synchronize to upstream.
      * .x-sc_bindtextdomain: New exemptions.
      * Makefile.am (syntax_check_exceptions): Ship new file.
      * .gitignore: Regenerate per latest bootstrap, anchor entries that
      are only in the root directory, and consolidate entries from other
      generated .gitignore files.
      * build-aux/.gitignore, m4/.gitignore, po/.gitignore: Remove from
      version control, since bootstrap generates them.
      144c06d4
  25. 13 11月, 2010 1 次提交
  26. 09 11月, 2010 1 次提交
  27. 27 10月, 2010 1 次提交
    • E
      maint: fix syntax-check failure of previous patch · 1987b090
      Eric Blake 提交于
      * cfg.mk (sc_prohibit_trailing_blank_lines): Delete; this is
      adequately covered by maint.mk's sc_prohibit_empty_lines_at_EOF.
      * .x-sc_prohibit_empty_lines_at_EOF: New file, to exempt raw
      patches.
      * Makefile.am (EXTRA_DIST): Include new exemption.
      1987b090
  28. 22 10月, 2010 1 次提交
    • D
      Add dtrace static probes in libvirtd · 968eb4e5
      Daniel P. Berrange 提交于
      Adds initial support for dtrace static probes in libvirtd
      daemon, assuming use of systemtap dtrace compat shim on
      Linux. The probes are inserted for network client connect,
      disconnect, TLS handshake states and authentication protocol
      states.
      
      This can be tested by running the xample program and then
      attempting to connect with any libvirt client (virsh,
      virt-manager, etc).
      
       # stap examples/systemtap/client.stp
        Client fd=44 connected readonly=0
        Client fd=44 auth polkit deny pid:24997,uid:500
        Client fd=44 disconnected
        Client fd=46 connected readonly=1
        Client fd=46 auth sasl allow test
        Client fd=46 disconnected
      
      The libvirtd.stp file should also really not be required,
      since it is duplicated info that is already available in
      the main probes.d definition file. A script to autogenerate
      the .stp file is needed, either in libvirtd tree, or better
      as part of systemtap itself.
      
      * Makefile.am: Add examples/systemtap subdir
      * autobuild.sh: Disable dtrace for mingw32
      * configure.ac: Add check for dtrace
      * daemon/.gitignore: Ignore generated dtrace probe file
      * daemon/Makefile.am: Build dtrace probe header & object
        files
      * daemon/libvirtd.stp: SystemTAP convenience probeset
      * daemon/libvirtd.c: Add connect/disconnect & TLS probes
      * daemon/remote.c: Add SASL and PolicyKit auth probes
      * daemon/probes.d: Master probe definition
      * daemon/libvirtd.h: Add convenience macro for probes
        so that compilation is a no-op when dtrace is not available
      * examples/systemtap/Makefile.am, examples/systemtap/client.stp
        Example systemtap script using dtrace probe markers
      * libvirt.spec.in: Enable dtrace on F13/RHEL6
      * mingw32-libvirt.spec.in: Force disable dtrace
      968eb4e5
  29. 30 7月, 2010 1 次提交
    • E
      build: restore operation of bit-rotted 'make cov' · e7064aa6
      Eric Blake 提交于
      './autobuild.sh' with lcov installed discovered that our
      coverage support has been bit-rotting for a while.  This
      restores it back to a successful state, although I have
      not yet spent any time looking through the resulting files to
      look for low-hanging fruit in the unit test coverage front.
      
      * configure.ac: Clear COMPILER_FLAGS at right place.
      * Makefile.am (cov): Newer genhtml no longer likes plain -s.
      * m4/compiler-flags.m4 (gl_COMPILER_FLAGS): Don't AC_SUBST
      COMPILER_FLAGS; it is a shell variable for use in configure only.
      * src/Makefile.am (AM_CFLAGS, AM_LDFLAGS): New variables, to make
      it easier to provide global flag additions.  Use throughout, to
      uniformly apply coverage flags.
      * .gitignore: Globally ignore gcov output.
      * daemon/.gitignore: Simplify.
      * src/.gitignore: Likewise.
      * tests/.gitignore: Likewise.
      e7064aa6
  30. 13 7月, 2010 1 次提交
  31. 13 4月, 2010 1 次提交
    • E
      build: fix syntax-check problems · babaae92
      Eric Blake 提交于
      * .x-sc_prohibit_gettext_noop: Add new exemption.
      * .x-sc_prohibit_test_minus_ao: Likewise.
      * Makefile.am (EXTRA_DIST): Distribute new files.
      * .gitignore: Ignore built file.
      babaae92
  32. 27 3月, 2010 1 次提交
    • S
      Add some examples filters · e3a7137a
      Stefan Berger 提交于
      This patch adds some example filters to libvirt. They are automatically
      installed into the proper directory for libvirt to pick them up.
      e3a7137a
  33. 25 2月, 2010 1 次提交
    • J
      build: avoid non-srcdir "make distcheck" failures (srcdir vs wildcard) · 083b901e
      Jim Meyering 提交于
      * tests/xencapsdata/Makefile.am: Use $(wildcard in $(srcdir)-aware manner
      * tests/xmconfigdata/Makefile.am: Likewise.
      * tests/xml2sexprdata/Makefile.am: Likewise.
      * tests/sexpr2xmldata/Makefile.am (EXTRA_DIST): Likewise.
      * Makefile.am (XML_EXAMPLES): Use $(wildcard in $(srcdir)-aware manner.
      083b901e
  34. 14 12月, 2009 1 次提交
    • J
      add AppArmor test and examples to dist · ad905a19
      Jamie Strandboge 提交于
      tests/virt-aa-helper-test and examples/apparmor are not included in
      official tarballs, but should be. Attached is a patch to fix that
      which works when apparmor is and is not available.
      ad905a19
  35. 26 10月, 2009 2 次提交