polkit/polkit-pie.patch
2012-02-09 17:05:33 +00:00

91 lines
3.2 KiB
Diff

Index: polkit-0.104/src/programs/Makefile.am
===================================================================
--- polkit-0.104.orig/src/programs/Makefile.am
+++ polkit-0.104/src/programs/Makefile.am
@@ -26,12 +26,14 @@ pkexec_SOURCES = pkexec.c
pkexec_CFLAGS = \
$(GLIB_CFLAGS) \
$(AUTH_LIBS) \
+ -fPIE \
$(NULL)
pkexec_LDADD = \
$(GLIB_LIBS) \
$(top_builddir)/src/polkit/libpolkit-gobject-1.la \
$(top_builddir)/src/polkitagent/libpolkit-agent-1.la \
+ -pie \
$(NULL)
# ----------------------------------------------------------------------------------------------------
Index: polkit-0.104/src/polkitagent/Makefile.am
===================================================================
--- polkit-0.104.orig/src/polkitagent/Makefile.am
+++ polkit-0.104/src/polkitagent/Makefile.am
@@ -64,6 +64,7 @@ libpolkit_agent_1_la_SOURCES =
$(NULL)
libpolkit_agent_1_la_CFLAGS = \
+ -fpie \
-D_POLKIT_COMPILATION \
-D_POLKIT_AGENT_COMPILATION \
$(GLIB_CFLAGS) \
@@ -75,7 +76,7 @@ libpolkit_agent_1_la_LIBADD =
$(EXPAT_LIBS) \
$(NULL)
-libpolkit_agent_1_la_LDFLAGS = -export-symbols-regex '(^polkit_.*)'
+libpolkit_agent_1_la_LDFLAGS = -pie -export-symbols-regex '(^polkit_.*)'
libexec_PROGRAMS = polkit-agent-helper-1
@@ -93,7 +94,10 @@ endif
polkit_agent_helper_1_CFLAGS = \
-D_POLKIT_COMPILATION \
$(GLIB_CFLAGS) \
+ -fpie \
$(NULL)
+
+polkit_agent_helper_1_LDFLAGS = -pie
polkit_agent_helper_1_LDADD = \
$(AUTH_LIBS) \
Index: polkit-0.104/src/programs/Makefile.in
===================================================================
--- polkit-0.104.orig/src/programs/Makefile.in
+++ polkit-0.104/src/programs/Makefile.in
@@ -76,7 +76,7 @@ pkexec_DEPENDENCIES = $(am__DEPENDENCIES
$(am__DEPENDENCIES_1)
pkexec_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(pkexec_CFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
+ $(AM_LDFLAGS) $(pkexec_LDFLAGS) $(LDFLAGS) -o $@
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
@@ -304,7 +304,10 @@ pkexec_SOURCES = pkexec.c
pkexec_CFLAGS = \
$(GLIB_CFLAGS) \
$(AUTH_LIBS) \
+ -fpie \
$(NULL)
+
+pkexec_LDFLAGS = -pie
pkexec_LDADD = \
$(GLIB_LIBS) \
Index: polkit-0.104/src/polkitagent/Makefile.in
===================================================================
--- polkit-0.104.orig/src/polkitagent/Makefile.in
+++ polkit-0.104/src/polkitagent/Makefile.in
@@ -113,8 +113,8 @@ polkit_agent_helper_1_DEPENDENCIES = $(a
$(am__DEPENDENCIES_1)
polkit_agent_helper_1_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(polkit_agent_helper_1_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
+ $(polkit_agent_helper_1_CFLAGS) -fpie $(CFLAGS) $(AM_LDFLAGS) \
+ $(polkit_agent_helper_1_LDFLAGS) -pie $(LDFLAGS) -o $@
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles