[PATCH] qga/commands-posix: fix typo in qmp_guest_set_user_password

Paolo Bonzini posted 1 patch 2 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20240503171333.241463-1-pbonzini@redhat.com
Maintainers: Michael Roth <michael.roth@amd.com>, Konstantin Kostiuk <kkostiuk@redhat.com>
qga/commands-posix.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] qga/commands-posix: fix typo in qmp_guest_set_user_password
Posted by Paolo Bonzini 2 weeks ago
qga/commands-posix.c does not compile on FreeBSD due to a confusion
between "chpasswdata" (wrong) and "chpasswddata" (used in the #else
branch).

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 qga/commands-posix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qga/commands-posix.c b/qga/commands-posix.c
index 7a065c4085c..7f05996495a 100644
--- a/qga/commands-posix.c
+++ b/qga/commands-posix.c
@@ -2173,7 +2173,7 @@ void qmp_guest_set_user_password(const char *username,
     }
 
 #ifdef __FreeBSD__
-    g_autofree char *chpasswdata = g_strdup(rawpasswddata);
+    g_autofree char *chpasswddata = g_strdup(rawpasswddata);
     const char *crypt_flag = crypted ? "-H" : "-h";
     const char *argv[] = {"pw", "usermod", "-n", username,
                           crypt_flag, "0", NULL};
-- 
2.44.0
Re: [PATCH] qga/commands-posix: fix typo in qmp_guest_set_user_password
Posted by Philippe Mathieu-Daudé 2 weeks ago
On 3/5/24 19:13, Paolo Bonzini wrote:
> qga/commands-posix.c does not compile on FreeBSD due to a confusion
> between "chpasswdata" (wrong) and "chpasswddata" (used in the #else
> branch).
> 

Fixes: 0e5b75a390 ("qga/commands-posix: qmp_guest_set_user_password: use 
ga_run_command helper")
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>   qga/commands-posix.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)


Re: [PATCH] qga/commands-posix: fix typo in qmp_guest_set_user_password
Posted by Thomas Huth 2 weeks ago
On 03/05/2024 19.13, Paolo Bonzini wrote:
> qga/commands-posix.c does not compile on FreeBSD due to a confusion
> between "chpasswdata" (wrong) and "chpasswddata" (used in the #else
> branch).
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>   qga/commands-posix.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/qga/commands-posix.c b/qga/commands-posix.c
> index 7a065c4085c..7f05996495a 100644
> --- a/qga/commands-posix.c
> +++ b/qga/commands-posix.c
> @@ -2173,7 +2173,7 @@ void qmp_guest_set_user_password(const char *username,
>       }
>   
>   #ifdef __FreeBSD__
> -    g_autofree char *chpasswdata = g_strdup(rawpasswddata);
> +    g_autofree char *chpasswddata = g_strdup(rawpasswddata);
>       const char *crypt_flag = crypted ? "-H" : "-h";
>       const char *argv[] = {"pw", "usermod", "-n", username,
>                             crypt_flag, "0", NULL};

Fixes: 0e5b75a390 ("qga/commands-posix: qmp_guest_set_user_password: use 
ga_run_command helper")
Reviewed-by: Thomas Huth <thuth@redhat.com>