aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorLibravatar Topi Miettinen <toiwoton@gmail.com>2020-02-18 20:38:00 +0200
committerLibravatar Topi Miettinen <topimiettinen@users.noreply.github.com>2020-02-22 08:27:24 +0000
commit1ad2d54c014a49f6ad0b487dd0d9b361cb4d299e (patch)
tree415eb19d90e2ed1de7236c784c1e28d3acfbcaab /configure.ac
parentWhitelist more /usr/share for okular and others (diff)
downloadfirejail-1ad2d54c014a49f6ad0b487dd0d9b361cb4d299e.tar.gz
firejail-1ad2d54c014a49f6ad0b487dd0d9b361cb4d299e.tar.zst
firejail-1ad2d54c014a49f6ad0b487dd0d9b361cb4d299e.zip
Add support for SELinux labeling
Running `firejail --noprofile --private-bin=bash,ls ls -1Za /usr/bin` shows that the SELinux labels are not correct: ``` user_u:object_r:user_tmpfs_t:s0 . system_u:object_r:usr_t:s0 .. user_u:object_r:user_tmpfs_t:s0 bash user_u:object_r:user_tmpfs_t:s0 ls ``` After fixing this: ``` system_u:object_r:bin_t:s0 . system_u:object_r:usr_t:s0 .. system_u:object_r:shell_exec_t:s0 bash system_u:object_r:bin_t:s0 ls ``` Most copied files and created directories should now have correct labels (bind mounted objects keep their labels). This is useful to avoid having to change the SELinux rules when using Firejail.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac10
1 files changed, 10 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 8ee2fbadc..3c9f901cb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -184,6 +184,15 @@ AS_IF([test "x$enable_contrib_install" = "xno"],
184) 184)
185AC_SUBST(HAVE_CONTRIB_INSTALL) 185AC_SUBST(HAVE_CONTRIB_INSTALL)
186 186
187HAVE_SELINUX=""
188AC_ARG_ENABLE([selinux],
189 AS_HELP_STRING([--enable-selinux], [SELinux labeling support]))
190AS_IF([test "x$enable_selinux" = "xyes"], [
191 HAVE_SELINUX="-DHAVE_SELINUX"
192 EXTRA_LDFLAGS+=" -lselinux "
193 AC_SUBST(HAVE_SELINUX)
194])
195
187# checking pthread library 196# checking pthread library
188AC_CHECK_LIB([pthread], [main], [], AC_MSG_ERROR([*** POSIX thread support not installed ***])) 197AC_CHECK_LIB([pthread], [main], [], AC_MSG_ERROR([*** POSIX thread support not installed ***]))
189AC_CHECK_HEADER(pthread.h,,AC_MSG_ERROR([*** POSIX thread support not installed ***])) 198AC_CHECK_HEADER(pthread.h,,AC_MSG_ERROR([*** POSIX thread support not installed ***]))
@@ -223,5 +232,6 @@ echo " EXTRA_CFLAGS: $EXTRA_CFLAGS"
223echo " fatal warnings: $HAVE_FATAL_WARNINGS" 232echo " fatal warnings: $HAVE_FATAL_WARNINGS"
224echo " Gcov instrumentation: $HAVE_GCOV" 233echo " Gcov instrumentation: $HAVE_GCOV"
225echo " Install contrib scripts: $HAVE_CONTRIB_INSTALL" 234echo " Install contrib scripts: $HAVE_CONTRIB_INSTALL"
235echo " SELinux labeling support: $HAVE_SELINUX"
226echo " Install as a SUID executable: $HAVE_SUID" 236echo " Install as a SUID executable: $HAVE_SUID"
227echo 237echo