vhost-user-test: fix predictable filename on tmpfs
commit6fdac09370530be0cc6fe9e8d425c0670ba994b1
authorMichael S. Tsirkin <mst@redhat.com>
Thu, 1 Oct 2015 12:50:52 +0000 (1 15:50 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Fri, 2 Oct 2015 14:04:32 +0000 (2 17:04 +0300)
tree852867b9e0435ae10956d00dc5267a7604ce1d2f
parent1b7e1e3b463a6e5c117498b192cb07603c04b668
vhost-user-test: fix predictable filename on tmpfs

vhost-user-test uses getpid to create a unique filename. This name is
predictable, and a security problem.  Instead, use a tmp directory
created by mkdtemp, which is a suggested best practice.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
tests/vhost-user-test.c