Skip to content

Generate a random connection ID with g_random_int()

Marc-André Lureau requested to merge elmarco/spice:rand into master
Spice uses rand() to generate the random id, but qemu (at least in the case
of qemu-system-x86) fails to initialize the RNG seed (with e.g. srand()).

The result is, that every SPICE session started (by e.g. libvirtd) has the
same client_id. Usually, this is not a problem, but running something like
a SPICE proxy, relying on the client_id to correctly route connections,
this creates problems.

Fixes:
https://gitlab.com/qemu-project/qemu/-/issues/163

Merge request reports