Re: [libvirt] python binding: openAuth() segfaulting

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

 



2010/3/16 Dan Kenigsberg <danken@xxxxxxxxxx>:
> I was trying to learn how to use openAuth(uri, auth_cb, flags), and
> got:
>
> Python 2.6.2 (r262:71600, Jan 25 2010, 18:46:47)
> [GCC 4.4.2 20091222 (Red Hat 4.4.2-20)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import libvirt
>>>> libvirt.openAuth('qemu:///system', lambda x: None, 0)
> Segmentation fault (core dumped)
>
> I guess my lambda expression was not what libvirt expected, but still..
>
> Regards,
>
> Dan.
>

Yes, the python bindings lack proper input validation. If you pass
something unexpected it'll probably segfault.

I've started working on a patch that adds input validation to the
python bindings.

Until then, see examples/python/esxlist.py in the libvirt codebase for
the correct usage of the auth parameter in python.

Matthias

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