Re: [PATCH] daemon: fix logic bug with virAsprintf

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

 



On 02/15/2012 12:21 AM, Wen Congyang wrote:
> At 02/15/2012 07:03 AM, Eric Blake Wrote:
>> Regression introduced in commit 7033c5f2, due to improper conversion
>> from snprintf to virAsprintf.
>>
>> * daemon/remote.c (remoteDispatchAuthList): Check return value
>> correctly.
>> ---
>>
>> This one's embarrassing.  I think I broke polkit authorization in
>> 0.9.10.  :(
>>
>>  daemon/remote.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/daemon/remote.c b/daemon/remote.c
>> index 9c61306..724db23 100644
>> --- a/daemon/remote.c
>> +++ b/daemon/remote.c
>> @@ -2052,7 +2052,7 @@ remoteDispatchAuthList(virNetServerPtr server ATTRIBUTE_UNUSED,
>>          } else if (callerUid == 0) {
>>              char *ident;
>>              if (virAsprintf(&ident, "pid:%lld,uid:%d",
>> -                            (long long) callerPid, callerUid) == 0) {
>> +                            (long long) callerPid, callerUid) >= 0) {
>>                  VIR_INFO("Bypass polkit auth for privileged client %s",
>>                           ident);
>>                  if (virNetServerClientSetIdentity(client, ident) < 0)
> 
> ACK

Thanks; pushed.

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

Attachment: signature.asc
Description: OpenPGP digital signature

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