aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/error.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2021-01-05 14:54:28 +0100
committerEelco Dolstra <edolstra@gmail.com>2021-01-22 12:36:50 +0100
commitb7bfc7ee52dd425e0156f369eb4c05a62358f912 (patch)
tree8f28bb3ee5628a4c48fd32227131b50edcedc382 /src/libutil/error.cc
parent259100332f96250d6615d5839f6a77798c77aefb (diff)
Add FIXME
Diffstat (limited to 'src/libutil/error.cc')
-rw-r--r--src/libutil/error.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libutil/error.cc b/src/libutil/error.cc
index e7dc3f1d3..2a67a730a 100644
--- a/src/libutil/error.cc
+++ b/src/libutil/error.cc
@@ -61,6 +61,8 @@ std::optional<LinesOfCode> getCodeLines(const ErrPos & errPos)
if (errPos.origin == foFile) {
LinesOfCode loc;
try {
+ // FIXME: when running as the daemon, make sure we don't
+ // open a file to which the client doesn't have access.
AutoCloseFD fd = open(errPos.file.c_str(), O_RDONLY | O_CLOEXEC);
if (!fd) return {};