1. 23 7月, 2018 1 次提交
  2. 17 5月, 2018 1 次提交
  3. 12 5月, 2018 2 次提交
  4. 27 4月, 2018 1 次提交
  5. 09 4月, 2018 2 次提交
  6. 22 2月, 2018 2 次提交
  7. 12 2月, 2018 1 次提交
    • D
      log: fix deadlock obtaining hostname (related CVE-2018-6764) · c2dc6698
      Daniel P. Berrangé 提交于
      The fix for CVE-2018-6764 introduced a potential deadlock scenario
      that gets triggered by the NSS module when virGetHostname() calls
      getaddrinfo to resolve the hostname:
      
       #0  0x00007f6e714b57e7 in futex_wait
       #1  futex_wait_simple
       #2  __pthread_once_slow
       #3  0x00007f6e71d16e7d in virOnce
       #4  0x00007f6e71d0997c in virLogInitialize
       #5  0x00007f6e71d0a09a in virLogVMessage
       #6  0x00007f6e71d09ffd in virLogMessage
       #7  0x00007f6e71d0db22 in virObjectNew
       #8  0x00007f6e71d0dbf1 in virObjectLockableNew
       #9  0x00007f6e71d0d3e5 in virMacMapNew
       #10 0x00007f6e71cdc50a in findLease
       #11 0x00007f6e71cdcc56 in _nss_libvirt_gethostbyname4_r
       #12 0x00007f6e724631fc in gaih_inet
       #13 0x00007f6e72464697 in __GI_getaddrinfo
       #14 0x00007f6e71d19e81 in virGetHostnameImpl
       #15 0x00007f6e71d1a057 in virGetHostnameQuiet
       #16 0x00007f6e71d09936 in virLogOnceInit
       #17 0x00007f6e71d09952 in virLogOnce
       #18 0x00007f6e714b5829 in __pthread_once_slow
       #19 0x00007f6e71d16e7d in virOnce
       #20 0x00007f6e71d0997c in virLogInitialize
       #21 0x00007f6e71d0a09a in virLogVMessage
       #22 0x00007f6e71d09ffd in virLogMessage
       #23 0x00007f6e71d0db22 in virObjectNew
       #24 0x00007f6e71d0dbf1 in virObjectLockableNew
       #25 0x00007f6e71d0d3e5 in virMacMapNew
       #26 0x00007f6e71cdc50a in findLease
       #27 0x00007f6e71cdc839 in _nss_libvirt_gethostbyname3_r
       #28 0x00007f6e71cdc724 in _nss_libvirt_gethostbyname2_r
       #29 0x00007f6e7248f72f in __gethostbyname2_r
       #30 0x00007f6e7248f494 in gethostbyname2
       #31 0x000056348c30c36d in hosts_keys
       #32 0x000056348c30b7d2 in main
      
      Fortunately the extra stuff virGetHostname does is totally irrelevant to
      the needs of the logging code, so we can just inline a call to the
      native hostname() syscall directly.
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      c2dc6698
  8. 07 2月, 2018 2 次提交
  9. 03 11月, 2017 1 次提交
    • A
      Remove backslash alignment attempts · 3e7db8d3
      Andrea Bolognani 提交于
      Right-aligning backslashes when defining macros or using complex
      commands in Makefiles looks cute, but as soon as any changes is
      required to the code you end up with either distractingly broken
      alignment or unnecessarily big diffs where most of the changes
      are just pushing all backslashes a few characters to one side.
      
      Generated using
      
        $ git grep -El '[[:blank:]][[:blank:]]\\$' | \
          grep -E '*\.([chx]|am|mk)$$' | \
          while read f; do \
            sed -Ei 's/[[:blank:]]*[[:blank:]]\\$/ \\/g' "$f"; \
          done
      Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
      3e7db8d3
  10. 28 8月, 2017 1 次提交
    • E
      daemon: logging: Fix --verbose option being ignored by the daemon · b988f794
      Erik Skultety 提交于
      Commit 94c465d0 refactored the logging setup phase but introduced an
      issue, where the daemon ignores verbose mode when there are no outputs
      defined and the default must be used. The problem is that the default
      output was determined too early, thus ignoring the potential '--verbose'
      option taking effect. This patch postpones the creation of the default
      output to the very last moment when nothing else can change. Since the
      default output is only created during the init phase, it's safe to leave
      the pointer as NULL for a while, but it will be set eventually, thus not
      affecting runtime.
      Patch also adjusts both the other daemons.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1442947Signed-off-by: NErik Skultety <eskultet@redhat.com>
      b988f794
  11. 14 6月, 2017 1 次提交
  12. 31 3月, 2017 1 次提交
  13. 15 12月, 2016 2 次提交
    • E
      admin: Allow passing NULL to virLogSetOutputs · 0d6cf327
      Erik Skultety 提交于
      Along with an empty string, it should also be possible for users to pass
      NULL to the public APIs which in turn would trigger a routine(future
      work) responsible for defining an appropriate default logging output
      given the current circumstances.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      0d6cf327
    • E
      virlog: Introduce virLog{Get,Set}DefaultOutput · ae06048b
      Erik Skultety 提交于
      These helpers will manage the log destination defaults (fetch/set). The reason
      for this is to stay consistent with the current daemon's behaviour with respect
      to /etc/libvirt/<daemon>.conf file, since both assignment of an empty string
      or not setting the log output variable at all trigger the daemon's decision on
      the default log destination which depends on whether the daemon runs daemonized
      or not.
      This patch also changes the logic of the selection of the default
      logging output compared to how it is done now. The main difference though is
      that we should only really care if we're running daemonized or not, disregarding
      the fact of (not) having a TTY completely (introduced by commit eba36a38) as
      that should be of the libvirtd's parent concern (what FD it will pass to it).
      
       Before:
       if (godaemon || !hasTTY):
           if (journald):
               use journald
      
       if (godaemon):
           if (privileged):
               use SYSCONFIG/libvirtd.log
           else:
               use XDG_CONFIG_HOME/libvirtd.log
       else:
           use stderr
      
       After:
       if (godaemon):
           if (journald):
               use journald
      
           else:
               if (privileged):
                   use SYSCONFIG/libvirtd.log
               else:
                   use XDG_CONFIG_HOME/libvirtd.log
       else:
           use stderr
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      ae06048b
  14. 25 11月, 2016 1 次提交
    • M
      virstring: Unify string list function names · c2a5a4e7
      Michal Privoznik 提交于
      We have couple of functions that operate over NULL terminated
      lits of strings. However, our naming sucks:
      
      virStringJoin
      virStringFreeList
      virStringFreeListCount
      virStringArrayHasString
      virStringGetFirstWithPrefix
      
      We can do better:
      
      virStringListJoin
      virStringListFree
      virStringListFreeCount
      virStringListHasString
      virStringListGetFirstWithPrefix
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      c2a5a4e7
  15. 14 10月, 2016 1 次提交
  16. 11 10月, 2016 1 次提交
  17. 10 10月, 2016 19 次提交