qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 01/10] qga: add guest-set-user-password command


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH 01/10] qga: add guest-set-user-password command
Date: Wed, 8 Apr 2015 20:00:21 +0100

On 17 February 2015 at 22:40, Michael Roth <address@hidden> wrote:
> From: "Daniel P. Berrange" <address@hidden>
>
> Add a new 'guest-set-user-password' command for changing the password

> +void qmp_guest_set_user_password(const char *username,
> +                                 const char *password,
> +                                 bool crypted,
> +                                 Error **errp)
> +{
> +    Error *local_err = NULL;
> +    char *passwd_path = NULL;
> +    pid_t pid;
> +    int status;
> +    int datafd[2] = { -1, -1 };
> +    char *rawpasswddata = NULL;
> +    size_t rawpasswdlen;
> +    char *chpasswddata = NULL;
> +    size_t chpasswdlen;
> +
> +    rawpasswddata = (char *)g_base64_decode(password, &rawpasswdlen);

Hi. This seems to break certain kinds of compilation setups
(the one I noticed was a -m32 compile to build 32-bit PPC
binaries on a 64-bit PPC Fedora box):

  CC    qga/commands-posix.o
/home/pm215/qemu/qga/commands-posix.c: In function
‘qmp_guest_set_user_password’:
/home/pm215/qemu/qga/commands-posix.c:1908:5: error: passing argument
2 of ‘g_base64_decode’ from incompatible pointer type [-Werror]
In file included from /usr/include/glib-2.0/glib.h:37:0,
                 from /home/pm215/qemu/qga/commands-posix.c:14:
/usr/include/glib-2.0/glib/gbase64.h:49:9: note: expected ‘gsize *’
but argument is of type ‘size_t *’

It looks like you can't just assume that size_t and gsize
are the same thing. Compare commit 3d1bba20 which fixed some
previous instances of this.

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]