commit:     efb6ac30fb0d39cbd5f801c6d251b14ed5f5a7d6
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 20 07:27:34 2015 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sun Sep 20 07:27:34 2015 +0000
URL:        https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=efb6ac30

libsandbox: improve debugging output a bit

Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

 libsandbox/libsandbox.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libsandbox/libsandbox.c b/libsandbox/libsandbox.c
index 57be731..1d9fa04 100644
--- a/libsandbox/libsandbox.c
+++ b/libsandbox/libsandbox.c
@@ -912,6 +912,8 @@ static int check_syscall(sbcontext_t *sbcontext, int sb_nr, 
const char *func,
        resolved_path = resolve_path(file, 1);
        if (!absolute_path || !resolved_path)
                goto error;
+       sb_debug_dyn("absolute_path: %s\n", absolute_path);
+       sb_debug_dyn("resolved_path: %s\n", resolved_path);
 
        verbose = is_env_set_on(ENV_SANDBOX_VERBOSE, &set);
        if (set)
@@ -1098,9 +1100,9 @@ bool before_syscall_open_char(int dirfd, int sb_nr, const 
char *func, const char
        if ((*mode == 'r') && ((0 == (strcmp(mode, "r"))) ||
             /* The strspn accept args are known non-writable modifiers */
             (strlen(mode+1) == strspn(mode+1, "xbtmce"))))
-               sb_nr = SB_NR_OPEN_RD, ext_func = "open_rd";
+               sb_nr = SB_NR_OPEN_RD, ext_func = "fopen_rd";
        else
-               sb_nr = SB_NR_OPEN_WR, ext_func = "open_wr";
+               sb_nr = SB_NR_OPEN_WR, ext_func = "fopen_wr";
        return before_syscall(dirfd, sb_nr, ext_func, file, 0);
 }
 

Reply via email to