From 6d0aa9f24b30fd66477b883ef943946223c088c2 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Tue, 16 Apr 2013 12:26:17 +0200 Subject: [PATCH] Fix privileges elevations with sudo for mysqladmin_status --- .../templates/etc/zabbix/zabbix_agentd.conf.d/mysql.conf/10All | 10 +++++----- root/var/lib/zabbix/bin/check_mysqladmin_status_sudo | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/root/etc/e-smith/templates/etc/zabbix/zabbix_agentd.conf.d/mysql.conf/10All b/root/etc/e-smith/templates/etc/zabbix/zabbix_agentd.conf.d/mysql.conf/10All index c9e31c2..d9162d6 100644 --- a/root/etc/e-smith/templates/etc/zabbix/zabbix_agentd.conf.d/mysql.conf/10All +++ b/root/etc/e-smith/templates/etc/zabbix/zabbix_agentd.conf.d/mysql.conf/10All @@ -7,9 +7,9 @@ # Unit: (for example, qps) # Use multiplier: do not use # Store Value: As is -UserParameter=mysql.uptime,/var/lib/zabbix/bin/check_mysqladmin_status_sudo | cut -d" " -f2 -UserParameter=mysql.threads,/var/lib/zabbix/bin/check_mysqladmin_status_sudo | cut -d" " -f5 -UserParameter=mysql.questions,/var/lib/zabbix/bin/check_mysqladmin_status_sudo | cut -d" " -f8 -UserParameter=mysql.slowqueries,/var/lib/zabbix/bin/check_mysqladmin_status_sudo | cut -d" " -f12 -UserParameter=mysql.qps,/var/lib/zabbix/bin/check_mysqladmin_status_sudo | cut -d" " -f29 +UserParameter=mysql.uptime,/usr/bin/sudo /var/lib/zabbix/bin/check_mysqladmin_status_sudo | cut -d" " -f2 +UserParameter=mysql.threads,/usr/bin/sudo /var/lib/zabbix/bin/check_mysqladmin_status_sudo | cut -d" " -f5 +UserParameter=mysql.questions,/usr/bin/sudo /var/lib/zabbix/bin/check_mysqladmin_status_sudo | cut -d" " -f8 +UserParameter=mysql.slowqueries,/usr/bin/sudo /var/lib/zabbix/bin/check_mysqladmin_status_sudo | cut -d" " -f12 +UserParameter=mysql.qps,/usr/bin/sudo /var/lib/zabbix/bin/check_mysqladmin_status_sudo | cut -d" " -f29 diff --git a/root/var/lib/zabbix/bin/check_mysqladmin_status_sudo b/root/var/lib/zabbix/bin/check_mysqladmin_status_sudo index 3ef9dab..1c1bbbb 100644 --- a/root/var/lib/zabbix/bin/check_mysqladmin_status_sudo +++ b/root/var/lib/zabbix/bin/check_mysqladmin_status_sudo @@ -1,5 +1,5 @@ #!/bin/sh HOME=/root -exec /usr/bin/sudo /usr/bin/mysqladmin status +exec /usr/bin/mysqladmin status