summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Bychko <alexey.bychko@mariadb.com>2021-08-19 19:47:38 +0700
committerAlexey Bychko <alexey.bychko@mariadb.com>2021-08-19 19:47:38 +0700
commitc9d57c006a3e9dc5dfd148d8a3b4c4663b5269ab (patch)
treedce0e8a64ffc3ed6d728987ff0e8d64975f03933
parent17980e35fafdf0b05c89c11ecafbea96e1cfc5e5 (diff)
downloadmariadb-git-c9d57c006a3e9dc5dfd148d8a3b4c4663b5269ab.tar.gz
MDEV-26380 auth_pam_tool has incorrect permissions on CentOS 7
splitted permission setting to the 2 separate calls. according to execute_process() doc, output from first command will be piped to second which led to race and randomly lost suid bit from auth_pam_tool.
-rw-r--r--plugin/auth_pam/CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugin/auth_pam/CMakeLists.txt b/plugin/auth_pam/CMakeLists.txt
index 8d11d174f90..92e7b676e57 100644
--- a/plugin/auth_pam/CMakeLists.txt
+++ b/plugin/auth_pam/CMakeLists.txt
@@ -40,6 +40,9 @@ IF(HAVE_PAM_APPL_H AND HAVE_GETGROUPLIST)
TARGET_LINK_LIBRARIES(auth_pam_tool pam)
INSTALL(CODE "EXECUTE_PROCESS(
COMMAND chmod u=rwx,g=,o= auth_pam_tool_dir
+ WORKING_DIRECTORY \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${INSTALL_PLUGINDIR}/)"
+ COMPONENT Server)
+ INSTALL(CODE "EXECUTE_PROCESS(
COMMAND chmod u=rwxs,g=rx,o=rx auth_pam_tool_dir/auth_pam_tool
WORKING_DIRECTORY \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${INSTALL_PLUGINDIR}/)"
COMPONENT Server)