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

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



2010/3/16 Dan Kenigsberg <danken redhat com>:
> 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


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