include/glib-compat.h | 26 ++ qga/commands-posix-ssh.c | 516 +++++++++++++++++++++++++++++++++++++++ qga/meson.build | 34 ++- qga/qapi-schema.json | 67 +++++ 4 files changed, 636 insertions(+), 7 deletions(-) create mode 100644 qga/commands-posix-ssh.c
From: Marc-André Lureau <marcandre.lureau@redhat.com>
Hi
Add new commands to help modify a user .ssh/authorized_keys.
Although it's possible already to modify the authorized_keys files via
file-{read,write} or exec, the commands are often denied by default, and the
logic is left to the client. Let's add specific commands for this job.
Fixes:
https://bugzilla.redhat.com/show_bug.cgi?id=1885332
v3:
- add "qga: add ssh-get-authorized-keys" & "qga: add *reset argument to
ssh-add-authorized-keys" patches
- add some fixup! patches to be squashed after review, adding 'if'
- added the reviewed-by
- misc doc improvements
v2:
- misc doc improvements
- various warnings fixes
- fix build for !unix
- added reviewed-by
Marc-André Lureau (7):
glib-compat: add g_unix_get_passwd_entry_qemu()
qga: add ssh-{add,remove}-authorized-keys
fixup! qga: add ssh-{add,remove}-authorized-keys
fixup! qga: add ssh-{add,remove}-authorized-keys
qga: add *reset argument to ssh-add-authorized-keys
meson: minor simplification
qga: add ssh-get-authorized-keys
include/glib-compat.h | 26 ++
qga/commands-posix-ssh.c | 516 +++++++++++++++++++++++++++++++++++++++
qga/meson.build | 34 ++-
qga/qapi-schema.json | 67 +++++
4 files changed, 636 insertions(+), 7 deletions(-)
create mode 100644 qga/commands-posix-ssh.c
--
2.28.0
Patchew URL: https://patchew.org/QEMU/20201020081257.2054548-1-marcandre.lureau@redhat.com/
Hi,
This series seems to have some coding style problems. See output below for
more information:
Type: series
Message-id: 20201020081257.2054548-1-marcandre.lureau@redhat.com
Subject: [PATCH v3 0/7] qemu-ga: add ssh-{get,add,remove}-authorized-keys
=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===
Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
* [new tag] patchew/20201020081257.2054548-1-marcandre.lureau@redhat.com -> patchew/20201020081257.2054548-1-marcandre.lureau@redhat.com
Switched to a new branch 'test'
37fc72c qga: add ssh-get-authorized-keys
2db2bb5 meson: minor simplification
c9f55f9 qga: add *reset argument to ssh-add-authorized-keys
a92c745 fixup! qga: add ssh-{add,remove}-authorized-keys
58c3777 fixup! qga: add ssh-{add,remove}-authorized-keys
a5060ae qga: add ssh-{add,remove}-authorized-keys
14a1529 glib-compat: add g_unix_get_passwd_entry_qemu()
=== OUTPUT BEGIN ===
1/7 Checking commit 14a152941a15 (glib-compat: add g_unix_get_passwd_entry_qemu())
WARNING: Block comments use a leading /* on a separate line
#41: FILE: include/glib-compat.h:81:
+/* Note: The fallback implementation is not MT-safe, and it returns a copy of
WARNING: Block comments use a trailing */ on a separate line
#44: FILE: include/glib-compat.h:84:
+ * GLib API substitution. */
total: 0 errors, 2 warnings, 38 lines checked
Patch 1/7 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
2/7 Checking commit a5060aeea7cc (qga: add ssh-{add,remove}-authorized-keys)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#27:
new file mode 100644
ERROR: Use g_assert or g_assert_not_reached
#64: FILE: qga/commands-posix-ssh.c:33:
+ g_assert_cmpint(ret, ==, 0);
ERROR: Use g_assert or g_assert_not_reached
#318: FILE: qga/commands-posix-ssh.c:287:
+ g_assert_cmpint(ret, ==, 0);
ERROR: Use g_assert or g_assert_not_reached
#323: FILE: qga/commands-posix-ssh.c:292:
+ g_assert_no_error(err);
ERROR: Use g_assert or g_assert_not_reached
#335: FILE: qga/commands-posix-ssh.c:304:
+ g_assert_no_error(err);
ERROR: Use g_assert or g_assert_not_reached
#337: FILE: qga/commands-posix-ssh.c:306:
+ g_assert_cmpstr(contents, ==, expected);
ERROR: Use g_assert or g_assert_not_reached
#374: FILE: qga/commands-posix-ssh.c:343:
+ g_assert_null(err);
ERROR: Use g_assert or g_assert_not_reached
#380: FILE: qga/commands-posix-ssh.c:349:
+ g_assert_null(err);
ERROR: Use g_assert or g_assert_not_reached
#401: FILE: qga/commands-posix-ssh.c:370:
+ g_assert_null(err);
ERROR: Use g_assert or g_assert_not_reached
#406: FILE: qga/commands-posix-ssh.c:375:
+ g_assert_null(err);
total: 9 errors, 1 warnings, 480 lines checked
Patch 2/7 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
3/7 Checking commit 58c37770bba2 (fixup! qga: add ssh-{add,remove}-authorized-keys)
ERROR: Missing Signed-off-by: line(s)
total: 1 errors, 0 warnings, 37 lines checked
Patch 3/7 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
4/7 Checking commit a92c745ffcd9 (fixup! qga: add ssh-{add,remove}-authorized-keys)
ERROR: Missing Signed-off-by: line(s)
total: 1 errors, 0 warnings, 18 lines checked
Patch 4/7 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
5/7 Checking commit c9f55f99e81c (qga: add *reset argument to ssh-add-authorized-keys)
ERROR: Use g_assert or g_assert_not_reached
#95: FILE: qga/commands-posix-ssh.c:381:
+ g_assert_null(err);
ERROR: Use g_assert or g_assert_not_reached
#105: FILE: qga/commands-posix-ssh.c:391:
+ g_assert_null(err);
ERROR: Use g_assert or g_assert_not_reached
#114: FILE: qga/commands-posix-ssh.c:400:
+ g_assert_null(err);
total: 3 errors, 0 warnings, 121 lines checked
Patch 5/7 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
6/7 Checking commit 2db2bb5dbd64 (meson: minor simplification)
7/7 Checking commit 37fc72c0a198 (qga: add ssh-get-authorized-keys)
ERROR: space prohibited between function name and open parenthesis '('
#56: FILE: qga/commands-posix-ssh.c:309:
+ return g_steal_pointer (&ret);
ERROR: Use g_assert or g_assert_not_reached
#80: FILE: qga/commands-posix-ssh.c:484:
+ g_assert_null(err);
ERROR: Use g_assert or g_assert_not_reached
#87: FILE: qga/commands-posix-ssh.c:491:
+ g_assert_cmpint(len, ==, 2);
total: 3 errors, 0 warnings, 138 lines checked
Patch 7/7 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
=== OUTPUT END ===
Test command exited with code: 1
The full log is available at
http://patchew.org/logs/20201020081257.2054548-1-marcandre.lureau@redhat.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
On Tue, Oct 20, 2020 at 12:14 PM <marcandre.lureau@redhat.com> wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> Hi
>
> Add new commands to help modify a user .ssh/authorized_keys.
>
> Although it's possible already to modify the authorized_keys files via
> file-{read,write} or exec, the commands are often denied by default, and
> the
> logic is left to the client. Let's add specific commands for this job.
>
> Fixes:
> https://bugzilla.redhat.com/show_bug.cgi?id=1885332
>
> v3:
> - add "qga: add ssh-get-authorized-keys" & "qga: add *reset argument to
> ssh-add-authorized-keys" patches
> - add some fixup! patches to be squashed after review, adding 'if'
> - added the reviewed-by
> - misc doc improvements
>
>
ping (approaching soft-freeze)
I can resend with the fixup squashed, or let the maintainer do it?
thanks
v2:
> - misc doc improvements
> - various warnings fixes
> - fix build for !unix
> - added reviewed-by
>
> Marc-André Lureau (7):
> glib-compat: add g_unix_get_passwd_entry_qemu()
> qga: add ssh-{add,remove}-authorized-keys
> fixup! qga: add ssh-{add,remove}-authorized-keys
> fixup! qga: add ssh-{add,remove}-authorized-keys
> qga: add *reset argument to ssh-add-authorized-keys
> meson: minor simplification
> qga: add ssh-get-authorized-keys
>
> include/glib-compat.h | 26 ++
> qga/commands-posix-ssh.c | 516 +++++++++++++++++++++++++++++++++++++++
> qga/meson.build | 34 ++-
> qga/qapi-schema.json | 67 +++++
> 4 files changed, 636 insertions(+), 7 deletions(-)
> create mode 100644 qga/commands-posix-ssh.c
>
> --
> 2.28.0
>
>
>
>
--
Marc-André Lureau
© 2016 - 2026 Red Hat, Inc.