1. 24 2月, 2014 6 次提交
  2. 18 2月, 2014 1 次提交
  3. 26 11月, 2013 1 次提交
  4. 23 11月, 2013 1 次提交
  5. 22 11月, 2013 1 次提交
    • S
      qga: Fix compiler warnings (missing format attribute, wrong format strings) · d607a523
      Stefan Weil 提交于
      gcc 4.8.2 reports this warning when extra warnings are enabled (-Wextra):
      
        CC    qga/commands.o
      qga/commands.c: In function ‘slog’:
      qga/commands.c:28:5: error:
       function might be possible candidate for ‘gnu_printf’ format attribute [-Werror=suggest-attribute=format]
           g_logv("syslog", G_LOG_LEVEL_INFO, fmt, ap);
           ^
      
      gcc 4.8.2 reports this warning when slog is declared with the
      gnu_printf format attribute:
      
      qga/commands-posix.c: In function ‘qmp_guest_file_open’:
      qga/commands-posix.c:404:5: warning:
       format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘int64_t’ [-Wformat=]
           slog("guest-file-open, handle: %d", handle);
           ^
      
      On 32 bit hosts there are three more warnings which are also fixed here.
      Signed-off-by: NStefan Weil <sw@weilnetz.de>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      d607a523
  6. 16 11月, 2013 1 次提交
    • W
      qga: Fix shutdown command of guest agent to work with SysV · 485e741c
      whitearchey 提交于
      For now guest agent uses following command to shutdown system:
      shutdown -P +0 "blabla"
      but this syntax works only with shutdown command from systemd or upstart,
      because SysV shutdown requires -h switch.
      
      Following patch changes the command so it works with systemd, upstart and SysV
      
      With upstart/systemd qga use one of thee commands, depending on 'mode' parameter:
        shutdown -P +0 "..."
        shutdown -H +0 "..."
        shutdown -r +0 "..."
      SysV equivalents for these are:
        shutdown -h -P +0 "..."
        shutdown -h -H +0 "..."
        shutdown -h -r +0 "..."
      and these retain their meaning with upstart/systemd.
      
      According to FreeBSD manpages, shutdown does not accept -P and -H options. Commands should be:
        shutdown -p +0 "..."
        shutdown -h +0 "..."
        shutdown -r +0 "..."
      
      shutdown in Solaris does not accept any of -hHpPr and does not accept time in "+0" format
      Signed-off-by: NMichael Avdienko <whitearchey@gmail.com>
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      485e741c
  7. 13 11月, 2013 1 次提交
    • S
      qga: Fix compilation for old versions of MinGW · ba1c2931
      Stefan Weil 提交于
      While MinGW-w64 can compile the qga code, MinGW from Debian lenny
      (gcc-mingw32 4.4.2-3) shows these errors:
      
      In file included from qga/vss-win32.c:17:
      qga/vss-win32/requester.h:31:
       error: expected »=«, »,«, »;«, »asm« or »__attribute__« before »requester_init«
      qga/vss-win32/requester.h:32:
       error: expected »=«, »,«, »;«, »asm« or »__attribute__« before »requester_deinit«
      
      The macro STDAPI is unknown, so add the missing include file which
      defines it.
      Signed-off-by: NStefan Weil <sw@weilnetz.de>
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      ba1c2931
  8. 11 10月, 2013 3 次提交
  9. 10 9月, 2013 3 次提交
    • T
      qemu-ga: Install Windows VSS provider on `qemu-ga -s install' · f311f2c2
      Tomoki Sekiyama 提交于
      Register QGA VSS provider library into Windows when qemu-ga is installed as
      Windows service ('-s install' option). It is deregistered when the service
      is uninstalled ('-s uninstall' option).
      Signed-off-by: NTomoki Sekiyama <tomoki.sekiyama@hds.com>
      Reviewed-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      f311f2c2
    • T
      qemu-ga: Call Windows VSS requester in fsfreeze command handler · 64c00317
      Tomoki Sekiyama 提交于
      Support guest-fsfreeze-freeze and guest-fsfreeze-thaw commands for Windows
      guests. When fsfreeze command is issued, it calls the VSS requester to
      freeze filesystems and applications. On thaw command, it again tells the VSS
      requester to thaw them.
      
      This also adds calling of initialize functions for the VSS requester.
      Signed-off-by: NTomoki Sekiyama <tomoki.sekiyama@hds.com>
      Reviewed-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      64c00317
    • T
      qemu-ga: Add Windows VSS provider and requester as DLL · b39297ae
      Tomoki Sekiyama 提交于
      Adds VSS provider and requester as a qga-vss.dll, which is loaded by
      Windows VSS service as well as by qemu-ga.
      
      "provider.cpp" implements a basic stub of a software VSS provider.
      Currently, this module only relays a frozen event from VSS service to the
      agent, and thaw event from the agent to VSS service, to block VSS process
      to keep the system frozen while snapshots are taken at the host.
      
      To register the provider to the guest system as COM+ application, the type
      library (.tlb) for qga-vss.dll is required. To build it from COM IDL (.idl),
      VisualC++, MIDL and stdole2.tlb in Windows SDK are required. This patch also
      adds pre-compiled .tlb file in the repository in order to enable
      cross-compile qemu-ga.exe for Windows with VSS support.
      
      "requester.cpp" provides the VSS requester to kick the VSS snapshot process.
      Qemu-ga.exe works without the DLL, although fsfreeze features are disabled.
      
      These functions are only supported in Windows 2003 or later. In older
      systems, fsfreeze features are disabled.
      
      In several versions of Windows which don't support attribute
      VSS_VOLSNAP_ATTR_NO_AUTORECOVERY, DoSnapshotSet fails with error
      VSS_E_OBJECT_NOT_FOUND. In this patch, we just ignore this error.
      To solve this fundamentally, we need a framework to handle mount writable
      snapshot on guests, which is required by VSS auto-recovery feature
      (cleanup phase after a snapshot is taken).
      Signed-off-by: NTomoki Sekiyama <tomoki.sekiyama@hds.com>
      Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      b39297ae
  10. 26 7月, 2013 3 次提交
  11. 31 5月, 2013 4 次提交
  12. 13 5月, 2013 2 次提交
  13. 12 5月, 2013 1 次提交
  14. 07 5月, 2013 1 次提交
    • L
      qga: set umask 0077 when daemonizing (CVE-2013-2007) · c689b4f1
      Laszlo Ersek 提交于
      The qemu guest agent creates a bunch of files with insecure permissions
      when started in daemon mode. For example:
      
        -rw-rw-rw- 1 root root /var/log/qemu-ga.log
        -rw-rw-rw- 1 root root /var/run/qga.state
        -rw-rw-rw- 1 root root /var/log/qga-fsfreeze-hook.log
      
      In addition, at least all files created with the "guest-file-open" QMP
      command, and all files created with shell output redirection (or
      otherwise) by utilities invoked by the fsfreeze hook script are affected.
      
      For now mask all file mode bits for "group" and "others" in
      become_daemon().
      
      Temporarily, for compatibility reasons, stick with the 0666 file-mode in
      case of files newly created by the "guest-file-open" QMP call. Do so
      without changing the umask temporarily.
      Signed-off-by: NLaszlo Ersek <lersek@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      c689b4f1
  15. 02 4月, 2013 5 次提交
  16. 22 3月, 2013 1 次提交
  17. 15 3月, 2013 1 次提交
  18. 12 3月, 2013 4 次提交