Build slapd as position-independent executable (PIE) to take an advantage of address space layout randomization (ASLD). Author: Thomas Woerner --- openldap-2.4.24.orig/servers/slapd/Makefile.in +++ openldap-2.4.24/servers/slapd/Makefile.in @@ -266,7 +266,7 @@ libslapi.a: slapi/.libs/libslapi.a cp slapi/.libs/libslapi.a . 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 \