aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-03-12 08:29:58 -0500
committerLibravatar netblue30 <netblue30@yahoo.com>2016-03-12 08:29:58 -0500
commit3a42337a9acf9a882f0367a8b1ab7d430fac3f8b (patch)
tree477118e3b31a36ef77e4a4508057448b5a02c2d9 /src
parentprofile update (diff)
downloadfirejail-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.in3
-rw-r--r--src/firejail/main.c5
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@
15HAVE_NETWORK=@HAVE_NETWORK@ 15HAVE_NETWORK=@HAVE_NETWORK@
16HAVE_USERNS=@HAVE_USERNS@ 16HAVE_USERNS=@HAVE_USERNS@
17HAVE_X11=@HAVE_X11@ 17HAVE_X11=@HAVE_X11@
18HAVE_FILE_TRANSFER=@HAVE_FILE_TRANSFER@
18 19
19 20
20H_FILE_LIST = $(sort $(wildcard *.[h])) 21H_FILE_LIST = $(sort $(wildcard *.[h]))
21C_FILE_LIST = $(sort $(wildcard *.c)) 22C_FILE_LIST = $(sort $(wildcard *.c))
22OBJS = $(C_FILE_LIST:.c=.o) 23OBJS = $(C_FILE_LIST:.c=.o)
23BINOBJS = $(foreach file, $(OBJS), $file) 24BINOBJS = $(foreach file, $(OBJS), $file)
24CFLAGS += -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 25CFLAGS += -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
25LDFLAGS += -pie -Wl,-z,relro -Wl,-z,now -lpthread 26LDFLAGS += -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