Re: [PATCH] virt-admin: Properly fix the default session daemon URI to admin server

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

 



On 09/08/16 16:04, Jiri Denemark wrote:
> On Tue, Aug 09, 2016 at 15:43:57 +0200, Erik Skultety wrote:
>> Commit 30ce2f0e tried to fix the issue with an incorrect session URI to admin
>> server but it messed up the checks:
>>
>>     if (geteuid == 0 && VIR_STRDUP(*uristr, "libvirtd:///system") < 0)
>>         return -1;
>>     else if (VIR_STRDUP(*uristr, "libvirtd:///session") < 0)
>>         return -1;
>>
>> So if a client executed with root privileges tries to connect, its euid is
>> checked (true) and the correct URI is successfully copied to @uristr (false),
>> therefore the 'else' branch is taken and @uristr is replaced by the session URI
>> which for root results in:
>>     Failed to connect socket to '/root/.cache/libvirt/libvirt-admin-sock':
>>     No such file or directory
>>
>> Signed-off-by: Erik Skultety <eskultet@xxxxxxxxxx>
>> ---
>>  src/libvirt-admin.c | 8 +++++---
>>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> ACK
> 
> Jirka

Thanks, pushed.

Erik

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