openldap/openldap-security-pie.patch

17 lines
524 B
Diff

Build slapd as position-independent executable (PIE) to take an advantage of
address space layout randomization (ASLD).
Author: Thomas Woerner <twoerner@redhat.com>
--- a/servers/slapd/Makefile.in
+++ b/servers/slapd/Makefile.in
@@ -263,7 +263,7 @@ slapi/libslapi.la: FORCE
(cd slapi; $(MAKE) $(MFLAGS) all)
slapd: $(SLAPD_DEPENDS) @LIBSLAPI@
- $(LTLINK) -o $@ $(SLAPD_OBJECTS) $(LIBS) \
+ $(LTLINK) -pie -Wl,-z,defs -o $@ $(SLAPD_OBJECTS) $(LIBS) \
$(WRAP_LIBS)
$(RM) $(SLAPTOOLS)
for i in $(SLAPTOOLS); do \