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/fnet/Makefile.in | 4 ++-- src/fnet/main.c | 8 +++----- 2 files changed, 5 insertions(+), 7 deletions(-) (limited to 'src/fnet') diff --git a/src/fnet/Makefile.in b/src/fnet/Makefile.in index 37566db72..bd5fe9e7a 100644 --- a/src/fnet/Makefile.in +++ b/src/fnet/Makefile.in @@ -5,8 +5,8 @@ include ../common.mk %.o : %.c $(H_FILE_LIST) ../include/common.h ../include/libnetlink.h $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDE) -c $< -o $@ -fnet: $(OBJS) ../lib/libnetlink.o - $(CC) $(LDFLAGS) -o $@ $(OBJS) ../lib/libnetlink.o $(LIBS) $(EXTRA_LDFLAGS) +fnet: $(OBJS) ../lib/common.o ../lib/libnetlink.o + $(CC) $(LDFLAGS) -o $@ $(OBJS) ../lib/common.o ../lib/libnetlink.o $(LIBS) $(EXTRA_LDFLAGS) clean:; rm -fr *.o fnet *.gcov *.gcda *.gcno *.plist diff --git a/src/fnet/main.c b/src/fnet/main.c index f6316a7fe..db090fb95 100644 --- a/src/fnet/main.c +++ b/src/fnet/main.c @@ -21,7 +21,6 @@ #include #include #include -#include int arg_quiet = 0; @@ -69,10 +68,9 @@ printf("\n"); usage(); return 0; } -#ifdef WARN_DUMPABLE - if (prctl(PR_GET_DUMPABLE, 0, 0, 0, 0) == 1 && getuid()) - fprintf(stderr, "Error fnet: I am dumpable\n"); -#endif + + warn_dumpable(); + char *quiet = getenv("FIREJAIL_QUIET"); if (quiet && strcmp(quiet, "yes") == 0) arg_quiet = 1; -- cgit v1.2.3-54-g00ecf