From 34aefa55c81a02b955b2f019cf3bdf51f37f8008 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Fri, 27 Apr 2018 18:15:19 +0300 Subject: [PATCH] Remove write permissions on scripts Accidental modifications of scripts/programs are more likely if the owner has write permissions on the file. In addition, they are not required and thus can be removed. --- cmake/install_layout.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/install_layout.cmake b/cmake/install_layout.cmake index 3eddba677..32376c680 100644 --- a/cmake/install_layout.cmake +++ b/cmake/install_layout.cmake @@ -98,7 +98,9 @@ function(install_script target component) list(FIND TARGET_COMPONENT ${component} BUILD_COMPONENT) if(BUILD_COMPONENT GREATER -1 OR BUILD_ALL GREATER -1) - install(PROGRAMS ${target} DESTINATION ${MAXSCALE_BINDIR} COMPONENT "${component}") + install(PROGRAMS ${target} DESTINATION ${MAXSCALE_BINDIR} + PERMISSIONS OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE OWNER_READ GROUP_READ WORLD_READ + COMPONENT "${component}") endif() endfunction()