Skip to content

Commit ec494cb

Browse files
committed
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
1 parent a07c10f commit ec494cb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scripts/mysql_install_db.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,8 @@ done
467467

468468
if test -n "$user"
469469
then
470-
chown $user "$pamtooldir/auth_pam_tool_dir"
470+
chown $user "$pamtooldir/auth_pam_tool_dir" && \
471+
chmod 0700 "$pamtooldir/auth_pam_tool_dir"
471472
if test $? -ne 0
472473
then
473474
echo "Cannot change ownership of the '$pamtooldir/auth_pam_tool_dir' directory"
@@ -476,7 +477,8 @@ then
476477
fi
477478
if test -z "$srcdir"
478479
then
479-
chown 0 "$pamtooldir/auth_pam_tool_dir/auth_pam_tool"
480+
chown 0 "$pamtooldir/auth_pam_tool_dir/auth_pam_tool" && \
481+
chmod 04755 "$pamtooldir/auth_pam_tool_dir/auth_pam_tool"
480482
if test $? -ne 0
481483
then
482484
echo "Couldn't set an owner to '$pamtooldir/auth_pam_tool_dir/auth_pam_tool'."

0 commit comments

Comments
 (0)