Gentoo Archives: gentoo-commits

From: Mike Frysinger <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sandbox:master commit in: libsandbox/
Date: Sun, 20 Sep 2015 08:15:39
Message-Id: 1442734054.efb6ac30fb0d39cbd5f801c6d251b14ed5f5a7d6.vapier@gentoo
1 commit: efb6ac30fb0d39cbd5f801c6d251b14ed5f5a7d6
2 Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
3 AuthorDate: Sun Sep 20 07:27:34 2015 +0000
4 Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
5 CommitDate: Sun Sep 20 07:27:34 2015 +0000
6 URL: https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=efb6ac30
7
8 libsandbox: improve debugging output a bit
9
10 Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>
11
12 libsandbox/libsandbox.c | 6 ++++--
13 1 file changed, 4 insertions(+), 2 deletions(-)
14
15 diff --git a/libsandbox/libsandbox.c b/libsandbox/libsandbox.c
16 index 57be731..1d9fa04 100644
17 --- a/libsandbox/libsandbox.c
18 +++ b/libsandbox/libsandbox.c
19 @@ -912,6 +912,8 @@ static int check_syscall(sbcontext_t *sbcontext, int sb_nr, const char *func,
20 resolved_path = resolve_path(file, 1);
21 if (!absolute_path || !resolved_path)
22 goto error;
23 + sb_debug_dyn("absolute_path: %s\n", absolute_path);
24 + sb_debug_dyn("resolved_path: %s\n", resolved_path);
25
26 verbose = is_env_set_on(ENV_SANDBOX_VERBOSE, &set);
27 if (set)
28 @@ -1098,9 +1100,9 @@ bool before_syscall_open_char(int dirfd, int sb_nr, const char *func, const char
29 if ((*mode == 'r') && ((0 == (strcmp(mode, "r"))) ||
30 /* The strspn accept args are known non-writable modifiers */
31 (strlen(mode+1) == strspn(mode+1, "xbtmce"))))
32 - sb_nr = SB_NR_OPEN_RD, ext_func = "open_rd";
33 + sb_nr = SB_NR_OPEN_RD, ext_func = "fopen_rd";
34 else
35 - sb_nr = SB_NR_OPEN_WR, ext_func = "open_wr";
36 + sb_nr = SB_NR_OPEN_WR, ext_func = "fopen_wr";
37 return before_syscall(dirfd, sb_nr, ext_func, file, 0);
38 }