From 7b0b914b4ea0e594867bad91fe1aaffa0c21d87b Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 8 Mar 2009 07:14:17 -0400 Subject: 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 Reported-by: Mike Auty --- libsandbox/wrapper-funcs/mkdirat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libsandbox/wrapper-funcs/mkdirat.c') 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) -- cgit v1.2.3-65-gdbad