1. 08 1月, 2019 3 次提交
    • E
      examples: Avoid gnulib, have standalone examples · acf522e8
      Eric Blake 提交于
      Commit 0c6ad476 updated gnulib, which rearranged some of the
      conditions in gnulib wrapper headers such that compilation
      started failing on BSD systems when the normal system <unistd.h>
      tried to include another system header but instead got a
      gnulib wrapper header in an incomplete state; this is because
      gnulib headers only work if <config.h> is included first.
      
      Commit b6f78259 papered over the symptoms of that by including
      <config.h> in all the examples.  But this logic is backwards -
      if our examples are truly meant to be stand-alone, they should
      NOT depend on how libvirt was configured, and should NOT
      depend on the gnulib fixes for system quirks.  In particular,
      if an example does not need to link against libgnulib.la,
      then it also does not need to use -Ignulib in its compile
      flags, and likewise does not need to include <config.h> since
      none of the gnulib wrapper headers should be interfering.
      
      So, revert (most of) b6f78259 (except for the bogus pre-patch
      use of "config.h" in admin/logging.c: if config.h is included,
      it should be via <> rather than "", and must be before any
      system headers); then additionally nuke all mention of
      <config.h>, -Ignulib, and -llibgnu.la, making all of the
      examples truly standalone.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Acked-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      acf522e8
    • E
      examples: Drop event-test.c dependency on gnulib <verify.h> · 6933ebc4
      Eric Blake 提交于
      Pulling in gnulib just for the <verify.h> header is rather
      expensive, especially since that header does not require us
      to link against gnulib.  It's better to make the event-test
      example be standalone by just open-coding a more limited form
      of a verify() macro that depends on modern gcc (we have enough
      CI coverage that even though the verify is now a no-op in
      older setups, we will still notice if we fail to add an event
      - as a quick test, I was still able to provoke a compile
      failure on Fedora 29 when deleting a line from domainEvents).
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Acked-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      6933ebc4
    • E
      maint: Prefer AM_CPPFLAGS over INCLUDES · 1862a554
      Eric Blake 提交于
      Our use of INCLUDES in Makefile.am hearkens back to when we had to
      cater to automake 1.9.6 (thanks, RHEL 5) which lacked AM_CPPFLAGS.
      Modern Automake flags a warning that INCLUDES is deprecated, and
      now that we mandate RHEL 7 or better (see commit c1bc9c66), we no
      longer have to cater to the old spelling.  This change will also
      make it easier to do per-binary CPPFLAGS.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      1862a554
  2. 07 1月, 2019 2 次提交
  3. 03 1月, 2019 1 次提交
  4. 14 12月, 2018 1 次提交
    • D
      Remove all Author(s): lines from source file headers · 60046283
      Daniel P. Berrangé 提交于
      In many files there are header comments that contain an Author:
      statement, supposedly reflecting who originally wrote the code.
      In a large collaborative project like libvirt, any non-trivial
      file will have been modified by a large number of different
      contributors. IOW, the Author: comments are quickly out of date,
      omitting people who have made significant contribitions.
      
      In some places Author: lines have been added despite the person
      merely being responsible for creating the file by moving existing
      code out of another file. IOW, the Author: lines give an incorrect
      record of authorship.
      
      With this all in mind, the comments are useless as a means to identify
      who to talk to about code in a particular file. Contributors will always
      be better off using 'git log' and 'git blame' if they need to  find the
      author of a particular bit of code.
      
      This commit thus deletes all Author: comments from the source and adds
      a rule to prevent them reappearing.
      
      The Copyright headers are similarly misleading and inaccurate, however,
      we cannot delete these as they have legal meaning, despite being largely
      inaccurate. In addition only the copyright holder is permitted to change
      their respective copyright statement.
      Reviewed-by: NErik Skultety <eskultet@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      60046283
  5. 14 11月, 2018 2 次提交
  6. 27 8月, 2018 1 次提交
  7. 16 8月, 2018 4 次提交
  8. 27 7月, 2018 1 次提交
    • M
      Forget last daemon/ dir artefacts · cfdc0c77
      Michal Privoznik 提交于
      The most important part is LIBVIRTD_PATH env var fix. It is used
      in virFileFindResourceFull() from tests. The libvirtd no longer
      lives under daemon/.
      
      Then, libvirtd-fail test was still failing (as expected) but not
      because of missing config file but because it was trying to
      execute (nonexistent) top_builddir/daemon/libvirtd which
      fulfilled expected outcome and thus test did not fail.
      
      Thirdly, lcov was told to generate coverage for daemon/ dir too.
      
      Fourthly, our compiling documentation was still suggesting to run
      daemonn/libvirtd.
      
      And finally, some comments in a systemtap file and a probes file
      were still referring to daemon/libvirtd.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      cfdc0c77
  9. 18 7月, 2018 1 次提交
  10. 09 7月, 2018 1 次提交
  11. 04 7月, 2018 1 次提交
  12. 28 6月, 2018 1 次提交
  13. 12 6月, 2018 2 次提交
  14. 12 4月, 2018 2 次提交
  15. 09 3月, 2018 1 次提交
  16. 07 2月, 2018 1 次提交
  17. 17 1月, 2018 1 次提交
    • I
      On startup libvirtd runs a number of QEMU processes unconfined such as: · 904cdd09
      intrigeri 提交于
        /usr/bin/qemu-system-x86_64 -S -no-user-config -nodefaults -nographic -machine none,accel=kvm:tcg -qmp unix:/var/lib/libvirt/qemu/capabilities.monitor.sock,server,nowait -pidfile /var/lib/libvirt/qemu/capabilities.pidfile -daemonize
      
      libvirtd needs to be allowed to kill these processes, otherwise they
      remain running.
      904cdd09
  18. 09 1月, 2018 7 次提交
  19. 04 1月, 2018 1 次提交
  20. 03 1月, 2018 1 次提交
    • C
      apparmor: allow unix stream for p2p migrations · 8f882cf3
      Christian Ehrhardt 提交于
      On live migration with --p2p like:
       $ virsh migrate --live --p2p kvmguest-bionic-normal \
             qemu+ssh://10.6.221.80/system
      
      We hit an apparmor deny like:
        apparmor="DENIED" operation="file_inherit"
        profile="/usr/sbin/libvirtd" pid=23477 comm="ssh" family="unix"
        sock_type="stream" protocol=0 requested_mask="send receive"
        denied_mask="send" addr=none peer_addr=none peer="unconfined"
      
      The rule is not perfect, but can't be restricted further at the moment
      (new upstream kernel features needed). For now the lack of a profile on the
      peer as well as comm not being a conditional on rules do not allow to filter
      further.
      Signed-off-by: NChristian Ehrhardt <christian.ehrhardt@canonical.com>
      8f882cf3
  21. 20 12月, 2017 1 次提交
    • C
      virt-aa-helper: handle more disk images · 0f33025a
      Cédric Bosdonnat 提交于
      virt-aa-helper needs read access to the disk image to resolve symlinks
      and add the proper rules to the profile. Its profile whitelists a few
      common paths, but users can place their images anywhere.
      
      This commit helps users allowing access to their images by adding their
      own rules in apparmor.d/local/usr.lib.libvirt.virt-aa-helper.
      
      This commit also adds rules to allow reading files named:
        - *.raw as this is a rather common disk image extension
        - /run/libvirt/**[vd]d[a-z] as these are used by virt-sandbox
      0f33025a
  22. 04 12月, 2017 1 次提交
    • J
      apparmor: allow qemu abstraction to read /proc/pid/cmdline · 0af5ced4
      Jim Fehlig 提交于
      Noticed the following denial in audit.log when shutting down
      an apparmor confined domain
      
      type=AVC msg=audit(1512002299.742:131): apparmor="DENIED"
      operation="open" profile="libvirt-66154842-e926-4f92-92f0-1c1bf61dd1ff"
      name="/proc/1475/cmdline" pid=2958 comm="qemu-system-x86"
      requested_mask="r" denied_mask="r" fsuid=469 ouid=0
      
      Squelch the denial by allowing read access to /proc/<pid>/cmdline.
      0af5ced4
  23. 20 11月, 2017 2 次提交
  24. 07 11月, 2017 1 次提交