diff options
author | 2016-03-12 08:29:58 -0500 | |
---|---|---|
committer | 2016-03-12 08:29:58 -0500 | |
commit | 3a42337a9acf9a882f0367a8b1ab7d430fac3f8b (patch) | |
tree | 477118e3b31a36ef77e4a4508057448b5a02c2d9 /src | |
parent | profile update (diff) | |
download | firejail-3a42337a9acf9a882f0367a8b1ab7d430fac3f8b.tar.gz firejail-3a42337a9acf9a882f0367a8b1ab7d430fac3f8b.tar.zst firejail-3a42337a9acf9a882f0367a8b1ab7d430fac3f8b.zip |
compile time support to disable file transfer
Diffstat (limited to 'src')
-rw-r--r-- | src/firejail/Makefile.in | 3 | ||||
-rw-r--r-- | src/firejail/main.c | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/firejail/Makefile.in b/src/firejail/Makefile.in index ba6bda0a5..3ad4ba75e 100644 --- a/src/firejail/Makefile.in +++ b/src/firejail/Makefile.in | |||
@@ -15,13 +15,14 @@ HAVE_FATAL_WARNINGS=@HAVE_FATAL_WARNINGS@ | |||
15 | HAVE_NETWORK=@HAVE_NETWORK@ | 15 | HAVE_NETWORK=@HAVE_NETWORK@ |
16 | HAVE_USERNS=@HAVE_USERNS@ | 16 | HAVE_USERNS=@HAVE_USERNS@ |
17 | HAVE_X11=@HAVE_X11@ | 17 | HAVE_X11=@HAVE_X11@ |
18 | HAVE_FILE_TRANSFER=@HAVE_FILE_TRANSFER@ | ||
18 | 19 | ||
19 | 20 | ||
20 | H_FILE_LIST = $(sort $(wildcard *.[h])) | 21 | H_FILE_LIST = $(sort $(wildcard *.[h])) |
21 | C_FILE_LIST = $(sort $(wildcard *.c)) | 22 | C_FILE_LIST = $(sort $(wildcard *.c)) |
22 | OBJS = $(C_FILE_LIST:.c=.o) | 23 | OBJS = $(C_FILE_LIST:.c=.o) |
23 | BINOBJS = $(foreach file, $(OBJS), $file) | 24 | BINOBJS = $(foreach file, $(OBJS), $file) |
24 | CFLAGS += -ggdb $(HAVE_FATAL_WARNINGS) -O2 -DVERSION='"$(VERSION)"' -DPREFIX='"$(prefix)"' -DSYSCONFDIR='"$(sysconfdir)/firejail"' -DLIBDIR='"$(libdir)"' $(HAVE_X11) $(HAVE_SECCOMP) $(HAVE_SECCOMP_H) $(HAVE_CHROOT) $(HAVE_NETWORK) $(HAVE_USERNS) $(HAVE_BIND) -fstack-protector-all -D_FORTIFY_SOURCE=2 -fPIE -pie -Wformat -Wformat-security | 25 | CFLAGS += -ggdb $(HAVE_FATAL_WARNINGS) -O2 -DVERSION='"$(VERSION)"' -DPREFIX='"$(prefix)"' -DSYSCONFDIR='"$(sysconfdir)/firejail"' -DLIBDIR='"$(libdir)"' $(HAVE_X11) $(HAVE_SECCOMP) $(HAVE_SECCOMP_H) $(HAVE_CHROOT) $(HAVE_NETWORK) $(HAVE_USERNS) $(HAVE_BIND) $(HAVE_FILE_TRANSFER) -fstack-protector-all -D_FORTIFY_SOURCE=2 -fPIE -pie -Wformat -Wformat-security |
25 | LDFLAGS += -pie -Wl,-z,relro -Wl,-z,now -lpthread | 26 | LDFLAGS += -pie -Wl,-z,relro -Wl,-z,now -lpthread |
26 | 27 | ||
27 | %.o : %.c $(H_FILE_LIST) ../include/common.h ../include/euid_common.h ../include/libnetlink.h ../include/pid.h | 28 | %.o : %.c $(H_FILE_LIST) ../include/common.h ../include/euid_common.h ../include/libnetlink.h ../include/pid.h |
diff --git a/src/firejail/main.c b/src/firejail/main.c index 2c6b5a5e1..bfb0eadc9 100644 --- a/src/firejail/main.c +++ b/src/firejail/main.c | |||
@@ -271,6 +271,9 @@ static void run_cmd_and_exit(int i, int argc, char **argv) { | |||
271 | #ifndef HAVE_X11 | 271 | #ifndef HAVE_X11 |
272 | printf("X11 support is disabled.\n"); | 272 | printf("X11 support is disabled.\n"); |
273 | #endif | 273 | #endif |
274 | #ifndef HAVE_FILE_TRANSFER | ||
275 | printf("File transfer support is disabled.\n"); | ||
276 | #endif | ||
274 | exit(0); | 277 | exit(0); |
275 | } | 278 | } |
276 | #ifdef HAVE_X11 | 279 | #ifdef HAVE_X11 |
@@ -426,6 +429,7 @@ static void run_cmd_and_exit(int i, int argc, char **argv) { | |||
426 | exit(0); | 429 | exit(0); |
427 | } | 430 | } |
428 | #endif | 431 | #endif |
432 | #ifndef HAVE_FILE_TRANSFER | ||
429 | else if (strncmp(argv[i], "--get=", 6) == 0) { | 433 | else if (strncmp(argv[i], "--get=", 6) == 0) { |
430 | logargs(argc, argv); | 434 | logargs(argc, argv); |
431 | 435 | ||
@@ -472,6 +476,7 @@ static void run_cmd_and_exit(int i, int argc, char **argv) { | |||
472 | sandboxfs_name(SANDBOX_FS_LS, argv[i] + 5, path); | 476 | sandboxfs_name(SANDBOX_FS_LS, argv[i] + 5, path); |
473 | exit(0); | 477 | exit(0); |
474 | } | 478 | } |
479 | #endif | ||
475 | else if (strncmp(argv[i], "--join=", 7) == 0) { | 480 | else if (strncmp(argv[i], "--join=", 7) == 0) { |
476 | logargs(argc, argv); | 481 | logargs(argc, argv); |
477 | 482 | ||