[pkg-nagios-changes] [Git][nagios-team/monitoring-plugins][experimental] Adding d/p/23_check_mysql_fix_error_handling from upstream
Jan Wagner (@waja)
gitlab at salsa.debian.org
Wed May 31 15:40:18 BST 2023
Jan Wagner pushed to branch experimental at Debian Nagios Maintainer Group / monitoring-plugins
Commits:
85d9e03e by Jan Wagner at 2023-05-31T16:38:05+02:00
Adding d/p/23_check_mysql_fix_error_handling from upstream
- - - - -
2 changed files:
- + debian/patches/23_check_mysql_fix_error_handling
- debian/patches/series
Changes:
=====================================
debian/patches/23_check_mysql_fix_error_handling
=====================================
@@ -0,0 +1,28 @@
+From 10863265324a9a9fdf8ce771271af15b7e2f5a4a Mon Sep 17 00:00:00 2001
+From: Platon Pronko <platon7pronko at gmail.com>
+Date: Fri, 19 May 2023 15:05:02 +0800
+Subject: [PATCH] check_mysql: handle ER_ACCESS_DENIED_NO_PASSWORD_ERROR if
+ ignore_auth=1
+
+In some situations MySQL might return ER_ACCESS_DENIED_NO_PASSWORD_ERROR
+instead of ER_ACCESS_DENIED_ERROR. Semantically these errors are the same.
+---
+ plugins/check_mysql.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/plugins/check_mysql.c b/plugins/check_mysql.c
+index 6cfa70edb..91e150fbd 100644
+--- a/plugins/check_mysql.c
++++ b/plugins/check_mysql.c
+@@ -138,7 +138,10 @@ main (int argc, char **argv)
+ mysql_ssl_set(&mysql,key,cert,ca_cert,ca_dir,ciphers);
+ /* establish a connection to the server and error checking */
+ if (!mysql_real_connect(&mysql,db_host,db_user,db_pass,db,db_port,db_socket,0)) {
+- if (ignore_auth && mysql_errno (&mysql) == ER_ACCESS_DENIED_ERROR)
++ /* Depending on internally-selected auth plugin MySQL might return */
++ /* ER_ACCESS_DENIED_NO_PASSWORD_ERROR or ER_ACCESS_DENIED_ERROR. */
++ /* Semantically these errors are the same. */
++ if (ignore_auth && (mysql_errno (&mysql) == ER_ACCESS_DENIED_ERROR || mysql_errno (&mysql) == ER_ACCESS_DENIED_NO_PASSWORD_ERROR))
+ {
+ printf("MySQL OK - Version: %s (protocol %d)\n",
+ mysql_get_server_info(&mysql),
=====================================
debian/patches/series
=====================================
@@ -14,6 +14,7 @@
20_chech_nt_fix_encoding
21_check_pgsql_extra_output
22_check_disk_avoid_mount
+23_check_mysql_fix_error_handling
# feature patches
30_check_radius_radcli_1.3.1_support
31_checl_mailq_separate_submission_queue
View it on GitLab: https://salsa.debian.org/nagios-team/monitoring-plugins/-/commit/85d9e03ea0e7e6f11ecb9ca7e9ee630d1e9db0e9
--
View it on GitLab: https://salsa.debian.org/nagios-team/monitoring-plugins/-/commit/85d9e03ea0e7e6f11ecb9ca7e9ee630d1e9db0e9
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-nagios-changes/attachments/20230531/8bf34b30/attachment-0001.htm>
More information about the pkg-nagios-changes
mailing list