Blob Blame History Raw
--- kde-workspace-4.10.4/kdm/backend/CMakeLists.txt.harden	2013-07-18 13:59:39.736400898 +0200
+++ kde-workspace-4.10.4/kdm/backend/CMakeLists.txt	2013-07-18 14:00:24.573302699 +0200
@@ -52,7 +52,8 @@ endif(LIBSYSTEMD_LOGIN_FOUND AND LIBSYST
 macro_add_file_dependencies(dm.h ${confci})
 macro_add_file_dependencies(error.c ${CMAKE_CURRENT_SOURCE_DIR}/printf.c)
 kde4_add_executable(kdm NOGUI ${kdm_SRCS})
-macro_add_compile_flags(kdm -U_REENTRANT)
+macro_add_compile_flags(kdm "-U_REENTRANT -fpie -pie")
+set_target_properties(kdm PROPERTIES LINK_FLAGS "-fpie -pie -Wl,-z,relro,-z,now ${LINK_FLAGS}")
 target_link_libraries( kdm
 	${X11_X11_LIB} ${X11_Xau_LIB} ${X11_Xdmcp_LIB} ${X11_X_EXTRA_LIBS}
 	${UNIXAUTH_LIBRARIES}
--- kde-workspace-4.10.4/kdm/kfrontend/CMakeLists.txt.harden	2013-07-18 14:02:54.311974754 +0200
+++ kde-workspace-4.10.4/kdm/kfrontend/CMakeLists.txt	2013-07-18 14:04:16.112795602 +0200
@@ -71,6 +71,8 @@ endif (WITH_KDM_XCONSOLE)
 
 macro_add_file_dependencies(kdmconfig.h ${confci})
 kde4_add_executable(kdm_greet ${kdm_greet_SRCS})
+macro_add_compile_flags(kdm_greet "-fpie -pie")
+set_target_properties(kdm_greet PROPERTIES LINK_FLAGS "-fpie -pie -Wl,-z,relro,-z,now ${LINK_FLAGS}")
 target_link_libraries(kdm_greet ${KDE4_KDEUI_LIBS} ${QT_QTXML_LIBRARY} ${X11_X11_LIB} ${POSIX4_LIBRARIES})
 if (X11_XTest_FOUND)
   target_link_libraries(kdm_greet ${X11_XTest_LIB})