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

Re: [libvirt] [PATCH v2] Return more error output if policykit auth fails.



On 01/27/2012 03:02 PM, Cole Robinson wrote:
> Several not uncommon issues can be diagnosed through pkcheck output, like
> lack of/malfunctioning desktop agent, or lack of/malfunctioning polkit
> dbus agent.
> 
> Signed-off-by: Cole Robinson <crobinso redhat com>
> ---

> +    } else if (pkout || pkerr) {
> +        virNetError(VIR_ERR_AUTH_FAILED, "%s %s",
> +                    pkerr ? pkerr : "",
> +                    pkout ? pkout : "");

Always printing both is also okay, but now we run into the issue that
you might have a trailing space if there is no pkerr.

This almost argues that we should have a mode in virCommand where you
can request that stdout and stderr are collected into the same string
(basically, by redirecting stderr onto stdout before doing string
collection); I'll play with that idea.

In the meantime, ACK.  A trailing space isn't the end of the world,
especially if I can get the virCommand changes to work and avoid it in
that way.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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