aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@protonmail.com>2023-10-24 12:43:46 -0400
committerLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2023-11-07 17:55:13 -0300
commit13b2c566df883269b55f77757bb50a5d2890ec20 (patch)
tree5c7ccc9d00886b93c4429a91671161fa6464f1f9 /configure
parentcleanup (diff)
downloadfirejail-13b2c566df883269b55f77757bb50a5d2890ec20.tar.gz
firejail-13b2c566df883269b55f77757bb50a5d2890ec20.tar.zst
firejail-13b2c566df883269b55f77757bb50a5d2890ec20.zip
feature: add Landlock support
Based on 5315 by ChrysoliteAzalea. It is based on the same underlying structure, but with a lot of refactoring/simplification and with bugfixes and improvements. Co-authored-by: Kelvin M. Klann <kmk3.code@protonmail.com> Co-authored-by: Азалия Смарагдова <charming.flurry@yandex.ru>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure86
1 files changed, 57 insertions, 29 deletions
diff --git a/configure b/configure
index 54b9d4da3..8c2d3b894 100755
--- a/configure
+++ b/configure
@@ -675,6 +675,7 @@ HAVE_OVERLAYFS
675HAVE_DBUSPROXY 675HAVE_DBUSPROXY
676EXTRA_LDFLAGS 676EXTRA_LDFLAGS
677EXTRA_CFLAGS 677EXTRA_CFLAGS
678HAVE_LANDLOCK
678HAVE_SELINUX 679HAVE_SELINUX
679AA_LIBS 680AA_LIBS
680AA_CFLAGS 681AA_CFLAGS
@@ -737,6 +738,7 @@ enable_sanitizer
737enable_ids 738enable_ids
738enable_apparmor 739enable_apparmor
739enable_selinux 740enable_selinux
741enable_landlock
740enable_dbusproxy 742enable_dbusproxy
741enable_output 743enable_output
742enable_usertmpfs 744enable_usertmpfs
@@ -1396,6 +1398,7 @@ Optional Features:
1396 --enable-ids enable ids 1398 --enable-ids enable ids
1397 --enable-apparmor enable apparmor 1399 --enable-apparmor enable apparmor
1398 --enable-selinux SELinux labeling support 1400 --enable-selinux SELinux labeling support
1401 --enable-landlock Landlock self-restriction support
1399 --disable-dbusproxy disable dbus proxy 1402 --disable-dbusproxy disable dbus proxy
1400 --disable-output disable --output logging 1403 --disable-output disable --output logging
1401 --disable-usertmpfs disable tmpfs as regular user 1404 --disable-usertmpfs disable tmpfs as regular user
@@ -3739,6 +3742,58 @@ then :
3739 3742
3740fi 3743fi
3741 3744
3745HAVE_LANDLOCK=""
3746
3747# Check whether --enable-landlock was given.
3748if test ${enable_landlock+y}
3749then :
3750 enableval=$enable_landlock;
3751fi
3752
3753ac_header= ac_cache=
3754for ac_item in $ac_header_c_list
3755do
3756 if test $ac_cache; then
3757 ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
3758 if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
3759 printf "%s\n" "#define $ac_item 1" >> confdefs.h
3760 fi
3761 ac_header= ac_cache=
3762 elif test $ac_header; then
3763 ac_cache=$ac_item
3764 else
3765 ac_header=$ac_item
3766 fi
3767done
3768
3769
3770
3771
3772
3773
3774
3775
3776if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
3777then :
3778
3779printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
3780
3781fi
3782if test "x$enable_landlock" != "xno"
3783then :
3784
3785 ac_fn_c_check_header_compile "$LINENO" "linux/landlock.h" "ac_cv_header_linux_landlock_h" "$ac_includes_default"
3786if test "x$ac_cv_header_linux_landlock_h" = xyes
3787then :
3788 HAVE_LANDLOCK="-DHAVE_LANDLOCK"
3789else $as_nop
3790 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: header not found: linux/landlock.h, building without Landlock support" >&5
3791printf "%s\n" "$as_me: WARNING: header not found: linux/landlock.h, building without Landlock support" >&2;}
3792fi
3793
3794
3795fi
3796
3742 3797
3743 3798
3744 3799
@@ -4112,6 +4167,7 @@ if test "x$enable_lts" = "xyes"
4112then : 4167then :
4113 4168
4114 HAVE_LTS="-DHAVE_LTS" 4169 HAVE_LTS="-DHAVE_LTS"
4170 HAVE_LANDLOCK=""
4115 HAVE_IDS="" 4171 HAVE_IDS=""
4116 HAVE_DBUSPROXY="" 4172 HAVE_DBUSPROXY=""
4117 HAVE_OVERLAYFS="" 4173 HAVE_OVERLAYFS=""
@@ -4132,35 +4188,6 @@ then :
4132 4188
4133fi 4189fi
4134 4190
4135ac_header= ac_cache=
4136for ac_item in $ac_header_c_list
4137do
4138 if test $ac_cache; then
4139 ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
4140 if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
4141 printf "%s\n" "#define $ac_item 1" >> confdefs.h
4142 fi
4143 ac_header= ac_cache=
4144 elif test $ac_header; then
4145 ac_cache=$ac_item
4146 else
4147 ac_header=$ac_item
4148 fi
4149done
4150
4151
4152
4153
4154
4155
4156
4157
4158if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
4159then :
4160
4161printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
4162
4163fi
4164ac_fn_c_check_header_compile "$LINENO" "linux/seccomp.h" "ac_cv_header_linux_seccomp_h" "$ac_includes_default" 4191ac_fn_c_check_header_compile "$LINENO" "linux/seccomp.h" "ac_cv_header_linux_seccomp_h" "$ac_includes_default"
4165if test "x$ac_cv_header_linux_seccomp_h" = xyes 4192if test "x$ac_cv_header_linux_seccomp_h" = xyes
4166then : 4193then :
@@ -5360,6 +5387,7 @@ Features:
5360 firetunnel support: $HAVE_FIRETUNNEL 5387 firetunnel support: $HAVE_FIRETUNNEL
5361 global config: $HAVE_GLOBALCFG 5388 global config: $HAVE_GLOBALCFG
5362 IDS support: $HAVE_IDS 5389 IDS support: $HAVE_IDS
5390 Landlock support: $HAVE_LANDLOCK
5363 LTS: $HAVE_LTS 5391 LTS: $HAVE_LTS
5364 manpage support: $HAVE_MAN 5392 manpage support: $HAVE_MAN
5365 network: $HAVE_NETWORK 5393 network: $HAVE_NETWORK