aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar startx2017 <vradu.startx@protonmail.com>2021-02-28 10:26:08 -0500
committerLibravatar startx2017 <vradu.startx@protonmail.com>2021-02-28 10:26:08 -0500
commitd1acb31c9714fe503082a890f1754f2026e71ee5 (patch)
tree1946a929c6c7bcc47bc04e1b988966d60f364b48
parentcompile time: disable --output (diff)
downloadfirejail-d1acb31c9714fe503082a890f1754f2026e71ee5.tar.gz
firejail-d1acb31c9714fe503082a890f1754f2026e71ee5.tar.zst
firejail-d1acb31c9714fe503082a890f1754f2026e71ee5.zip
compile time: enable LTS
-rwxr-xr-xconfigure100
-rw-r--r--configure.ac86
-rw-r--r--src/common.mk.in3
-rw-r--r--src/man/firejail.txt9
4 files changed, 178 insertions, 20 deletions
diff --git a/configure b/configure
index fc8048ffb..952f7af9b 100755
--- a/configure
+++ b/configure
@@ -627,7 +627,7 @@ LIBOBJS
627EGREP 627EGREP
628GREP 628GREP
629CPP 629CPP
630HAVE_SELINUX 630HAVE_LTS
631HAVE_CONTRIB_INSTALL 631HAVE_CONTRIB_INSTALL
632HAVE_GCOV 632HAVE_GCOV
633BUSYBOX_WORKAROUND 633BUSYBOX_WORKAROUND
@@ -650,6 +650,7 @@ HAVE_OVERLAYFS
650HAVE_DBUSPROXY 650HAVE_DBUSPROXY
651EXTRA_LDFLAGS 651EXTRA_LDFLAGS
652EXTRA_CFLAGS 652EXTRA_CFLAGS
653HAVE_SELINUX
653HAVE_APPARMOR 654HAVE_APPARMOR
654AA_LIBS 655AA_LIBS
655AA_CFLAGS 656AA_CFLAGS
@@ -711,6 +712,7 @@ ac_user_opts='
711enable_option_checking 712enable_option_checking
712enable_analyzer 713enable_analyzer
713enable_apparmor 714enable_apparmor
715enable_selinux
714enable_dbusproxy 716enable_dbusproxy
715enable_output 717enable_output
716enable_usertmpfs 718enable_usertmpfs
@@ -729,7 +731,7 @@ enable_fatal_warnings
729enable_busybox_workaround 731enable_busybox_workaround
730enable_gcov 732enable_gcov
731enable_contrib_install 733enable_contrib_install
732enable_selinux 734enable_lts
733' 735'
734 ac_precious_vars='build_alias 736 ac_precious_vars='build_alias
735host_alias 737host_alias
@@ -1367,6 +1369,7 @@ Optional Features:
1367 --enable-FEATURE[=ARG] include FEATURE [ARG=yes] 1369 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1368 --enable-analyzer enable GCC 10 static analyzer 1370 --enable-analyzer enable GCC 10 static analyzer
1369 --enable-apparmor enable apparmor 1371 --enable-apparmor enable apparmor
1372 --enable-selinux SELinux labeling support
1370 --disable-dbusproxy disable dbus proxy 1373 --disable-dbusproxy disable dbus proxy
1371 --disable-output disable --output logging 1374 --disable-output disable --output logging
1372 --disable-usertmpfs disable tmpfs as regular user 1375 --disable-usertmpfs disable tmpfs as regular user
@@ -1388,7 +1391,7 @@ Optional Features:
1388 --enable-gcov Gcov instrumentation 1391 --enable-gcov Gcov instrumentation
1389 --enable-contrib-install 1392 --enable-contrib-install
1390 install contrib scripts 1393 install contrib scripts
1391 --enable-selinux SELinux labeling support 1394 --enable-lts enable long-term support software version (LTS)
1392 1395
1393Some influential environment variables: 1396Some influential environment variables:
1394 CC C compiler command 1397 CC C compiler command
@@ -3514,6 +3517,20 @@ fi
3514 3517
3515fi 3518fi
3516 3519
3520HAVE_SELINUX=""
3521# Check whether --enable-selinux was given.
3522if test "${enable_selinux+set}" = set; then :
3523 enableval=$enable_selinux;
3524fi
3525
3526if test "x$enable_selinux" = "xyes"; then :
3527
3528 HAVE_SELINUX="-DHAVE_SELINUX"
3529 EXTRA_LDFLAGS+=" -lselinux "
3530
3531
3532fi
3533
3517 3534
3518 3535
3519 3536
@@ -3808,20 +3825,67 @@ else
3808fi 3825fi
3809 3826
3810 3827
3811HAVE_SELINUX="" 3828HAVE_LTS=""
3812# Check whether --enable-selinux was given. 3829# Check whether --enable-lts was given.
3813if test "${enable_selinux+set}" = set; then : 3830if test "${enable_lts+set}" = set; then :
3814 enableval=$enable_selinux; 3831 enableval=$enable_lts;
3815fi 3832fi
3816 3833
3817if test "x$enable_selinux" = "xyes"; then : 3834if test "x$enable_lts" = "xyes"; then :
3835
3836 HAVE_LTS="-DHAVE_LTS"
3837
3838
3839 HAVE_DBUSPROXY=""
3840
3841
3842 HAVE_OVERLAYFS=""
3843
3844
3845 HAVE_OUTPUT=""
3818 3846
3819 HAVE_SELINUX="-DHAVE_SELINUX" 3847
3820 EXTRA_LDFLAGS+=" -lselinux " 3848 HAVE_USERTMPFS=""
3849
3850
3851 HAVE_MAN="-DHAVE_MAN"
3852
3853
3854 HAVE_FIRETUNNEL=""
3855
3856
3857 HAVE_PRIVATEHOME=""
3858
3859
3860 HAVE_CHROOT=""
3861
3862
3863 HAVE_GLOBALCFG=""
3864
3865
3866 HAVE_USERNS=""
3867
3868
3869 HAVE_X11=""
3870
3871
3872 HAVE_FILE_TRANSFER=""
3873
3874
3875 HAVE_SUID="yes"
3876
3877
3878 BUSYBOX_WORKAROUND="no"
3879
3880
3881 HAVE_CONTRIB_INSTALL="no",
3821 3882
3822 3883
3823fi 3884fi
3824 3885
3886
3887
3888
3825# checking pthread library 3889# checking pthread library
3826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lpthread" >&5 3890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lpthread" >&5
3827$as_echo_n "checking for main in -lpthread... " >&6; } 3891$as_echo_n "checking for main in -lpthread... " >&6; }
@@ -5485,6 +5549,7 @@ echo "Configuration options:"
5485echo " prefix: $prefix" 5549echo " prefix: $prefix"
5486echo " sysconfdir: $sysconfdir" 5550echo " sysconfdir: $sysconfdir"
5487echo " apparmor: $HAVE_APPARMOR" 5551echo " apparmor: $HAVE_APPARMOR"
5552echo " SELinux labeling support: $HAVE_SELINUX"
5488echo " global config: $HAVE_GLOBALCFG" 5553echo " global config: $HAVE_GLOBALCFG"
5489echo " chroot: $HAVE_CHROOT" 5554echo " chroot: $HAVE_CHROOT"
5490echo " network: $HAVE_NETWORK" 5555echo " network: $HAVE_NETWORK"
@@ -5506,6 +5571,19 @@ echo " EXTRA_CFLAGS: $EXTRA_CFLAGS"
5506echo " fatal warnings: $HAVE_FATAL_WARNINGS" 5571echo " fatal warnings: $HAVE_FATAL_WARNINGS"
5507echo " Gcov instrumentation: $HAVE_GCOV" 5572echo " Gcov instrumentation: $HAVE_GCOV"
5508echo " Install contrib scripts: $HAVE_CONTRIB_INSTALL" 5573echo " Install contrib scripts: $HAVE_CONTRIB_INSTALL"
5509echo " SELinux labeling support: $HAVE_SELINUX"
5510echo " Install as a SUID executable: $HAVE_SUID" 5574echo " Install as a SUID executable: $HAVE_SUID"
5575echo " LTS: $HAVE_LTS"
5511echo 5576echo
5577
5578
5579if test "$HAVE_LTS" = -DHAVE_LTS; then
5580 echo
5581 echo
5582 echo "*********************************************************"
5583 echo "* Warning: Long-term support (LTS) was enabled! *"
5584 echo "* Most compile-time options have bean rewritten! *"
5585 echo "*********************************************************"
5586 echo
5587 echo
5588fi
5589
diff --git a/configure.ac b/configure.ac
index 0556da374..449b8b436 100644
--- a/configure.ac
+++ b/configure.ac
@@ -54,6 +54,15 @@ AS_IF([test "x$enable_apparmor" = "xyes"], [
54 AC_SUBST(HAVE_APPARMOR) 54 AC_SUBST(HAVE_APPARMOR)
55]) 55])
56 56
57HAVE_SELINUX=""
58AC_ARG_ENABLE([selinux],
59 AS_HELP_STRING([--enable-selinux], [SELinux labeling support]))
60AS_IF([test "x$enable_selinux" = "xyes"], [
61 HAVE_SELINUX="-DHAVE_SELINUX"
62 EXTRA_LDFLAGS+=" -lselinux "
63 AC_SUBST(HAVE_SELINUX)
64])
65
57AC_SUBST([EXTRA_CFLAGS]) 66AC_SUBST([EXTRA_CFLAGS])
58AC_SUBST([EXTRA_LDFLAGS]) 67AC_SUBST([EXTRA_LDFLAGS])
59 68
@@ -219,15 +228,62 @@ AS_IF([test "x$enable_contrib_install" = "xno"],
219) 228)
220AC_SUBST(HAVE_CONTRIB_INSTALL) 229AC_SUBST(HAVE_CONTRIB_INSTALL)
221 230
222HAVE_SELINUX="" 231HAVE_LTS=""
223AC_ARG_ENABLE([selinux], 232AC_ARG_ENABLE([lts],
224 AS_HELP_STRING([--enable-selinux], [SELinux labeling support])) 233 AS_HELP_STRING([--enable-lts], [enable long-term support software version (LTS)]))
225AS_IF([test "x$enable_selinux" = "xyes"], [ 234AS_IF([test "x$enable_lts" = "xyes"], [
226 HAVE_SELINUX="-DHAVE_SELINUX" 235 HAVE_LTS="-DHAVE_LTS"
227 EXTRA_LDFLAGS+=" -lselinux " 236 AC_SUBST(HAVE_LTS)
228 AC_SUBST(HAVE_SELINUX) 237
238 HAVE_DBUSPROXY=""
239 AC_SUBST(HAVE_DBUSPROXY)
240
241 HAVE_OVERLAYFS=""
242 AC_SUBST(HAVE_OVERLAYFS)
243
244 HAVE_OUTPUT=""
245 AC_SUBST(HAVE_OUTPUT)
246
247 HAVE_USERTMPFS=""
248 AC_SUBST(HAVE_USERTMPFS)
249
250 HAVE_MAN="-DHAVE_MAN"
251 AC_SUBST(HAVE_MAN)
252
253 HAVE_FIRETUNNEL=""
254 AC_SUBST(HAVE_FIRETUNNEL)
255
256 HAVE_PRIVATEHOME=""
257 AC_SUBST(HAVE_PRIVATE_HOME)
258
259 HAVE_CHROOT=""
260 AC_SUBST(HAVE_CHROOT)
261
262 HAVE_GLOBALCFG=""
263 AC_SUBST(HAVE_GLOBALCFG)
264
265 HAVE_USERNS=""
266 AC_SUBST(HAVE_USERNS)
267
268 HAVE_X11=""
269 AC_SUBST(HAVE_X11)
270
271 HAVE_FILE_TRANSFER=""
272 AC_SUBST(HAVE_FILE_TRANSFER)
273
274 HAVE_SUID="yes"
275 AC_SUBST(HAVE_SUID)
276
277 BUSYBOX_WORKAROUND="no"
278 AC_SUBST(BUSYBOX_WORKAROUND)
279
280 HAVE_CONTRIB_INSTALL="no",
281 AC_SUBST(HAVE_CONTRIB_INSTALL)
229]) 282])
230 283
284
285
286
231# checking pthread library 287# checking pthread library
232AC_CHECK_LIB([pthread], [main], [], AC_MSG_ERROR([*** POSIX thread support not installed ***])) 288AC_CHECK_LIB([pthread], [main], [], AC_MSG_ERROR([*** POSIX thread support not installed ***]))
233AC_CHECK_HEADER(pthread.h,,AC_MSG_ERROR([*** POSIX thread support not installed ***])) 289AC_CHECK_HEADER(pthread.h,,AC_MSG_ERROR([*** POSIX thread support not installed ***]))
@@ -250,6 +306,7 @@ echo "Configuration options:"
250echo " prefix: $prefix" 306echo " prefix: $prefix"
251echo " sysconfdir: $sysconfdir" 307echo " sysconfdir: $sysconfdir"
252echo " apparmor: $HAVE_APPARMOR" 308echo " apparmor: $HAVE_APPARMOR"
309echo " SELinux labeling support: $HAVE_SELINUX"
253echo " global config: $HAVE_GLOBALCFG" 310echo " global config: $HAVE_GLOBALCFG"
254echo " chroot: $HAVE_CHROOT" 311echo " chroot: $HAVE_CHROOT"
255echo " network: $HAVE_NETWORK" 312echo " network: $HAVE_NETWORK"
@@ -271,6 +328,19 @@ echo " EXTRA_CFLAGS: $EXTRA_CFLAGS"
271echo " fatal warnings: $HAVE_FATAL_WARNINGS" 328echo " fatal warnings: $HAVE_FATAL_WARNINGS"
272echo " Gcov instrumentation: $HAVE_GCOV" 329echo " Gcov instrumentation: $HAVE_GCOV"
273echo " Install contrib scripts: $HAVE_CONTRIB_INSTALL" 330echo " Install contrib scripts: $HAVE_CONTRIB_INSTALL"
274echo " SELinux labeling support: $HAVE_SELINUX"
275echo " Install as a SUID executable: $HAVE_SUID" 331echo " Install as a SUID executable: $HAVE_SUID"
332echo " LTS: $HAVE_LTS"
276echo 333echo
334
335
336if test "$HAVE_LTS" = -DHAVE_LTS; then
337 echo
338 echo
339 echo "*********************************************************"
340 echo "* Warning: Long-term support (LTS) was enabled! *"
341 echo "* Most compile-time options have bean rewritten! *"
342 echo "*********************************************************"
343 echo
344 echo
345fi
346
diff --git a/src/common.mk.in b/src/common.mk.in
index 77d8539ef..eae4138c0 100644
--- a/src/common.mk.in
+++ b/src/common.mk.in
@@ -26,6 +26,7 @@ HAVE_SELINUX=@HAVE_SELINUX@
26HAVE_DBUSPROXY=@HAVE_DBUSPROXY@ 26HAVE_DBUSPROXY=@HAVE_DBUSPROXY@
27HAVE_USERTMPFS=@HAVE_USERTMPFS@ 27HAVE_USERTMPFS=@HAVE_USERTMPFS@
28HAVE_OUTPUT=@HAVE_OUTPUT@ 28HAVE_OUTPUT=@HAVE_OUTPUT@
29HAVE_LTS=@HAVE_LTS@
29 30
30H_FILE_LIST = $(sort $(wildcard *.[h])) 31H_FILE_LIST = $(sort $(wildcard *.[h]))
31C_FILE_LIST = $(sort $(wildcard *.c)) 32C_FILE_LIST = $(sort $(wildcard *.c))
@@ -35,7 +36,7 @@ BINOBJS = $(foreach file, $(OBJS), $file)
35CFLAGS = @CFLAGS@ 36CFLAGS = @CFLAGS@
36CFLAGS += -ggdb $(HAVE_FATAL_WARNINGS) -O2 -DVERSION='"$(VERSION)"' $(HAVE_GCOV) 37CFLAGS += -ggdb $(HAVE_FATAL_WARNINGS) -O2 -DVERSION='"$(VERSION)"' $(HAVE_GCOV)
37CFLAGS += -DPREFIX='"$(prefix)"' -DSYSCONFDIR='"$(sysconfdir)/firejail"' -DLIBDIR='"$(libdir)"' -DBINDIR='"$(bindir)"' 38CFLAGS += -DPREFIX='"$(prefix)"' -DSYSCONFDIR='"$(sysconfdir)/firejail"' -DLIBDIR='"$(libdir)"' -DBINDIR='"$(bindir)"'
38MANFLAGS = $(HAVE_OUTPUT) $(HAVE_X11) $(HAVE_PRIVATE_HOME) $(HAVE_APPARMOR) $(HAVE_OVERLAYFS) $(HAVE_USERTMPFS) $(HAVE_DBUSPROXY) $(HAVE_FIRETUNNEL) $(HAVE_GLOBALCFG) $(HAVE_CHROOT) $(HAVE_NETWORK) $(HAVE_USERNS) $(HAVE_FILE_TRANSFER) $(HAVE_WHITELIST) $(HAVE_SELINUX) 39MANFLAGS = $(HAVE_LTS) $(HAVE_OUTPUT) $(HAVE_X11) $(HAVE_PRIVATE_HOME) $(HAVE_APPARMOR) $(HAVE_OVERLAYFS) $(HAVE_USERTMPFS) $(HAVE_DBUSPROXY) $(HAVE_FIRETUNNEL) $(HAVE_GLOBALCFG) $(HAVE_CHROOT) $(HAVE_NETWORK) $(HAVE_USERNS) $(HAVE_FILE_TRANSFER) $(HAVE_WHITELIST) $(HAVE_SELINUX)
39CFLAGS += $(MANFLAGS) 40CFLAGS += $(MANFLAGS)
40CFLAGS += -fstack-protector-all -D_FORTIFY_SOURCE=2 -fPIE -Wformat -Wformat-security 41CFLAGS += -fstack-protector-all -D_FORTIFY_SOURCE=2 -fPIE -Wformat -Wformat-security
41LDFLAGS += -pie -fPIE -Wl,-z,relro -Wl,-z,now -lpthread 42LDFLAGS += -pie -fPIE -Wl,-z,relro -Wl,-z,now -lpthread
diff --git a/src/man/firejail.txt b/src/man/firejail.txt
index b251f8191..639b171cd 100644
--- a/src/man/firejail.txt
+++ b/src/man/firejail.txt
@@ -42,6 +42,15 @@ Miscellaneous:
42firejail {\-? | \-\-debug-caps | \-\-debug-errnos | \-\-debug-syscalls | \-\-debug-syscalls32 | \-\-debug-protocols | \-\-help | \-\-version} 42firejail {\-? | \-\-debug-caps | \-\-debug-errnos | \-\-debug-syscalls | \-\-debug-syscalls32 | \-\-debug-protocols | \-\-help | \-\-version}
43.RE 43.RE
44.SH DESCRIPTION 44.SH DESCRIPTION
45#ifdef HAVE_LTS
46This is Firejail long-term support (LTS), an enterprise focused version of the software,
47LTS is usually supported for two or three years.
48During this time only bugs and the occasional documentation problems are fixed.
49The attack surface of the SUID executable was greatly reduced by removing some of the features.
50.br
51
52.br
53#endif
45Firejail is a SUID sandbox program that reduces the risk of security breaches by 54Firejail is a SUID sandbox program that reduces the risk of security breaches by
46restricting the running environment of untrusted applications using Linux 55restricting the running environment of untrusted applications using Linux
47namespaces, seccomp-bpf and Linux capabilities. 56namespaces, seccomp-bpf and Linux capabilities.