Commit c9d57c00 authored by Alexey Bychko's avatar Alexey Bychko

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.
parent 17980e35
...@@ -40,6 +40,9 @@ IF(HAVE_PAM_APPL_H AND HAVE_GETGROUPLIST) ...@@ -40,6 +40,9 @@ IF(HAVE_PAM_APPL_H AND HAVE_GETGROUPLIST)
TARGET_LINK_LIBRARIES(auth_pam_tool pam) TARGET_LINK_LIBRARIES(auth_pam_tool pam)
INSTALL(CODE "EXECUTE_PROCESS( INSTALL(CODE "EXECUTE_PROCESS(
COMMAND chmod u=rwx,g=,o= auth_pam_tool_dir 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 COMMAND chmod u=rwxs,g=rx,o=rx auth_pam_tool_dir/auth_pam_tool
WORKING_DIRECTORY \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${INSTALL_PLUGINDIR}/)" WORKING_DIRECTORY \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${INSTALL_PLUGINDIR}/)"
COMPONENT Server) COMPONENT Server)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment