qemu/qga
Daniel P. Berrangé 2e3b166c41 qga: centralize logic for disabling/enabling commands
It is confusing having many different pieces of code enabling and
disabling commands, and it is not clear that they all have the same
semantics, especially wrt prioritization of the block/allow lists.
The code attempted to prevent the user from setting both the block
and allow lists concurrently, however, the logic was flawed as it
checked settings in the configuration file  separately from the
command line arguments. Thus it was possible to set a block list
in the config file and an allow list via a command line argument.
The --dump-conf option also creates a configuration file with both
keys present, even if unset, which means it is creating a config
that cannot actually be loaded again.

Centralizing the code in a single method "ga_apply_command_filters"
will provide a strong guarantee of consistency and clarify the
intended behaviour. With this there is no compelling technical
reason to prevent concurrent setting of both the allow and block
lists, so this flawed restriction is removed.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Message-ID: <20240712132459.3974109-23-berrange@redhat.com>
Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
2024-07-19 11:50:35 +03:00
..
installer qga/win/installer: add VssOption to installer 2023-03-08 18:26:49 +02:00
vss-win32 qga/: spelling fixes 2023-09-08 13:08:52 +03:00
channel-posix.c qga/: spelling fixes 2023-09-08 13:08:52 +03:00
channel-win32.c qga: Add spaces around operator 2021-03-16 20:20:37 -05:00
channel.h qga: add systemd socket activation support 2017-03-06 00:54:18 -06:00
commands-bsd.c qga: conditionalize schema for commands requiring linux/win32 2024-07-19 11:50:35 +03:00
commands-common-ssh.c qga: Refactor common SSH functions 2024-05-01 10:35:45 +03:00
commands-common-ssh.h qga: Refactor common SSH functions 2024-05-01 10:35:45 +03:00
commands-common.h qga: move CONFIG_FSFREEZE/TRIM to be meson defined options 2024-07-19 11:50:35 +03:00
commands-linux.c qga: conditionalize schema for commands requiring libudev 2024-07-19 11:50:35 +03:00
commands-posix-ssh.c Remove glib compatibility code that is not required anymore 2024-05-14 12:46:39 +02:00
commands-posix.c qga: centralize logic for disabling/enabling commands 2024-07-19 11:50:35 +03:00
commands-win32.c qga: centralize logic for disabling/enabling commands 2024-07-19 11:50:35 +03:00
commands-windows-ssh.c qga: Implement SSH commands for Windows 2024-05-01 10:35:45 +03:00
commands-windows-ssh.h qga: Implement SSH commands for Windows 2024-05-01 10:35:45 +03:00
commands.c qga: Shorten several error messages 2024-05-27 12:59:10 +02:00
cutils.c qga: Clean up includes 2023-02-08 07:16:23 +01:00
cutils.h qga: Clean up includes 2023-02-08 07:16:23 +01:00
guest-agent-command-state.c qga: use local path for local headers 2018-06-01 19:20:38 +03:00
guest-agent-core.h qga: Replace 'blacklist' and 'whitelist' in the guest agent sources 2022-09-20 12:37:00 +02:00
main.c qga: centralize logic for disabling/enabling commands 2024-07-19 11:50:35 +03:00
meson.build qga: Implement SSH commands for Windows 2024-05-01 10:35:45 +03:00
messages-win32.mc qga-win: add logging to Windows event log 2022-12-20 15:54:41 +02:00
qapi-schema.json qga: conditionalize schema for commands not supported on other UNIX 2024-07-19 11:50:35 +03:00
service-win32.c qga: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
service-win32.h qga-win: changing --retry-path option behavior 2018-10-31 09:04:20 -05:00
vss-win32.c qga-win: add support for qmp_guest_fsfreeze_freeze_list 2018-10-30 16:48:49 -05:00
vss-win32.h qga-win: add support for qmp_guest_fsfreeze_freeze_list 2018-10-30 16:48:49 -05:00