From ec494cb1fadb40ae25b944bb1229fc2d6f88e8c6 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sun, 30 Jun 2019 11:14:58 +0200 Subject: [PATCH] MDEV-19876 pam v2: auth_pam_tool_dir and auth_pam_tool permissions are wrong in RPMs in fact, permissions were fine in RPM, but mysql_install_db was resetting them. Also fix Debian, while we're at it --- scripts/mysql_install_db.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh index 1ea1e39be36..11dfb798a95 100644 --- a/scripts/mysql_install_db.sh +++ b/scripts/mysql_install_db.sh @@ -467,7 +467,8 @@ done if test -n "$user" then - chown $user "$pamtooldir/auth_pam_tool_dir" + chown $user "$pamtooldir/auth_pam_tool_dir" && \ + chmod 0700 "$pamtooldir/auth_pam_tool_dir" if test $? -ne 0 then echo "Cannot change ownership of the '$pamtooldir/auth_pam_tool_dir' directory" @@ -476,7 +477,8 @@ then fi if test -z "$srcdir" then - chown 0 "$pamtooldir/auth_pam_tool_dir/auth_pam_tool" + chown 0 "$pamtooldir/auth_pam_tool_dir/auth_pam_tool" && \ + chmod 04755 "$pamtooldir/auth_pam_tool_dir/auth_pam_tool" if test $? -ne 0 then echo "Couldn't set an owner to '$pamtooldir/auth_pam_tool_dir/auth_pam_tool'."