|author||Seebs <email@example.com>||2018-04-13 16:00:26 -0500|
|committer||Seebs <firstname.lastname@example.org>||2018-04-13 16:03:00 -0500|
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 <email@example.com>
Diffstat (limited to 'ChangeLog.txt')
1 files changed, 1 insertions, 0 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt
index 36a1927..d6e3fca 100644
@@ -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.
* (seebs) Change default copyright notice in guts to