Skip to content

Commit

Permalink
qga: add ssh-{add,remove}-authorized-keys
Browse files Browse the repository at this point in the history
Add new commands to add and remove SSH public keys from
~/.ssh/authorized_keys.

I took a different approach for testing, including the unit tests right
with the code. I wanted to overwrite the function to get the user
details, I couldn't easily do that over QMP. Furthermore, I prefer
having unit tests very close to the code, and unit files that are domain
specific (commands-posix is too crowded already). FWIW, that
coding/testing style is Rust-style (where tests can or should even be
part of the documentation!).

Fixes:
https://bugzilla.redhat.com/show_bug.cgi?id=1885332

Signed-off-by: Marc-André Lureau <[email protected]>
Reviewed-by: Michal Privoznik <[email protected]>
Reviewed-by: Daniel P. Berrangé <[email protected]>
*squashed in fix-ups for setting file ownership and use of QAPI
 conditionals for CONFIG_POSIX instead of stub definitions
*disable qga-ssh-test for now due to G_TEST_OPTION_ISOLATE_DIRS
 triggering leak detector in build-oss-fuzz
*fix disallowed g_assert* usage reported by checkpatch
Signed-off-by: Michael Roth <[email protected]>
  • Loading branch information
elmarco authored and mdroth committed Nov 3, 2020
1 parent 6d593ab commit 8d769ec
Show file tree
Hide file tree
Showing 3 changed files with 466 additions and 1 deletion.
Loading

0 comments on commit 8d769ec

Please sign in to comment.