diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-02-20 02:30:03 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-02-20 02:30:03 -0500 |
commit | ff0dd36d8f038d29d72f0d5d7c43edaa4c2385bc (patch) | |
tree | c77b7064bb3b4d68f584442c81e127682947cfe7 /libsandbox | |
parent | libsandbox: use sb_unwrapped_open() in creat wrapper (diff) | |
download | sandbox-ff0dd36d8f038d29d72f0d5d7c43edaa4c2385bc.tar.gz sandbox-ff0dd36d8f038d29d72f0d5d7c43edaa4c2385bc.tar.bz2 sandbox-ff0dd36d8f038d29d72f0d5d7c43edaa4c2385bc.zip |
libsandbox: unify creat/creat64 wrappers
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'libsandbox')
-rw-r--r-- | libsandbox/wrapper-funcs/creat64.c | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/libsandbox/wrapper-funcs/creat64.c b/libsandbox/wrapper-funcs/creat64.c index b892808..e512fa4 100644 --- a/libsandbox/wrapper-funcs/creat64.c +++ b/libsandbox/wrapper-funcs/creat64.c @@ -3,26 +3,8 @@ * * Copyright 1999-2008 Gentoo Foundation * Licensed under the GPL-2 - * - * Partly Copyright (C) 1998-9 Pancrazio `Ezio' de Mauro <p@demauro.net>, - * as some of the InstallWatch code was used. */ -#define WRAPPER_ARGS_PROTO const char *pathname, mode_t mode -#define WRAPPER_ARGS pathname, mode -extern int EXTERN_NAME(WRAPPER_ARGS_PROTO); -/* XXX: We use the open64() call to simulate creat64() */ -/* static int (*WRAPPER_TRUE_NAME)(WRAPPER_ARGS_PROTO) = NULL; */ - -int WRAPPER_NAME(WRAPPER_ARGS_PROTO) -{ - int result = -1; - - if (FUNCTION_SANDBOX_SAFE(pathname)) { - check_dlsym(true_open64_DEFAULT, symname_open64_DEFAULT, - symver_open64_DEFAULT); - result = true_open64_DEFAULT(pathname, O_CREAT | O_WRONLY | O_TRUNC, mode); - } - - return result; -} +#define sb_unwrapped_open_DEFAULT sb_unwrapped_open64_DEFAULT +#include "creat.c" +#undef sb_unwrapped_open_DEFAULT |