2012-02-24 13:54:59 +01:00
|
|
|
commit 1d2f40178c8b3ba39c25de25530c998c3591fab8
|
|
|
|
Author: Vincent Untz <vuntz@gnome.org>
|
|
|
|
Date: Fri Feb 24 13:13:17 2012 +0100
|
|
|
|
|
|
|
|
polkitagent, pkexec: Respect SUID_CFLAGS and SUID_LDFLAGS
|
|
|
|
|
|
|
|
This is a good way for distributors to use -fPIE/-pie.
|
|
|
|
|
|
|
|
diff --git a/configure.ac b/configure.ac
|
|
|
|
index f4a0c41..42da974 100644
|
|
|
|
--- a/configure.ac
|
|
|
|
+++ b/configure.ac
|
2013-04-11 14:12:08 +02:00
|
|
|
@@ -459,6 +459,11 @@ AC_SUBST([GETTEXT_PACKAGE])
|
2012-02-24 13:54:59 +01:00
|
|
|
AM_GLIB_GNU_GETTEXT
|
|
|
|
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[gettext domain])
|
|
|
|
|
|
|
|
+AC_ARG_VAR([SUID_CFLAGS],
|
|
|
|
+ [CFLAGS used for binaries which are usually with the suid bit])
|
|
|
|
+AC_ARG_VAR([SUID_LDFLAGS],
|
|
|
|
+ [LDFLAGS used for binaries which are usually with the suid bit])
|
|
|
|
+
|
|
|
|
AC_OUTPUT([
|
|
|
|
Makefile
|
|
|
|
actions/Makefile
|
|
|
|
diff --git a/src/polkitagent/Makefile.am b/src/polkitagent/Makefile.am
|
|
|
|
index e8c9fb1..f0f8419 100644
|
|
|
|
--- a/src/polkitagent/Makefile.am
|
|
|
|
+++ b/src/polkitagent/Makefile.am
|
2013-04-11 14:12:08 +02:00
|
|
|
@@ -94,6 +94,7 @@ endif
|
2012-02-24 13:54:59 +01:00
|
|
|
|
|
|
|
polkit_agent_helper_1_CFLAGS = \
|
|
|
|
-D_POLKIT_COMPILATION \
|
|
|
|
+ $(SUID_CFLAGS) \
|
|
|
|
$(GLIB_CFLAGS) \
|
|
|
|
$(NULL)
|
|
|
|
|
2013-04-11 14:12:08 +02:00
|
|
|
@@ -103,6 +104,11 @@ polkit_agent_helper_1_LDADD = \
|
2012-02-24 13:54:59 +01:00
|
|
|
$(top_builddir)/src/polkit/libpolkit-gobject-1.la \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
+polkit_agent_helper_1_LDFLAGS = \
|
|
|
|
+ $(SUID_LDFLAGS) \
|
|
|
|
+ $(AM_LDFLAGS) \
|
|
|
|
+ $(NULL)
|
|
|
|
+
|
|
|
|
if HAVE_INTROSPECTION
|
2012-09-21 23:03:29 +02:00
|
|
|
|
2012-02-24 13:54:59 +01:00
|
|
|
girdir = $(INTROSPECTION_GIRDIR)
|
|
|
|
diff --git a/src/programs/Makefile.am b/src/programs/Makefile.am
|
|
|
|
index c260dee..6aac06b 100644
|
|
|
|
--- a/src/programs/Makefile.am
|
|
|
|
+++ b/src/programs/Makefile.am
|
|
|
|
@@ -24,6 +24,7 @@ bin_PROGRAMS = pkexec pkcheck pkaction
|
|
|
|
pkexec_SOURCES = pkexec.c
|
|
|
|
|
|
|
|
pkexec_CFLAGS = \
|
|
|
|
+ $(SUID_CFLAGS) \
|
|
|
|
$(GLIB_CFLAGS) \
|
|
|
|
$(AUTH_LIBS) \
|
|
|
|
$(NULL)
|
|
|
|
@@ -34,6 +35,11 @@ pkexec_LDADD = \
|
|
|
|
$(top_builddir)/src/polkitagent/libpolkit-agent-1.la \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
+pkexec_LDFLAGS = \
|
|
|
|
+ $(SUID_LDFLAGS) \
|
|
|
|
+ $(AM_LDFLAGS) \
|
|
|
|
+ $(NULL)
|
|
|
|
+
|
|
|
|
# ----------------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
pkcheck_SOURCES = pkcheck.c
|