]> git.proxmox.com Git - mirror_qemu.git/commit
fsdev-proxy-helper: avoid TOC/TOU race
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 27 Nov 2015 11:43:05 +0000 (12:43 +0100)
committerGreg Kurz <gkurz@linux.vnet.ibm.com>
Mon, 30 Nov 2015 11:31:53 +0000 (12:31 +0100)
commit49f817caaf4460f4a8dfca190f31a57569fc9efe
treecffe0b89c1206068620cf290c08079117cce6963
parent714487515dbe0c65d5904251e796cd3a5b3579fb
fsdev-proxy-helper: avoid TOC/TOU race

There is a minor time of check/time of use race between statfs and chroot.
It can be fixed easily by stat-ing the root after it has been changed.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
fsdev/virtfs-proxy-helper.c