Re: Building on Solaris 11 Express

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

 



On Fri, Jun 3, 2011 at 16:16, Eric Blake <eblake@xxxxxxxxxx> wrote:
> On 06/03/2011 01:11 AM, Matthias Bolte wrote:
>> That might be the problem. I don't have a Solaris at hand right now to
>> test it so here is a speculative patch for this.
>
> And while I have access to a Solaris machine, I don't have enough
> pre-requisites built on it in order to build libvirt, so I likewise am
> not in a position to test. ÂRuben, it would be nice to have your ACK.
>
>> qemudSetupPrivs() drops privileges on Solaris making geteuid()
>> return non-zero later on when qemudInitialize() tries to detect
>> privileged mode.
>>
>> Detect privileged mode before calling qemudSetupPrivs() to fix
>> this.
>
> In principle, this sounds like the right solution.
>
>> @@ -3300,8 +3302,12 @@ int main(int argc, char **argv) {
>> Â Â Â * getuid/geteuid() == 0, for privilege level checks.
>> Â Â Â * It must all use the flag 'server->privileged'
>> Â Â Â * which is also passed into all libvirt stateful
>> - Â Â * drivers
>> + Â Â * drivers.
>> + Â Â * Detect geteuid() == 0 before calling qemudSetupPrivs()
>> + Â Â * because that might drop privileges.
>> Â Â Â */
>> + Â Âprivileged = geteuid() == 0 ? 1 : 0;
>
> Identical, and simpler, to just write:
>
> privileged = !geteuid();
>
> ACK by code inspection, but I'd prefer actual build test before
> committing this. ÂIt qualifies for inclusion in 0.9.2 if we act fast
> enough, but I don't think it is a show-stopper if we miss out on Solaris
> builds for this release.
>
> --
> Eric Blake  eblake@xxxxxxxxxx  Â+1-801-349-2682
> Libvirt virtualization library http://libvirt.org

It builds, and starts, but nothing more than that:

root@openindiana:~# virsh list
error: Failed to reconnect to the hypervisor
error: no valid connection
error: no connection driver available for No connection for URI (null)

But hey, it's a start :-)

Kind regards,

Ruben

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