Skip to content

Commit

Permalink
MDEV-19876 pam v2: auth_pam_tool_dir and auth_pam_tool permissions ar…
Browse files Browse the repository at this point in the history
…e 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
  • Loading branch information
vuvova committed Jul 2, 2019
1 parent a07c10f commit ec494cb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/mysql_install_db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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'."
Expand Down

0 comments on commit ec494cb

Please sign in to comment.