From 53be29113c069625ed83d87832a7cf3afb91be5f Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Wed, 24 Feb 2021 15:25:19 +0100 Subject: [PATCH] file_utils: actually open the file for reading Signed-off-by: Christian Brauner --- src/lxc/file_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lxc/file_utils.c b/src/lxc/file_utils.c index 0a0824dab..e7e87de9b 100644 --- a/src/lxc/file_utils.c +++ b/src/lxc/file_utils.c @@ -127,7 +127,7 @@ ssize_t lxc_read_try_buf_at(int dfd, const char *path, void *buf, size_t count) __do_close int fd = -EBADF; ssize_t ret; - fd = open_at(dfd, path, PROTECT_OPEN_W, PROTECT_LOOKUP_BENEATH, 0); + fd = open_at(dfd, path, PROTECT_OPEN, PROTECT_LOOKUP_BENEATH, 0); if (fd < 0) return -errno; -- 2.47.2