aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2021-11-01 14:10:28 -0300
committerLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2021-11-25 11:32:08 -0300
commit6d42e13a46b970c7197e1b70f6440ada1f8ec410 (patch)
tree799170ae63f7a6323cc674cd7025f3ad28f29402
parentconfigure*: Remove redundant AC_SUBST calls near HAVE_LTS (diff)
downloadfirejail-6d42e13a46b970c7197e1b70f6440ada1f8ec410.tar.gz
firejail-6d42e13a46b970c7197e1b70f6440ada1f8ec410.tar.zst
firejail-6d42e13a46b970c7197e1b70f6440ada1f8ec410.zip
build: Normalize HAVE_SUID
See commit 15d793838 ("Try to fix #2310 -- Can't create run directory without suid-root", 2021-05-13) / PR #4273. It is the only "HAVE_" option whose value is set by if/else on a makefile. Also, it is set in different places to either "yes", "no", blank or "-DHAVE_SUID". Set the value only on configure.ac and only to either blank or to "-DHAVE_SUID". Misc: The `ifeq ($(HAVE_SUID),-DHAVE_SUID)` comparison that this adds is based on the existing `ifeq ($(HAVE_APPARMOR),-DHAVE_APPARMOR)` comparison on Makefile.in.
-rw-r--r--Makefile.in2
-rwxr-xr-xconfigure9
-rw-r--r--configure.ac9
-rw-r--r--src/common.mk.in6
4 files changed, 10 insertions, 16 deletions
diff --git a/Makefile.in b/Makefile.in
index ddc63c1af..1044f1ade 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -105,7 +105,7 @@ realinstall:
105 # firejail executable 105 # firejail executable
106 install -m 0755 -d $(DESTDIR)$(bindir) 106 install -m 0755 -d $(DESTDIR)$(bindir)
107 install -m 0755 src/firejail/firejail $(DESTDIR)$(bindir) 107 install -m 0755 src/firejail/firejail $(DESTDIR)$(bindir)
108ifeq ($(HAVE_SUID),yes) 108ifeq ($(HAVE_SUID),-DHAVE_SUID)
109 chmod u+s $(DESTDIR)$(bindir)/firejail 109 chmod u+s $(DESTDIR)$(bindir)/firejail
110endif 110endif
111 # firemon executable 111 # firemon executable
diff --git a/configure b/configure
index f3b99d7d1..3d5c9d161 100755
--- a/configure
+++ b/configure
@@ -3757,10 +3757,9 @@ if test "${enable_suid+set}" = set; then :
3757 enableval=$enable_suid; 3757 enableval=$enable_suid;
3758fi 3758fi
3759 3759
3760if test "x$enable_suid" = "xno"; then : 3760if test "x$enable_suid" != "xno"; then :
3761 HAVE_SUID="no" 3761
3762else 3762 HAVE_SUID="-DHAVE_SUID"
3763 HAVE_SUID="yes"
3764 3763
3765fi 3764fi
3766 3765
@@ -3854,7 +3853,7 @@ if test "x$enable_lts" = "xyes"; then :
3854 HAVE_USERNS="" 3853 HAVE_USERNS=""
3855 HAVE_X11="" 3854 HAVE_X11=""
3856 HAVE_FILE_TRANSFER="" 3855 HAVE_FILE_TRANSFER=""
3857 HAVE_SUID="yes" 3856 HAVE_SUID="-DHAVE_SUID"
3858 BUSYBOX_WORKAROUND="no" 3857 BUSYBOX_WORKAROUND="no"
3859 HAVE_CONTRIB_INSTALL="no", 3858 HAVE_CONTRIB_INSTALL="no",
3860 3859
diff --git a/configure.ac b/configure.ac
index ace02dcb6..2870148cf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -191,10 +191,9 @@ HAVE_SUID=""
191AC_SUBST([HAVE_SUID]) 191AC_SUBST([HAVE_SUID])
192AC_ARG_ENABLE([suid], 192AC_ARG_ENABLE([suid],
193 [AS_HELP_STRING([--disable-suid], [install as a non-SUID executable])]) 193 [AS_HELP_STRING([--disable-suid], [install as a non-SUID executable])])
194AS_IF([test "x$enable_suid" = "xno"], 194AS_IF([test "x$enable_suid" != "xno"], [
195 [HAVE_SUID="no"], 195 HAVE_SUID="-DHAVE_SUID"
196 [HAVE_SUID="yes"] 196])
197)
198 197
199HAVE_FATAL_WARNINGS="" 198HAVE_FATAL_WARNINGS=""
200AC_SUBST([HAVE_FATAL_WARNINGS]) 199AC_SUBST([HAVE_FATAL_WARNINGS])
@@ -257,7 +256,7 @@ AS_IF([test "x$enable_lts" = "xyes"], [
257 HAVE_USERNS="" 256 HAVE_USERNS=""
258 HAVE_X11="" 257 HAVE_X11=""
259 HAVE_FILE_TRANSFER="" 258 HAVE_FILE_TRANSFER=""
260 HAVE_SUID="yes" 259 HAVE_SUID="-DHAVE_SUID"
261 BUSYBOX_WORKAROUND="no" 260 BUSYBOX_WORKAROUND="no"
262 HAVE_CONTRIB_INSTALL="no", 261 HAVE_CONTRIB_INSTALL="no",
263]) 262])
diff --git a/src/common.mk.in b/src/common.mk.in
index c8329e7c2..c55c26f42 100644
--- a/src/common.mk.in
+++ b/src/common.mk.in
@@ -22,11 +22,7 @@ HAVE_FIRETUNNEL=@HAVE_FIRETUNNEL@
22HAVE_PRIVATE_HOME=@HAVE_PRIVATE_HOME@ 22HAVE_PRIVATE_HOME=@HAVE_PRIVATE_HOME@
23HAVE_GCOV=@HAVE_GCOV@ 23HAVE_GCOV=@HAVE_GCOV@
24HAVE_SELINUX=@HAVE_SELINUX@ 24HAVE_SELINUX=@HAVE_SELINUX@
25ifeq (@HAVE_SUID@, yes) 25HAVE_SUID=@HAVE_SUID@
26HAVE_SUID=-DHAVE_SUID
27else
28HAVE_SUID=
29endif
30HAVE_DBUSPROXY=@HAVE_DBUSPROXY@ 26HAVE_DBUSPROXY=@HAVE_DBUSPROXY@
31HAVE_USERTMPFS=@HAVE_USERTMPFS@ 27HAVE_USERTMPFS=@HAVE_USERTMPFS@
32HAVE_OUTPUT=@HAVE_OUTPUT@ 28HAVE_OUTPUT=@HAVE_OUTPUT@