diff options
author | 2018-04-13 16:00:26 -0500 | |
---|---|---|
committer | 2018-04-13 16:03:00 -0500 | |
commit | fddbe854c9db058d5a05830d3bcdd4233d95ee2e (patch) | |
tree | 2468159bdd2456812f25f857ef15ecf4345a330c /ChangeLog.txt | |
parent | 3a48dc4373d65bf1203da4899b4dc2bc17993a26 (diff) | |
download | pseudo-fddbe854c9db058d5a05830d3bcdd4233d95ee2e.tar.gz pseudo-fddbe854c9db058d5a05830d3bcdd4233d95ee2e.tar.bz2 pseudo-fddbe854c9db058d5a05830d3bcdd4233d95ee2e.zip |
Fix symlink following errors
openat() was passing its flags unaltered to pseudo_root_path(), which
assumes that a flags argument other than 0 means "don't follow symlinks
in last path component". This is completely wrong, and I have no idea
how it survived this long unnoticed.
Now, if a plain flags variable is set and not overruled by a
comment like /* flags=... */, it's masked with AT_SYMLINK_NOFOLLOW,
as there are other values fstatat() and friends can take, and the
openat() flags are just overridden with 0. (The only meaningful case
would be O_NOFOLLOW, but O_NOFOLLOW instructs us to *fail* in the
open if the path is a symlink, so we don't care.)
Signed-off-by: Seebs <seebs@seebs.net>
Diffstat (limited to 'ChangeLog.txt')
-rw-r--r-- | ChangeLog.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt index 36a1927..d6e3fca 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -7,6 +7,7 @@ calls to diag() and debug(). * (seebs) Fix a lurking stray slash that could happen while resolving absolute symlinks. + * (seebs) fix mishandled flags for symlink following. 2018-04-02: * (seebs) Change default copyright notice in guts to |