Re: [v0.9.12-maint 7/9] Include process start time when doing polkit checks

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

 



On 09/19/2013 06:22 AM, Guido Günther wrote:
> On Wed, Sep 18, 2013 at 09:14:23PM -0600, Eric Blake wrote:
>> From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
>>
>> Since PIDs can be reused, polkit prefers to be given
>> a (PID,start time) pair. If given a PID on its own,
>> it will attempt to lookup the start time in /proc/pid/stat,
>> though this is subject to races.
>>
>> It is safer if the client app resolves the PID start
>> time itself, because as long as the app has the client
>> socket open, the client PID won't be reused.
>>
>> Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
>> (cherry picked from commit 979e9c56a7aadf2dcfbddd1abfbad594b78b4468)
>> Signed-off-by: Eric Blake <eblake@xxxxxxxxxx>
>>

>> +
>> +
>> +size_t virStringListLength(char **strings)
>> +{
>> +    size_t i = 0;
>> +
>> +    while (strings && strings[i])
>> +        i++;
>> +
>> +    return i;
>> +}
> 
> This looks a bit as if it could go into a separate commit since it adds
> a new utility function, but that's minor. Otherwise ACK to the whole
> series.

That utility function really was added during upstream commit 979e9c56
(yeah, we probably should have split that into two commits back in April
at the time of the upstream commit), but this backport is faithfully
reproducing what the original did.

Thanks for the review; I'll push the series shortly.

-- 
Eric Blake   eblake redhat com    +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]