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

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

 



On 01/27/2012 05:32 PM, Eric Blake wrote:
> 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@xxxxxxxxxx>
>> ---
> 
>> +    } 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.
> 

Yeah I actually thought about sending a patch to add just that, but just stuck
it at the end of my todo list :)

> 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.
> 

Thanks Eric, pushed now.

- Cole

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]