- Oct 18, 2023
-
-
Paolo Bonzini authored
Preserve the functionality of the environment variables, but allow using the command line instead. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Oct 11, 2023
-
-
Daniel Xu authored
If output is being captured for a guest-exec invocation, the out-data and err-data fields of guest-exec-status are only populated after the process is reaped. This is somewhat counter intuitive and too late to change. Thus, it would be good to document the behavior. Signed-off-by:
Daniel Xu <dxu@dxuuu.xyz> Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com>
-
Daniel Xu authored
If capture-output is requested but one of the channels goes unused (eg. we attempt to capture stderr but the command never writes to stderr), we can leak memory. guest_exec_output_watch() is (from what I understand) unconditionally called for both streams if output capture is requested. The first call will always pass the `p->size == p->length` check b/c both values are 0. Then GUEST_EXEC_IO_SIZE bytes will be allocated for the stream. But when we reap the exited process there's a `gei->err.length > 0` check to actually free the buffer. Which does not get run if the command doesn't write to the stream. Fix by making free() unconditional. Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Signed-off-by:
Daniel Xu <dxu@dxuuu.xyz> Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com>
-
Akihiko Odaki authored
GUID_DEVINTERFACE_DISK and GUID_DEVINTERFACE_STORAGEPORT are already defined by MinGW-w64. They are not only unnecessary, but can lead to duplicate definition errors at link time with some unknown condition. Signed-off-by:
Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com>
-
- Sep 08, 2023
-
-
Michael Tokarev authored
Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru> Reviewed-by:
Eric Blake <eblake@redhat.com>
-
- Sep 07, 2023
-
-
Paolo Bonzini authored
Stop applying config-host.mak to the sourcesets, since it does not have any more CONFIG_* symbols coming from the command line. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Jul 10, 2023
-
-
Konstantin Kostiuk authored
Add several qga_debug() statements in functions. Reviewed-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com>
-
Konstantin Kostiuk authored
Reviewed-by:
Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com>
-
Konstantin Kostiuk authored
Reviewed-by:
Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com>
-
Konstantin Kostiuk authored
Reviewed-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com>
-
Konstantin Kostiuk authored
The allow-rpcs option accepts a comma-separated list of RPCs to enable. This option is opposite to --block-rpcs. Using --block-rpcs and --allow-rpcs at the same time is not allowed. resolves: https://gitlab.com/qemu-project/qemu/-/issues/1505 Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com>
-
Konstantin Kostiuk authored
Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com>
-
- Jul 07, 2023
-
-
Thomas Huth authored
We are not mixing C++ with C code anymore, the only remaining C++ code in qga/vss-win32/ is used for a plain C++ executable. Thus we can remove the hacks for linking C code with the C++ linker now to simplify meson.build a little bit, and also to avoid that some C++ code sneaks in by accident again. Signed-off-by:
Thomas Huth <thuth@redhat.com> Message-ID: <20230706064736.178962-1-thuth@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Jun 09, 2023
-
-
Michael Tokarev authored
3 trivial fixes: 2 .json comments which goes to executables, and 1 .h file comment. Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru>
-
- May 25, 2023
-
-
Paolo Bonzini authored
The bindir variable is not available in the "glib" variable, which is an internal dependency (created with "declare_dependency"). Use glib_pc instead, which contains the variable as it is instantiated from glib-2.0.pc. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- May 18, 2023
-
-
Paolo Bonzini authored
The option is new in Meson 0.63 and removes the need to pass "static: true" to all dependency and find_library invocation. Actually cleaning up the invocations is left for a separate patch. Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- May 10, 2023
-
-
Markus Armbruster authored
Change # @name: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed # do eiusmod tempor incididunt ut labore et dolore magna aliqua. to # @name: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed # do eiusmod tempor incididunt ut labore et dolore magna aliqua. See recent commit "qapi: Relax doc string @name: description indentation rules" for rationale. Reflow paragraphs to 70 columns width, and consistently use two spaces to separate sentences. To check the generated documentation does not change, I compared the generated HTML before and after this commit with "wdiff -3". Finds no differences. Comparing with diff is not useful, as the reflown paragraphs are visible there. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20230428105429.1687850-17-armbru@redhat.com> Reviewed-by:
Juan Quintela <quintela@redhat.com>
-
- May 04, 2023
-
-
Mark Somerville authored
Allow the Linux guest agent to attempt each of the suspend methods (systemctl, pm-* and writing to /sys) in turn. Prior to this guests without systemd failed to suspend due to `guest_suspend` returning early regardless of the return value of `systemd_supports_mode`. Signed-off-by:
Mark Somerville <mark@qpok.net> Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com>
-
Thomas Huth authored
All current versions of glib require _WIN32_WINNT set to 0x0601 or higher already, and we also use this value as a minimum in our osdep.h header file, so there is no way to still compile this code with an older version of the Windows ABI. Thus we can drop this check now. Signed-off-by:
Thomas Huth <thuth@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com>
-
Daniel Xu authored
Currently, any captured output (via `capture-output`) is segregated into separate GuestExecStatus fields (`out-data` and `err-data`). This means that downstream consumers have no way to reassemble the captured data back into the original stream. This is relevant for chatty and semi-interactive (ie. read only) CLI tools. Such tools may deliberately interleave stdout and stderr for visual effect. If segregated, the output becomes harder to visually understand. This commit adds a new enum variant to the GuestExecCaptureOutputMode qapi to merge the output streams such that consumers can have a pristine view of the original command output. Signed-off-by:
Daniel Xu <dxu@dxuuu.xyz> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com>
-
Daniel Xu authored
Previously capture-output was an optional boolean flag that either captured all output or captured none. While this is OK in most cases, it lacks flexibility for more advanced capture cases, such as wanting to only capture stdout. This commits refactors guest-exec qapi to take an enum for capture mode instead while preserving backwards compatibility. Suggested-by:
Daniel P. Berrangé <berrange@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Signed-off-by:
Daniel Xu <dxu@dxuuu.xyz> Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com>
-
Kfir Manor authored
Signed-off-by:
Kfir Manor <kfir@daynix.com> Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com>
-
- Apr 28, 2023
-
-
Markus Armbruster authored
GuestDiskStatsInfo's member documentation is parsed as ordinary text due to missing colons. The generated documentation shows these members as "Not documented". The fix is obvious: add the missing colons. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20230425064223.820979-12-armbru@redhat.com>
-
Markus Armbruster authored
Code returns a list of GuestNetworkInterface, documentation claims GuestNetworkInfo, which doesn't exist. Fix the documentation. Fixes: 3424fc9f (qemu-ga: add guest-network-get-interfaces command) Signed-off-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20230425064223.820979-3-armbru@redhat.com>
-
Markus Armbruster authored
Delete "error state indicates", because it doesn't make sense. I suspect it was an accident. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Reviewed-by:
Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20230425064223.820979-2-armbru@redhat.com>
-
- Mar 22, 2023
-
-
Pierrick Bouvier authored
Reported when compiling with clang-windows-arm64. ../qga/vss-win32/install.cpp:537:9: error: variable 'hr' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] if (!(ControlService(service, SERVICE_CONTROL_STOP, NULL))) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../qga/vss-win32/install.cpp:545:12: note: uninitialized use occurs here return hr; ^~ Signed-off-by:
Pierrick Bouvier <pierrick.bouvier@linaro.org> Fixes: 917ebcb1 ("qga-win: Fix QGA VSS Provider service stop failure") Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by:
Kostiantyn Kostiuk <kostyanf14@live.com>
-
- Mar 08, 2023
-
-
Kfir Manor authored
Change requester_freeze so that the VSS backup type queried from the registry Signed-off-by:
Kfir Manor <kfir@daynix.com> Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com>
-
Kfir Manor authored
Query VSS backup type number (DWORD) from QEMU Guest Agent VSS Provider registry key registry value VssOption Translate the VSS backup type number (DWORD) into its VSS backup type (VSS_BACKUP_TYPE) Returns the queried VSS backup type if the program encounters unexpected behaviors or values return default VSS backup type VSS_BT_FULL instead Signed-off-by:
Kfir Manor <kfir@daynix.com> Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com>
-
Kfir Manor authored
Adds registry value VssOption with value 1 to QEMU Guest Agent VSS Provider service registry key Signed-off-by:
Kfir Manor <kfir@daynix.com> Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com>
-
Konstantin Kostiuk authored
The custom action uses cmd.exe to run VSS Service installation and removal which causes an interactive command shell to spawn. This shell can be used to execute any commands as a SYSTEM user. Even if call qemu-ga.exe directly the interactive command shell will be spawned as qemu-ga.exe is a console application and used by users from the console as well as a service. As VSS Service runs from DLL which contains the installer and uninstaller code, it can be run directly by rundll32.exe without any interactive command shell. Add specific entry points for rundll which is just a wrapper for COMRegister/COMUnregister functions with proper arguments. resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2167423 fixes: CVE-2023-0664 (part 2 of 2) Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Reviewed-by:
Yan Vugenfirer <yvugenfi@redhat.com> Reported-by:
Brian Wiltse <brian.wiltse@live.com>
-
Konstantin Kostiuk authored
Remove the 'change' button from "Programs and Features" because it does not checks if a user is an admin or not. The installer has no components to choose from and always installs everything. So the 'change' button is not obviously needed but can create a security issue. resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2167423 fixes: CVE-2023-0664 (part 1 of 2) Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Reviewed-by:
Yan Vugenfirer <yvugenfi@redhat.com> Reported-by:
Brian Wiltse <brian.wiltse@live.com>
-
- Feb 23, 2023
-
-
Markus Armbruster authored
slog()'s function comment advises to use QERR_QGA_LOGGING_DISABLED. This macro never existed. The reference got added in commit e3d4d252 "guest agent: add guest agent RPCs/commands" along with QERR_QGA_LOGGING_FAILED, so maybe that one was meant. However, QERR_QGA_LOGGING_FAILED was never actually used, and was removed in commit d73f0bea "qerror.h: Remove unused error classes". Drop the dangling reference. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20230207075115.1525-9-armbru@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by:
Juan Quintela <quintela@redhat.com> Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com>
-
Markus Armbruster authored
Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20230207075115.1525-2-armbru@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by:
Juan Quintela <quintela@redhat.com> Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com>
-
- Feb 08, 2023
-
-
Markus Armbruster authored
This commit was created with scripts/clean-includes. All .c should include qemu/osdep.h first. The script performs three related cleanups: * Ensure .c files include qemu/osdep.h first. * Including it in a .h is redundant, since the .c already includes it. Drop such inclusions. * Likewise, including headers qemu/osdep.h includes is redundant. Drop these, too. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Message-Id: <20230202133830.2152150-11-armbru@redhat.com>
-
- Jan 09, 2023
-
-
Nikita Ivanov authored
There is a defined RETRY_ON_EINTR() macro in qemu/osdep.h which handles the same while loop. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/415 Signed-off-by:
Nikita Ivanov <nivanov@cloudlinux.com> Message-Id: <20221023090422.242617-3-nivanov@cloudlinux.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> [thuth: Dropped the hunk that changed socket_accept() in libqtest.c] Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
- Dec 20, 2022
-
-
Andrey Drobyshev authored
According to GLib changelog [1], since version 2.73.2 GLib is using libpcre2 instead of libpcre. As a result, qemu-ga MSI installation fails due to missing DLL when linked with the newer GLib. This commit makes wixl to put the right libpcre version into the MSI bundle: either libpcre-1.dll or libpcre2-8-0.dll, depending on the present version of GLib. [1] https://gitlab.gnome.org/GNOME/glib/-/releases#2.73.2 Previous version: https://lists.nongnu.org/archive/html/qemu-trivial/2022-11/msg00237.html Signed-off-by:
Andrey Drobyshev <andrey.drobyshev@virtuozzo.com> Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Tested-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com>
-
Andrey Drobyshev authored
This patch translates GLib-specific log levels to system ones, so that they may be used by both *nix syslog() (as a "priority" argument) and Windows ReportEvent() (as a "wType" argument). Currently the only codepath to write to "syslog" domain is slog() function. However, this patch allows the interface to be extended. Note that since slog() is using G_LOG_LEVEL_INFO level, its behaviour doesn't change. Originally-by:
Yuri Pudgorodskiy <yur@virtuozzo.com> Signed-off-by:
Andrey Drobyshev <andrey.drobyshev@virtuozzo.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Tested-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com>
-
Andrey Drobyshev authored
This commit allows QGA to write to Windows event log using Win32 API's ReportEvent() [1], much like syslog() under *nix guests. In order to generate log message definitions we use a very basic message text file [2], so that every QGA's message gets ID 1. The tools "windmc" and "windres" respectively are used to generate ".rc" file and COFF object file, and then the COFF file is linked into qemu-ga.exe. [1] https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-reporteventa [2] https://learn.microsoft.com/en-us/windows/win32/eventlog/message-text-files Originally-by:
Yuri Pudgorodskiy <yur@virtuozzo.com> Signed-off-by:
Andrey Drobyshev <andrey.drobyshev@virtuozzo.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Tested-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com>
-
Brad Smith authored
qga: Add initial OpenBSD and NetBSD support Signed-off-by:
Brad Smith <brad@comstyle.com> Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com>
-
Kfir Manor authored
Skip getting PCI info from disks type USB and give them an empty PCI address instead. Signed-off-by:
Kfir Manor <kfir@daynix.com> Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com>
-