]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
qga/commands-posix: fix typo in qmp_guest_set_user_password
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 3 May 2024 17:13:03 +0000 (19:13 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 3 May 2024 17:36:51 +0000 (19:36 +0200)
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: Thomas Huth <thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
qga/commands-posix.c

index 7a065c4085c85e0516156300c03d841c00a369fd..7f05996495a22e227e4dde6095c8845e69024f02 100644 (file)
@@ -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};