mirror of
https://abf.rosa.ru/djam/mariadb.git
synced 2025-02-24 07:02:47 +00:00
36 lines
1.8 KiB
Diff
36 lines
1.8 KiB
Diff
diff -ruN a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh
|
|
--- a/scripts/mysql_install_db.sh 2023-11-08 21:03:51.000000000 +0900
|
|
+++ b/scripts/mysql_install_db.sh 2023-11-14 13:01:26.107911606 +0900
|
|
@@ -494,20 +494,22 @@
|
|
then
|
|
if test -z "$srcdir" -a "$in_rpm" -eq 0 -a -d "$pamtooldir/auth_pam_tool_dir"
|
|
then
|
|
- chown 0 "$pamtooldir/auth_pam_tool_dir/auth_pam_tool" && \
|
|
- chmod 04755 "$pamtooldir/auth_pam_tool_dir/auth_pam_tool"
|
|
- if test $? -ne 0
|
|
+ tool_ownership=`stat -c "%U:%G" "$pamtooldir/auth_pam_tool_dir/auth_pam_tool"`
|
|
+ tool_mode=`stat -c "%a" "$pamtooldir/auth_pam_tool_dir/auth_pam_tool"`
|
|
+
|
|
+ if test "$tool_ownership" != "root:root" -o "$tool_mode" != "4755"
|
|
then
|
|
- echo "Couldn't set an owner to '$pamtooldir/auth_pam_tool_dir/auth_pam_tool'."
|
|
- echo "It must be root, the PAM authentication plugin doesn't work otherwise.."
|
|
+ echo "Permissions/ownership of the '$pamtooldir/auth_pam_tool_dir/auth_pam_tool' file are bad."
|
|
+ echo "It must be owned by root:root and have mode 4750."
|
|
echo
|
|
fi
|
|
- chown $user "$pamtooldir/auth_pam_tool_dir" && \
|
|
- chmod 0700 "$pamtooldir/auth_pam_tool_dir"
|
|
- if test $? -ne 0
|
|
+
|
|
+ dir_ownership=`stat -c "%U:%G" "$pamtooldir/auth_pam_tool_dir"`
|
|
+ dir_mode=`stat -c "%a" "$pamtooldir/auth_pam_tool_dir"`
|
|
+ if test "$dir_ownership" != "root:mysql" -o "$dir_mode" != "750"
|
|
then
|
|
- echo "Cannot change ownership of the '$pamtooldir/auth_pam_tool_dir' directory"
|
|
- echo "to the '$user' user. Check that you have the necessary permissions and try again."
|
|
+ echo "Permissions/ownership of the '$pamtooldir/auth_pam_tool_dir' directory are bad."
|
|
+ echo "It must be owned by root:mysql and have mode 0750, the PAM authentication plugin doesn't work otherwise.."
|
|
echo
|
|
fi
|
|
fi
|