aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Ton Voon <tonvoon@users.sourceforge.net> 2007-03-06 22:17:04 +0000
committerGravatar Ton Voon <tonvoon@users.sourceforge.net> 2007-03-06 22:17:04 +0000
commit1db33136b0e4176848e202281b4a054a7ed71533 (patch)
treecd36d9d3c114d31a7ac7bb206e5212d51f2fb1df
parent4ad5dcce03df2e0167c8aae6f9f5debfe173f5a4 (diff)
downloadmonitoring-plugins-1db33136b0e4176848e202281b4a054a7ed71533.tar.gz
Fixed broken HELO cmd (Enrico Scholz - 1675279)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1630 f882894a-f735-0410-b71e-b25c423dba1c
-rw-r--r--NEWS1
-rw-r--r--THANKS.in1
-rw-r--r--plugins/check_smtp.c8
3 files changed, 5 insertions, 5 deletions
diff --git a/NEWS b/NEWS
index 184d4ec2..ee0ac0e4 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@ This file documents the major additions and syntax changes between releases.
1.4.7 ??
check_procs uses /usr/ucb/ps if available - fixes pst3 problems on Solaris
Fixed MKINSTALLDIRS problem in po/
+ Fixed broken HELO in check_smtp
Root plugins installed with world executable
./configure now detects if possible to compile check_mysql
check_sybase from contrib now maintained in NagiosExchange
diff --git a/THANKS.in b/THANKS.in
index 10226468..98b86795 100644
--- a/THANKS.in
+++ b/THANKS.in
@@ -210,3 +210,4 @@ Chris Grim
Nobuhiro Ban
Ville Mattila
Lars Stavholm
+Enrico Scholz
diff --git a/plugins/check_smtp.c b/plugins/check_smtp.c
index a7ba45a1..6987e172 100644
--- a/plugins/check_smtp.c
+++ b/plugins/check_smtp.c
@@ -179,7 +179,7 @@ main (int argc, char **argv)
if (process_arguments (argc, argv) == ERROR)
usage4 (_("Could not parse arguments"));
- /* initialize the HELO command with the localhostname */
+ /* If localhostname not set on command line, use gethostname to set */
if(! localhostname){
localhostname = malloc (HOST_MAX_BYTES);
if(!localhostname){
@@ -190,13 +190,11 @@ main (int argc, char **argv)
printf(_("gethostname() failed!\n"));
return STATE_CRITICAL;
}
- } else {
- helocmd = localhostname;
}
if(use_ehlo)
- asprintf (&helocmd, "%s%s%s", SMTP_EHLO, helocmd, "\r\n");
+ asprintf (&helocmd, "%s%s%s", SMTP_EHLO, localhostname, "\r\n");
else
- asprintf (&helocmd, "%s%s%s", SMTP_HELO, helocmd, "\r\n");
+ asprintf (&helocmd, "%s%s%s", SMTP_HELO, localhostname, "\r\n");
if (verbose)
printf("HELOCMD: %s", helocmd);