[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 0/2] Implement SSH commands in QEMU GA for Windows
From: |
aidan_leuck |
Subject: |
[PATCH v3 0/2] Implement SSH commands in QEMU GA for Windows |
Date: |
Fri, 22 Mar 2024 11:46:35 -0600 |
From: Aidan Leuck <aidan_leuck@selinc.com>
This patch aims to implement guest-ssh-add-authorized-keys,
guest-ssh-remove-authorized-keys, and guest-ssh-get-authorized-keys
for Windows. This PR is based on Microsoft's OpenSSH implementation
https://github.com/PowerShell/Win32-OpenSSH. The guest agents
will support Kubevirt and allow guest agent propagation to be used to
dynamically inject SSH keys.
https://kubevirt.io/user-guide/virtual_machines/accessing_virtual_machines/#dynamic-ssh-public-key-injection-via-qemu-guest-agent
Changes since v2
* Set indent to 4 spaces
* Moved all comments to C style comments
* Fixed a segfault bug in get_user_info function related to non zeroed memory
when a user did not exist.
* Used g_new0 instead of g_malloc where applicable
* Modified newlines in qapi-schema.json
* Added newlines at the end of all files
* GError functions now use g_autoptr instead of being freed manually.
* Refactored get_ssh_folder to remove goto error statement
* Fixed uninitialized variable pgDataW
* Modified patch order so that the generalization patch is the first patch
* Removed unnecssary ZeroMemory calls
Changes since v1
* Fixed styling errors
* Moved from wcstombs to g_utf functions
* Removed unnecessary if checks on calls to free
* Fixed copyright headers
* Refactored create_acl functions into base function, admin function and user
function
* Removed unused user count function
* Split up refactor of existing code into a separate patch
Aidan Leuck (2):
Refactor common functions between POSIX and Windows implementation
Implement SSH commands in QEMU GA for Windows
qga/commands-posix-ssh.c | 47 +--
qga/commands-ssh-core.c | 57 +++
qga/commands-ssh-core.h | 8 +
qga/commands-windows-ssh.c | 791 +++++++++++++++++++++++++++++++++++++
qga/commands-windows-ssh.h | 26 ++
qga/meson.build | 6 +-
qga/qapi-schema.json | 17 +-
7 files changed, 895 insertions(+), 57 deletions(-)
create mode 100644 qga/commands-ssh-core.c
create mode 100644 qga/commands-ssh-core.h
create mode 100644 qga/commands-windows-ssh.c
create mode 100644 qga/commands-windows-ssh.h
--
2.44.0
- [PATCH v3 0/2] Implement SSH commands in QEMU GA for Windows,
aidan_leuck <=