From 18e806cf6033697cefca58a2be55377c8d92dbd4 Mon Sep 17 00:00:00 2001 From: smitsohu Date: Mon, 4 Jan 2021 18:48:35 +0100 Subject: non-dumpable plugins (hopefully) fixes the issues that led to reverting commits 6abb65d328af61d67361890743190bd4c57f8e3c and 98e42dc6da4e4b1e47ed2aa020012d4dedc1e80e --- src/fseccomp/Makefile.in | 4 ++-- src/fseccomp/fseccomp.h | 1 - src/fseccomp/main.c | 6 +----- 3 files changed, 3 insertions(+), 8 deletions(-) (limited to 'src/fseccomp') diff --git a/src/fseccomp/Makefile.in b/src/fseccomp/Makefile.in index 8623db6f8..b776a73ce 100644 --- a/src/fseccomp/Makefile.in +++ b/src/fseccomp/Makefile.in @@ -5,8 +5,8 @@ include ../common.mk %.o : %.c $(H_FILE_LIST) ../include/common.h ../include/syscall.h $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDE) -c $< -o $@ -fseccomp: $(OBJS) ../lib/errno.o ../lib/syscall.o - $(CC) $(LDFLAGS) -o $@ $(OBJS) ../lib/errno.o ../lib/syscall.o $(LIBS) $(EXTRA_LDFLAGS) +fseccomp: $(OBJS) ../lib/common.o ../lib/errno.o ../lib/syscall.o + $(CC) $(LDFLAGS) -o $@ $(OBJS) ../lib/common.o ../lib/errno.o ../lib/syscall.o $(LIBS) $(EXTRA_LDFLAGS) clean:; rm -fr *.o fseccomp *.gcov *.gcda *.gcno *.plist diff --git a/src/fseccomp/fseccomp.h b/src/fseccomp/fseccomp.h index e40999938..e8dd083b6 100644 --- a/src/fseccomp/fseccomp.h +++ b/src/fseccomp/fseccomp.h @@ -23,7 +23,6 @@ #include #include #include -#include #include "../include/common.h" #include "../include/syscall.h" diff --git a/src/fseccomp/main.c b/src/fseccomp/main.c index f505ca0f3..c8259b079 100644 --- a/src/fseccomp/main.c +++ b/src/fseccomp/main.c @@ -69,11 +69,7 @@ printf("\n"); return 0; } -#ifdef WARN_DUMPABLE - // check FIREJAIL_PLUGIN in order to not print a warning during make - if (prctl(PR_GET_DUMPABLE, 0, 0, 0, 0) == 1 && getuid() && getenv("FIREJAIL_PLUGIN")) - fprintf(stderr, "Error fseccomp: I am dumpable\n"); -#endif + warn_dumpable(); char *quiet = getenv("FIREJAIL_QUIET"); if (quiet && strcmp(quiet, "yes") == 0) -- cgit v1.2.3-54-g00ecf