diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-12-08 20:21:43 +0100 |
---|---|---|
committer | Lukáš Nykrýn <lnykryn@redhat.com> | 2019-05-03 13:00:29 +0200 |
commit | 24e6a5d1deac8aae11a6a3a22fb9b71cb77fdb33 (patch) | |
tree | d18bb0bfbd9b5fea8026bd4fe03bb11f9bc95c5c /src | |
parent | 770b16b22dd0eec04fd1493dae644206c32f8e04 (diff) | |
download | systemd-24e6a5d1deac8aae11a6a3a22fb9b71cb77fdb33.tar.gz |
mount-point: honour AT_SYMLINK_FOLLOW correctly
Fixes: #11092
(cherry picked from commit be24321f3dae91a166166b239954032727439942)
Resolves: #1683319
Diffstat (limited to 'src')
-rw-r--r-- | src/basic/mount-util.c | 2 |
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; |