diff options
author | Mike Frysinger <vapier@gentoo.org> | 2008-11-09 14:39:00 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2008-11-09 14:39:00 +0000 |
commit | 31332c02594dd34055cb99028814af5c043fb890 (patch) | |
tree | e9ed3c5822b915e577828403f8467dc8593d0c90 /libsandbox | |
parent | libsandbox: catch utime/utimes #163770 (diff) | |
download | sandbox-31332c02594dd34055cb99028814af5c043fb890.tar.gz sandbox-31332c02594dd34055cb99028814af5c043fb890.tar.bz2 sandbox-31332c02594dd34055cb99028814af5c043fb890.zip |
libsandbox: also handle lutimes()
URL: http://bugs.gentoo.org/163770
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Reported-by: Harald van Dijk <truedfx@gentoo.org>
Diffstat (limited to 'libsandbox')
-rw-r--r-- | libsandbox/symbols.h.in | 1 | ||||
-rw-r--r-- | libsandbox/wrapper-funcs/lutimes.c | 24 |
2 files changed, 25 insertions, 0 deletions
diff --git a/libsandbox/symbols.h.in b/libsandbox/symbols.h.in index 17dc94f..19119bc 100644 --- a/libsandbox/symbols.h.in +++ b/libsandbox/symbols.h.in @@ -32,3 +32,4 @@ truncate64 execve utime utimes +lutimes diff --git a/libsandbox/wrapper-funcs/lutimes.c b/libsandbox/wrapper-funcs/lutimes.c new file mode 100644 index 0000000..f323a82 --- /dev/null +++ b/libsandbox/wrapper-funcs/lutimes.c @@ -0,0 +1,24 @@ +/* + * lutimes.c + * + * lutimes() wrapper. + * + * Copyright 1999-2008 Gentoo Foundation + * Licensed under the GPL-2 + */ + +extern int EXTERN_NAME(const char *, const struct timeval []); +static int (*WRAPPER_TRUE_NAME) (const char *, const struct timeval []) = NULL; + +int WRAPPER_NAME(const char *filename, const struct timeval times[]) +{ + int result = -1; + + if FUNCTION_SANDBOX_SAFE("lutimes", filename) { + check_dlsym(WRAPPER_TRUE_NAME, WRAPPER_SYMNAME, + WRAPPER_SYMVER); + result = WRAPPER_TRUE_NAME(filename, times); + } + + return result; +} |