1. 12 11月, 2019 1 次提交
  2. 25 10月, 2019 1 次提交
  3. 16 10月, 2019 1 次提交
  4. 15 10月, 2019 1 次提交
  5. 27 8月, 2019 1 次提交
  6. 10 4月, 2019 2 次提交
  7. 07 8月, 2018 1 次提交
  8. 04 7月, 2018 1 次提交
    • B
      util:Fix with process number and pid file do not match · d6cfa0cd
      Bobo Du 提交于
      the libvirtd pid file is not match the os process pid number
      which is smaller than before.
      
      this would be exist if the libvirtd process coredump or the os
      process was killed which the next pid number is smaller.
      
      you can be also edit the pid file to write the longer number than
      before,then restart the libvirtd service.
      Signed-off-by: NBobo Du <dubo163@126.com>
      d6cfa0cd
  9. 10 6月, 2015 1 次提交
  10. 15 4月, 2015 1 次提交
  11. 04 11月, 2014 1 次提交
  12. 03 11月, 2014 1 次提交
  13. 15 9月, 2014 3 次提交
  14. 25 3月, 2014 1 次提交
  15. 18 3月, 2014 2 次提交
  16. 02 5月, 2013 1 次提交
    • M
      virutil: Move string related functions to virstring.c · 7c9a2d88
      Michal Privoznik 提交于
      The source code base needs to be adapted as well. Some files
      include virutil.h just for the string related functions (here,
      the include is substituted to match the new file), some include
      virutil.h without any need (here, the include is removed), and
      some require both.
      7c9a2d88
  17. 21 12月, 2012 4 次提交
  18. 01 11月, 2012 1 次提交
  19. 31 10月, 2012 1 次提交
    • L
      util: do a better job of matching up pids with their binaries · 7bafe009
      Laine Stump 提交于
      This patch resolves: https://bugzilla.redhat.com/show_bug.cgi?id=871201
      
      If libvirt is restarted after updating the dnsmasq or radvd packages,
      a subsequent "virsh net-destroy" will fail to kill the dnsmasq/radvd
      process.
      
      The problem is that when libvirtd restarts, it re-reads the dnsmasq
      and radvd pidfiles, then does a sanity check on each pid it finds,
      including checking that the symbolic link in /proc/$pid/exe actually
      points to the same file as the path used by libvirt to execute the
      binary in the first place. If this fails, libvirt assumes that the
      process is no longer alive.
      
      But if the original binary has been replaced, the link in /proc is set
      to "$binarypath (deleted)" (it literally has the string " (deleted)"
      appended to the link text stored in the filesystem), so even if a new
      binary exists in the same location, attempts to resolve the link will
      fail.
      
      In the end, not only is the old dnsmasq/radvd not terminated when the
      network is stopped, but a new dnsmasq can't be started when the
      network is later restarted (because the original process is still
      listening on the ports that the new process wants).
      
      The solution is, when the initial "use stat to check for identical
      inodes" check for identity between /proc/$pid/exe and $binpath fails,
      to check /proc/$pid/exe for a link ending with " (deleted)" and if so,
      truncate that part of the link and compare what's left with the
      original binarypath.
      
      A twist to this problem is that on systems with "merged" /sbin and
      /usr/sbin (i.e. /sbin is really just a symlink to /usr/sbin; Fedora
      17+ is an example of this), libvirt may have started the process using
      one path, but /proc/$pid/exe lists a different path (indeed, on F17
      this is the case - libvirtd uses /sbin/dnsmasq, but /proc/$pid/exe
      shows "/usr/sbin/dnsmasq"). The further bit of code to resolve this is
      to call virFileResolveAllLinks() on both the original binarypath and
      on the truncated link we read from /proc/$pid/exe, and compare the
      results.
      
      The resulting code still succeeds in all the same cases it did before,
      but also succeeds if the binary was deleted or replaced after it was
      started.
      7bafe009
  20. 12 10月, 2012 1 次提交
  21. 21 9月, 2012 1 次提交
  22. 23 7月, 2012 1 次提交
    • O
      Desert the FSF address in copyright · f9ce7dad
      Osier Yang 提交于
      Per the FSF address could be changed from time to time, and GNU
      recommends the following now: (http://www.gnu.org/licenses/gpl-howto.html)
      
        You should have received a copy of the GNU General Public License
        along with Foobar.  If not, see <http://www.gnu.org/licenses/>.
      
      This patch removes the explicit FSF address, and uses above instead
      (of course, with inserting 'Lesser' before 'General').
      
      Except a bunch of files for security driver, all others are changed
      automatically, the copyright for securify files are not complete,
      that's why to do it manually:
      
        src/security/security_selinux.h
        src/security/security_driver.h
        src/security/security_selinux.c
        src/security/security_apparmor.h
        src/security/security_apparmor.c
        src/security/security_driver.c
      f9ce7dad
  23. 03 5月, 2012 2 次提交
  24. 30 3月, 2012 1 次提交
  25. 27 2月, 2012 1 次提交
    • P
      pidfile: Make checking binary path in virPidFileRead optional · 3e0623eb
      Peter Krempa 提交于
      This patch changes behavior of virPidFileRead to enable passing NULL as
      path to the binary the pid file should be checked against to skip this
      check. This enables using this function for reading files that have same
      semantics as pid files, but belong to unknown processes.
      3e0623eb
  26. 13 2月, 2012 1 次提交
  27. 11 2月, 2012 1 次提交
  28. 27 9月, 2011 1 次提交
  29. 18 8月, 2011 1 次提交
    • E
      build: fix virpidfile on mingw · c811de8f
      Eric Blake 提交于
      Regression introduced in commit b7e5ca48.
      
      Mingw lacks kill(), but we were only using it for a sanity check;
      so we can go with one less check.
      
      Also, on OOM error, this function should outright fail rather than
      claim that the pid file was successfully read.
      
      * src/util/virpidfile.c (virPidFileReadPathIfAlive): Skip kill
      call where unsupported, and report error on OOM.
      c811de8f
  30. 17 8月, 2011 1 次提交
    • S
      maint: fix some compilation issues on non-linux platforms (part 2) · 57c7b40b
      Stefan Berger 提交于
      Get rid of the #if __linux__ check in virPidFileReadPathIfAlive that
      was preventing a check of a symbolic link in /proc/<pid>/exe on
      non-linux platforms against an expected executable. Replace
      this with a run-time check testing whether the /proc/<pid>/exe is a
      symbolic link and if so call the function doing the comparison
      against the expected file the link is supposed to point to.
      57c7b40b
  31. 13 8月, 2011 2 次提交
    • E
      build: fix recent build failures · be427e8b
      Eric Blake 提交于
      With gcc 4.5.1:
      
      util/virpidfile.c: In function 'virPidFileAcquirePath':
      util/virpidfile.c:308:66: error: nested extern declaration of '_gl_verify_function2' [-Wnested-externs]
      
      Then in tests/commandtest.c, the new virPidFile APIs need to be used.
      
      * src/util/virpidfile.c (virPidFileAcquirePath): Move verify to
      top level.
      * tests/commandtest.c: Use new pid APIs.
      be427e8b
    • D
      Add some APIs which use locking for crashsafe pidfile handling · e1da464d
      Daniel P. Berrange 提交于
      In daemons using pidfiles to protect against concurrent
      execution there is a possibility that a crash may leave a stale
      pidfile on disk, which then prevents later restart of the daemon.
      
      To avoid this problem, introduce a pair of APIs which make
      use of virFileLock to ensure crash-safe & race condition-safe
      pidfile acquisition & releae
      
      * src/libvirt_private.syms, src/util/virpidfile.c,
        src/util/virpidfile.h: Add virPidFileAcquire and virPidFileRelease
      e1da464d