1. 15 11月, 2016 1 次提交
    • P
      libssh_transport: add new libssh-based transport · 6917467c
      Pino Toscano 提交于
      Implement a new libssh transport, which uses libssh to communicate with
      remote hosts, and add all the build system stuff (search of libssh,
      private symbols, etc) to built it.
      
      This new transport supports all the common ssh authentication methods,
      making use of libvirt's auth callbacks for interaction with the user.
      6917467c
  2. 11 11月, 2016 2 次提交
  3. 02 11月, 2016 2 次提交
  4. 05 10月, 2016 1 次提交
  5. 19 9月, 2016 1 次提交
  6. 14 9月, 2016 1 次提交
    • M
      configure: Check for major() more strictly · d53fa838
      Michal Privoznik 提交于
      Thing is, in f3f15cc2 I'm trying to adapt libvirt to the newest
      glibc where major()/minor()/makedev() are moved from sys/types.h
      to sys/sysmacros.h. However, my commit back then expect autoconf
      to be fixed too as we already use AC_HEADER_MAJOR to determine
      which header file the functions are in, but because the header
      files just trigger a warning and not a compile error, the
      autoconf macro detects the bad header file.
      
      This is just a workaround until autoconf macro is fixed.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      d53fa838
  7. 02 9月, 2016 1 次提交
  8. 02 8月, 2016 1 次提交
  9. 01 7月, 2016 1 次提交
  10. 17 6月, 2016 3 次提交
  11. 16 6月, 2016 1 次提交
  12. 14 6月, 2016 1 次提交
  13. 08 6月, 2016 2 次提交
    • D
      configure: allow setting default TLS priority string · cbb2e91e
      Daniel P. Berrange 提交于
      Currently libvirt calls gnutls_set_default_priority()
      which on old systems resolves to "NORMAL" while new
      systems it resolves to "@SYSTEM". Either way, this
      is a global default that is identical across all apps.
      
      We want to allow distros to flexibility to define a
      custom default string for libvirt priority, so add
      a --tls-priority=STRING  flag to configure to enable
      this to be set.
      
      It is expected that distros would use this when creating
      RPM/Deb/etc packages, according to their preferred crypto
      handling policies.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      cbb2e91e
    • D
      tls: remove support for gnutls 1.x.x, require 2.2.0 · d8a8af34
      Daniel P. Berrange 提交于
      We need to use the gnutls_priority_set_direct method which
      was not introduced until 2.1.7, so bump version to 2.2.0
      which is the first stable release with it included. This
      release dates from Dec 2007 so it is reasonable to ditch
      support for the 1.x.x series for gnutls releases entirely.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      d8a8af34
  14. 07 6月, 2016 1 次提交
  15. 06 6月, 2016 1 次提交
  16. 20 5月, 2016 2 次提交
    • M
      virtestmock: Mock stat() properly · 49c1a078
      Michal Privoznik 提交于
      There is a lot to explain, but I try to make it as short as
      possible. I'd start by pasting some parts of sys/stat.h:
      
      extern int stat (const char *__restrict __file,
      		 struct stat *__restrict __buf) __THROW __nonnull ((1, 2));
      
      extern int __REDIRECT_NTH (stat, (const char *__restrict __file,
      				  struct stat *__restrict __buf), stat64)
           __nonnull ((1, 2));
      
      __extern_inline int
      __NTH (stat (const char *__path, struct stat *__statbuf))
      {
        return __xstat (_STAT_VER, __path, __statbuf);
      }
      
      Only one of these is effective at once, due to some usage of
      the mess we are dealing with in here. So, basically, while
      compiling or linking stat() in our code can be transformed into
      some other func. Or a dragon.
      Now, if you read stat(2) manpage, esp. "C library/kernel
      differences" section, you'll learn that glibc uses some tricks
      for older applications to work. I haven't gotten around actual
      code that does this, but based on my observations, if 'stat'
      symbol is found, glibc assumes it's dealing with ancient
      application. Unfortunately, it can be just ours stat coming from
      our mock. Therefore, calling stat() from a test will end up in
      our mock. But since glibc is not exposing the symbol anymore, our
      call of real_stat() will SIGSEGV immediately as the pointer to
      function is NULL. Therefore, we should expose only those symbols
      we know glibc has.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      49c1a078
    • J
      util: Introduce encryption APIs · 1ce9c08a
      John Ferlan 提交于
      Introduce virCryptoHaveCipher and virCryptoEncryptData to handle
      performing encryption.
      
       virCryptoHaveCipher:
         Boolean function to determine whether the requested cipher algorithm
         is available. It's expected this API will be called prior to
         virCryptoEncryptdata. It will return true/false.
      
       virCryptoEncryptData:
         Based on the requested cipher type, call the specific encryption
         API to encrypt the data.
      
      Currently the only algorithm support is the AES 256 CBC encryption.
      
      Adjust tests for the API's
      1ce9c08a
  17. 11 5月, 2016 2 次提交
    • J
      storage: Fix virStorageBackendDiskDeleteVol for device mapper · 8cdff0b9
      John Ferlan 提交于
      Commit id 'df1011ca' modified virStorageBackendDiskDeleteVol to use
      "dmsetup remove --force" to remove the volume, but left things in an
      inconsistent state since the partition still existed on the disk and
      only the device mapper device (/dev/dm-#) was removed.
      
      Prior to commit '1895b421' (or '1ffd82bb' and '471e1c4e'), this could
      go unnoticed since virStorageBackendDiskRefreshPool wasn't called.
      However, the pool would be unusable since the /dev/dm-# device would
      be removed even though the partition was not removed unless a multipathd
      restart reset the link. That would of course make the volume appear again
      in the pool after a refresh or pool start after libvirt reload.
      
      This patch removes the 'dmsetup' logic and re-implements the partition
      deletion logic for device mapper devices. The removal of the partition
      via 'parted rm --script #' will cause udev device change logic to allow
      multipathd to handle removing the dm-* device associated with the partition.
      8cdff0b9
    • J
      libxl: switch to using libxl_domain_create_restore from v4.4 API · fccf2725
      Jim Fehlig 提交于
      In LIBXL_API_VERSION 0x040400, the libxl_domain_create_restore API
      gained a parameter for specifying restore parameters. Switch to
      using version 0x040400, which will be useful in a subsequent commit
      to specify the Xen migration stream version when restoring.
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      fccf2725
  18. 10 5月, 2016 1 次提交
  19. 02 5月, 2016 3 次提交
  20. 01 5月, 2016 1 次提交
  21. 21 4月, 2016 1 次提交
  22. 19 4月, 2016 1 次提交
  23. 16 4月, 2016 1 次提交
    • J
      libxl: use LIBXL_API_VERSION 0x040200 · e7440656
      Jim Fehlig 提交于
      To ensure the libvirt libxl driver will build with future versions
      of Xen where the libxl API may change in incompatible ways,
      explicitly use LIBXL_API_VERSION 0x040200. The libxl driver
      does use new libxl APIs that have been added since Xen 4.2, but
      currently it does not make use of any changes made to existing
      APIs such as libxl_domain_create_restore or libxl_set_vcpuaffinity.
      The version can be bumped if/when the libxl driver consumes the
      changed APIs.
      
      Further details can be found in the following discussion thread
      
      https://www.redhat.com/archives/libvir-list/2016-April/msg00178.htmlSigned-off-by: NJim Fehlig <jfehlig@suse.com>
      e7440656
  24. 15 4月, 2016 1 次提交
    • E
      makefile: Move include/Makefile.am to include/libvirt/Makefile.am · ab517a5c
      Erik Skultety 提交于
      The reason for this is to fix the automatic rebuild of libvirt-common.h.in.
      All *.in files should be automatically rebuilt each time they're modified.
      It works well for makefiles and pkgconfig files, since they do have a valid
      dependency in the top-level Makefile. However, with libvirt-common.h.in
      there is no dependency in the top-level Makefile and there's no need for it
      either, so this rule
      
      include/libvirt/libvirt-common.h: $(top_builddir)/config.status \
              $(top_srcdir)/include/libvirt/libvirt-common.h.in
          cd $(top_builddir) && $(SHELL) ./config.status $@
      
      is never hit and should be moved to include/Makefile, but that's automake's
      job. According to GNU automake docs:
      
      "Files created by AC_CONFIG_FILES, be they
      Automake Makefiles or not, are all removed by ‘make distclean’. Their inputs
      are automatically distributed, unless they are the output of prior
      AC_CONFIG_FILES commands. Finally, rebuild rules are generated in the Automake
      Makefile existing in the subdirectory of the output file, if there is one, or
      in the top-level Makefile otherwise."
      
      Which means that if we want to have the rule for libvirt-common.h automatically
      generated by automake, the include/Makefile.am needs to be moved into libvirt/
      subdirectory and $SUBDIRS in the top-level Makefile need to be adjusted as
      well. This patch moves Makefile.am from include/ to include/libvirt, adjusting
      the prefixes accordingly as well as updates the top-level Makefile $SUBDIRS to
      properly hint automake to generate all rules at proper places.
      
      Best way to see the changes, use -M with 'git show'.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      ab517a5c
  25. 13 4月, 2016 1 次提交
    • A
      configure: Make virt-host-validate optional · edebc166
      Andrea Bolognani 提交于
      virt-host-validate, just like virt-login-shell, doesn't make sense
      on Windows, so we should avoid building it.
      
      Make the tool optional and build it by default on all platforms
      except Windows, erroring out if the user attempts to build it
      anyway.
      edebc166
  26. 08 4月, 2016 1 次提交
    • A
      configure: Move check for <gnutls/crypto.h> · 6c209a90
      Andrea Bolognani 提交于
      Checking for the availability of this header, just like checking
      for the availability of gnutls_rnd(), requires CFLAGS and LIBS to
      be set appropriately.
      
      Fixes the following compilation errors on FreeBSD:
      
        qemu/qemu_domain.c:640:16: error: implicit declaration of function
         'gnutls_rnd' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
            if ((ret = gnutls_rnd(GNUTLS_RND_RANDOM, key, nbytes)) < 0) {
                       ^
        qemu/qemu_domain.c:640:27: error: use of undeclared identifier
         'GNUTLS_RND_RANDOM'; did you mean 'GNUTLS_CRD_ANON'?
            if ((ret = gnutls_rnd(GNUTLS_RND_RANDOM, key, nbytes)) < 0) {
                                  ^~~~~~~~~~~~~~~~~
                                  GNUTLS_CRD_ANON
      6c209a90
  27. 07 4月, 2016 3 次提交
    • A
      qemu: Explicitly check for gnutls_rnd() · 2d23d145
      Andrea Bolognani 提交于
      Our use of gnutls_rnd(), introduced with commit ad7520e8, is
      conditional to the availability of the <gnutls/crypto.h> header
      file.
      
      Such check, however, turns out not to be strict enough, as there
      are some versions of GnuTLS (eg. 2.8.5 from CentOS 6) that provide
      the header file, but not the function itself, which was introduced
      only in GnuTLS 2.12.0.
      
      Introduce an explicit check for the function.
      2d23d145
    • A
      configure: Always use old_CFLAGS and old_LIBS · a2e0e68c
      Andrea Bolognani 提交于
      The variables used for storing CFLAGS and LIBS before temporarily
      modifying them was consistent when it comes to the name, but not
      when it comes to the case.
      
      Make sure names are completely consistent.
      a2e0e68c
    • A
      configure: Restore CFLAGS properly after GnuTLS checks · bbb17237
      Andrea Bolognani 提交于
      The previous value of CFLAGS was saved as old_cflags but later
      restored from old_CFLAGS, which is clearly not correct.
      
      Restore CFLAGS from the right variable.
      bbb17237
  28. 06 4月, 2016 1 次提交
  29. 19 3月, 2016 1 次提交
    • M
      Initial support for NSS plugin skeleton · 859cb18d
      Michal Privoznik 提交于
      Name Service Switch is a glibc feature responsible for many
      things. Translating domain names into IP addresses and vice versa
      is just one of them. However, currently it's the only
      functionality that this commit is tickling. Well, in this commit
      the plugin skeleton is introduced. Implementation to come in next
      patches.
      Because of the future testing, where the implementation is to be
      linked with a test, this needs to go into static library. Linking
      a program with an .so statically is not portable. Therefore a
      dummy libnss_libvirt_impl library is being introduced too.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      859cb18d