|author||Peter Seebach <firstname.lastname@example.org>||2013-02-13 13:32:53 -0600|
|committer||Peter Seebach <email@example.com>||2013-02-13 13:35:31 -0600|
wrap_linkat() was trying to avoid "redundantly" expanding paths before calling real_linkat(). Which is fine when you're not using an absolute path in a chroot environment, but if you are, it ends up calling the real syscall with the absolute path and no chroot prefix. General observation: All the *at() implementations are expanding paths into absolute paths, then dutifully calling real_*at() functions with them anyway. This is silly. Added a note to Futures.txt to fix it some day. In the mean time, linkat() is fixed correctly; it always expands paths, does so exactly once, and then uses the underlying link() call because it doesn't need special processing of directory fds anymore. Also fixed errno stashing to reduce the risk that link() will change errno in a circumstance where it doesn't actually fail.
Diffstat (limited to 'Futures.txt')
1 files changed, 5 insertions, 0 deletions
diff --git a/Futures.txt b/Futures.txt
index e7829ce..7a39fab 100644
@@ -33,3 +33,8 @@ vague implementation thoughts:
* Test cases
- boy, do we need test cases!
+* Clean up *at() functions
+ - The *at() function implementations are gratuitously complicated,
+ I believe because they predate the auto-canonicalization that came
+ with the rewritten pseudo wrappers.