summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-03-08 14:11:18 +0000
committerRichard W.M. Jones <rjones@redhat.com>2012-03-08 14:12:45 +0000
commit3345444cccfe2e2fb07d4769d1e764eca59dd6f9 (patch)
tree14abc4a1960fefc84d1bc8181eb802dc337b8bd8
parentae0f9f149b2b527b924d4532aa38302056d8a6b0 (diff)
downloadlibguestfs-3345444cccfe2e2fb07d4769d1e764eca59dd6f9.tar.gz
libguestfs-3345444cccfe2e2fb07d4769d1e764eca59dd6f9.tar.xz
libguestfs-3345444cccfe2e2fb07d4769d1e764eca59dd6f9.zip
comment: Note time-of-check to time-of-use race found by Coverity.
-rw-r--r--daemon/file.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/daemon/file.c b/daemon/file.c
index 91746e0d..52354461 100644
--- a/daemon/file.c
+++ b/daemon/file.c
@@ -38,6 +38,12 @@ do_touch (const char *path)
/* RHBZ#582484: Restrict touch to regular files. It's also OK
* here if the file does not exist, since we will create it.
+ *
+ * XXX Coverity flags this as a time-of-check to time-of-use race
+ * condition, particularly in the libguestfs live case. Not clear
+ * how to fix this yet, since unconditionally opening the file can
+ * cause a hang, so you have to somehow check it first before you
+ * open it.
*/
CHROOT_IN;
r = lstat (path, &buf);