Bug 1768270 - PATH_TO_SUDO is unset in utils.pm
Summary: PATH_TO_SUDO is unset in utils.pm
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: nagios-plugins
Version: epel7
Hardware: All
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Stephen John Smoogen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-11-03 19:47 UTC by Alexander Schaber
Modified: 2020-02-15 02:34 UTC (History)
6 users (show)

Fixed In Version: nagios-plugins-2.3.1-1.el7 nagios-plugins-2.3.1-3.el6
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-01-05 00:07:14 UTC
Type: Bug


Attachments (Terms of Use)
patch for nagios-plugins.spec (369 bytes, text/plain)
2019-11-03 19:47 UTC, Alexander Schaber
no flags Details

Description Alexander Schaber 2019-11-03 19:47:35 UTC
Created attachment 1632280 [details]
patch for nagios-plugins.spec

Description of problem:
I tried running check_mailq with -s (use sudo) and it failed.

Version-Release number of selected component (if applicable):
nagios-plugins-2.2.2-2.20190926git1b8ad57.el7.src.rpm

How reproducible:
Install nagios-plugins-mailq-2.2.2-2.20190926git1b8ad57.el7.x86_64


Steps to Reproduce:
1. Add to /etc/sudoers.d/icinga_mailq:
%icinga  ALL = NOPASSWD: /usr/bin/mailq 
2. sudo -u icinga /usr/lib64/nagios/plugins/check_mailq -w 10 -c 20 -s

Possibly use nagios instead of icinga as user. (I had an icinga installation on my machine).

Actual results:
Use of uninitialized value $sudo in string ne at /usr/lib64/nagios/plugins/check_mailq line 328.

Expected results:
OK: postfix mailq (4) is below threshold (10/20)|unsent=4;10;20;0

Additional info:
I checked utils.pm and found PATH_TO_SUDO is "". I figured that it could be set during the build of the rpm. Like others are right now.

Therefore I suggest adding:
        PATH_TO_SUDO=%{_bindir}/sudo \
to the nagios-plugins.spec line 622.

It will be picked up by configure.ac lines 1563-1572.

Comment 1 Stephen John Smoogen 2019-12-10 19:53:04 UTC
Added this to 2.3.1 nagios-plugins I will be putting into various testing this week.

Comment 2 Fedora Update System 2019-12-10 23:11:08 UTC
FEDORA-EPEL-2019-f6182b7356 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-f6182b7356

Comment 3 Fedora Update System 2019-12-10 23:36:08 UTC
FEDORA-EPEL-2019-a181371b74 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-a181371b74

Comment 4 Fedora Update System 2019-12-11 02:21:09 UTC
nagios-plugins-2.3.1-1.el6_10 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-f6182b7356

Comment 5 Fedora Update System 2019-12-11 17:24:43 UTC
nagios-plugins-2.3.1-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-a181371b74

Comment 6 Fedora Update System 2020-01-05 00:07:14 UTC
nagios-plugins-2.3.1-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2020-01-28 19:50:46 UTC
FEDORA-EPEL-2020-f97bb3ff1c has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-f97bb3ff1c

Comment 8 Fedora Update System 2020-01-31 02:56:50 UTC
nagios-plugins-2.3.1-3.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-f97bb3ff1c

Comment 9 Fedora Update System 2020-02-15 02:34:33 UTC
nagios-plugins-2.3.1-3.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.