diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-12-08 20:21:43 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-12-08 22:43:55 +0100 |
commit | be24321f3dae91a166166b239954032727439942 (patch) | |
tree | 6b04029eef3d2d779b452a35ca1dc78c88592807 /src/basic | |
parent | coding style: reduce text width to 109 characters (diff) | |
download | systemd-be24321f3dae91a166166b239954032727439942.tar.gz systemd-be24321f3dae91a166166b239954032727439942.tar.bz2 systemd-be24321f3dae91a166166b239954032727439942.zip |
mount-point: honour AT_SYMLINK_FOLLOW correctly
Fixes: #11092
Diffstat (limited to 'src/basic')
-rw-r--r-- | src/basic/mountpoint-util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/mountpoint-util.c b/src/basic/mountpoint-util.c index 0a9f479e4..1e946a0bb 100644 --- a/src/basic/mountpoint-util.c +++ b/src/basic/mountpoint-util.c @@ -98,7 +98,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; |