aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-03-08 07:14:17 -0400
committerMike Frysinger <vapier@gentoo.org>2009-03-08 08:47:05 -0400
commit7b0b914b4ea0e594867bad91fe1aaffa0c21d87b (patch)
treea0cbb36e49c17f91017c75c1c9b2e0cc80a1f53e /libsandbox/wrapper-funcs/mkdirat.c
parentlibsandbox: push errno save/restore down in openat() (diff)
downloadsandbox-7b0b914b4ea0e594867bad91fe1aaffa0c21d87b.tar.gz
sandbox-7b0b914b4ea0e594867bad91fe1aaffa0c21d87b.tar.bz2
sandbox-7b0b914b4ea0e594867bad91fe1aaffa0c21d87b.zip
libsandbox: handle symlinks properly
Make sure we handle edge cases that involve symlinks and functions that operate on symlinks. This includes newer style *at functions that can go between operating on symlinks and operating on the linked files, and on symlinks to files that live in explicitly denied paths. URL: http://bugs.gentoo.org/254914 Signed-off-by: Mike Frysinger <vapier@gentoo.org> Reported-by: Mike Auty <ikelos@gentoo.org>
Diffstat (limited to 'libsandbox/wrapper-funcs/mkdirat.c')
-rw-r--r--libsandbox/wrapper-funcs/mkdirat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libsandbox/wrapper-funcs/mkdirat.c b/libsandbox/wrapper-funcs/mkdirat.c
index 82ae34d..7d89c6a 100644
--- a/libsandbox/wrapper-funcs/mkdirat.c
+++ b/libsandbox/wrapper-funcs/mkdirat.c
@@ -8,7 +8,7 @@
#ifndef WRAPPER_ARGS_PROTO /* let mkdir() use us */
# define WRAPPER_ARGS_PROTO int dirfd, const char *pathname, mode_t mode
# define WRAPPER_ARGS dirfd, pathname, mode
-# define WRAPPER_SAFE() FUNCTION_SANDBOX_SAFE_AT(dirfd, pathname)
+# define WRAPPER_SAFE() FUNCTION_SANDBOX_SAFE_AT(dirfd, pathname, 0)
#endif
static inline bool sb_mkdirat_pre_check(WRAPPER_ARGS_PROTO)