From 93f6aa85cfe69ad0bbf7d6e8ae9b6d2e96c507d7 Mon Sep 17 00:00:00 2001 From: smitsohu Date: Tue, 25 Aug 2020 20:31:03 +0200 Subject: cat fixes --- src/firejail/sandbox.c | 9 +++++++-- src/firemon/procevent.c | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/firejail/sandbox.c b/src/firejail/sandbox.c index 81d535762..0965b1017 100644 --- a/src/firejail/sandbox.c +++ b/src/firejail/sandbox.c @@ -148,8 +148,13 @@ void seccomp_debug(void) { EUID_USER(); printf("Seccomp directory:\n"); ls(RUN_SECCOMP_DIR); - printf("Active seccomp files:\n"); - cat(RUN_SECCOMP_LIST); + struct stat s; + if (stat(RUN_SECCOMP_LIST, &s) == 0) { + printf("Active seccomp files:\n"); + cat(RUN_SECCOMP_LIST); + } + else + printf("No active seccomp files\n"); EUID_ROOT(); } #endif diff --git a/src/firemon/procevent.c b/src/firemon/procevent.c index 45964d3a2..b64b6210d 100644 --- a/src/firemon/procevent.c +++ b/src/firemon/procevent.c @@ -100,7 +100,7 @@ static int pid_is_firejail(pid_t pid) { // debug "debug-caps", "debug-errnos", "debug-protocols", "debug-syscalls", "debug-syscalls32", // file transfer - "ls", "get", "put", + "ls", "get", "put", "cat", // stats "tree", "list", "top", // network -- cgit v1.2.3-54-g00ecf