summaryrefslogtreecommitdiff
path: root/src/basic/mount-util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/basic/mount-util.c')
-rw-r--r--src/basic/mount-util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/mount-util.c b/src/basic/mount-util.c
index ebe41a4c6c..3670b7f591 100644
--- a/src/basic/mount-util.c
+++ b/src/basic/mount-util.c
@@ -109,7 +109,7 @@ static int fd_fdinfo_mnt_id(int fd, const char *filename, int flags, int *mnt_id
if ((flags & AT_EMPTY_PATH) && isempty(filename))
xsprintf(path, "/proc/self/fdinfo/%i", fd);
else {
- subfd = openat(fd, filename, O_CLOEXEC|O_PATH);
+ subfd = openat(fd, filename, O_CLOEXEC|O_PATH|(flags & AT_SYMLINK_FOLLOW ? 0 : O_NOFOLLOW));
if (subfd < 0)
return -errno;