[PATCH v2 0/2] qemu-ga: add ssh-{add,remove}-authorized-keys

marcandre.lureau@redhat.com posted 2 patches 3 years, 6 months ago
Test checkpatch failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20201015160819.1471144-1-marcandre.lureau@redhat.com
include/glib-compat.h    |  26 +++
qga/commands-posix-ssh.c | 400 +++++++++++++++++++++++++++++++++++++++
qga/commands-win32.c     |  12 ++
qga/meson.build          |  20 +-
qga/qapi-schema.json     |  33 ++++
5 files changed, 490 insertions(+), 1 deletion(-)
create mode 100644 qga/commands-posix-ssh.c
[PATCH v2 0/2] qemu-ga: add ssh-{add,remove}-authorized-keys
Posted by marcandre.lureau@redhat.com 3 years, 6 months ago
From: Marc-André Lureau <marcandre.lureau@redhat.com>

Hi,

Add two new commands to help modify ~/.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

v2:
 - misc doc improvements
 - various warnings fixes
 - fix build for !unix
 - added reviewed-by

Marc-André Lureau (2):
  glib-compat: add g_unix_get_passwd_entry_qemu()
  qga: add ssh-{add,remove}-authorized-keys

 include/glib-compat.h    |  26 +++
 qga/commands-posix-ssh.c | 400 +++++++++++++++++++++++++++++++++++++++
 qga/commands-win32.c     |  12 ++
 qga/meson.build          |  20 +-
 qga/qapi-schema.json     |  33 ++++
 5 files changed, 490 insertions(+), 1 deletion(-)
 create mode 100644 qga/commands-posix-ssh.c

-- 
2.28.0



Re: [PATCH v2 0/2] qemu-ga: add ssh-{add,remove}-authorized-keys
Posted by no-reply@patchew.org 3 years, 6 months ago
Patchew URL: https://patchew.org/QEMU/20201015160819.1471144-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: 20201015160819.1471144-1-marcandre.lureau@redhat.com
Subject: [PATCH v2 0/2] qemu-ga: add ssh-{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/20201015160819.1471144-1-marcandre.lureau@redhat.com -> patchew/20201015160819.1471144-1-marcandre.lureau@redhat.com
Switched to a new branch 'test'
3cabf4b qga: add ssh-{add,remove}-authorized-keys
bef7d68 glib-compat: add g_unix_get_passwd_entry_qemu()

=== OUTPUT BEGIN ===
1/2 Checking commit bef7d6888b0b (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/2 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
2/2 Checking commit 3cabf4b13bcc (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/2 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/20201015160819.1471144-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