fix check_http

This commit is contained in:
Jan Wagner 2008-06-06 11:10:58 +00:00
parent 7806d01e88
commit fa35916c1a
3 changed files with 26 additions and 0 deletions

2
debian/changelog vendored
View file

@ -28,6 +28,8 @@ nagios-plugins (1.4.12-1) UNRELEASED; urgency=low
perl of check_disk_smb (Closes: #478906) perl of check_disk_smb (Closes: #478906)
* add 34_fix_smbclient_check_disk_smb.dpatch which fixes usage of smbclient * add 34_fix_smbclient_check_disk_smb.dpatch which fixes usage of smbclient
(Closes: #478942) (Closes: #478942)
* add 35_check_http_date.dpatch which fixes date parsing of check_http,
thanks Hilko Bengen <bengen@debian.org> for providing it (Closes: #460097)
[ Alexander Wirt ] [ Alexander Wirt ]
* Call smbclient with -N (supress password prompt) if no password is * Call smbclient with -N (supress password prompt) if no password is

View file

@ -9,4 +9,5 @@
32_check_ldap_pointer.dpatch 32_check_ldap_pointer.dpatch
33_fix_emb_check_disk_smb.dpatch 33_fix_emb_check_disk_smb.dpatch
34_fix_smbclient_check_disk_smb.dpatch 34_fix_smbclient_check_disk_smb.dpatch
35_check_http_date.dpatch
50_misc_typos.dpatch 50_misc_typos.dpatch

23
debian/patches/35_check_http_date.dpatch vendored Executable file
View file

@ -0,0 +1,23 @@
#! /bin/sh /usr/share/dpatch/dpatch-run
## 35_check_http_date.dpatch by Jan Wagner <waja@cyconet.org>
## patch provided by Hilko Bengen <bengen@debian.org>
##
## DP: Prevents check_http from trying to extract Date or
## DP: Last-Modified header from file content.N
@DPATCH@
diff -urNad nagios-plugins-1.4.12~/plugins/check_http.c nagios-plugins-1.4.12/plugins/check_http.c
--- nagios-plugins-1.4.12~/plugins/check_http.c 2008-05-07 12:02:42.000000000 +0200
+++ nagios-plugins-1.4.12/plugins/check_http.c 2008-06-06 13:03:33.000000000 +0200
@@ -598,7 +598,10 @@
/* Skip to the end of the header, including continuation lines. */
while (*s && !(*s == '\n' && (s[1] != ' ' && s[1] != '\t')))
s++;
- s++;
+
+ /* Avoid stepping over end-of-string marker */
+ if (*s)
+ s++;
/* Process this header. */
if (value && value > field+2) {