diff options
| author | Daniel Golle | 2021-01-04 21:52:33 +0000 |
|---|---|---|
| committer | Daniel Golle | 2021-02-02 12:54:00 +0000 |
| commit | 0a74c067f9d1d17a82ac10ff2f86596a887a41aa (patch) | |
| tree | c2177ae609b27f329e2eae78fe55b65ce91aabda | |
| parent | 92c8e8f3c6ae548d69e0cd8c5eefe497049115ab (diff) | |
| download | procd-0a74c067f9d1d17a82ac10ff2f86596a887a41aa.tar.gz | |
jail: only output BPF instr. table header if debugging
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
| -rw-r--r-- | jail/seccomp-oci.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/jail/seccomp-oci.c b/jail/seccomp-oci.c index e85191e..f089ac6 100644 --- a/jail/seccomp-oci.c +++ b/jail/seccomp-oci.c @@ -407,14 +407,15 @@ struct sock_fprog *parseOCIlinuxseccomp(struct blob_attr *msg) prog->filter = filter; DEBUG("generated seccomp-bpf program:\n"); - fprintf(stderr, " [idx]\tcode\t jt\t jf\tk\n"); - if (debug) + if (debug) { + fprintf(stderr, " [idx]\tcode\t jt\t jf\tk\n"); for (idx=0; idx<sz; idx++) fprintf(stderr, " [%03d]\t%04hx\t%3hhu\t%3hhu\t%08x\n", idx, filter[idx].code, filter[idx].jt, filter[idx].jf, filter[idx].k); + } return prog; |