drop 27_check_radius_segfault.dpatch

This commit is contained in:
Jan Wagner 2010-04-09 19:40:00 +00:00
parent b5272998dc
commit 54d9c0272d
3 changed files with 3 additions and 25 deletions

3
debian/changelog vendored
View file

@ -5,6 +5,9 @@ nagios-plugins (1.4.14-5) UNRELEASED; urgency=low
- 14_check_log_paths.dpatch: paths are fine now
- 26_implicit-basename.dpatch: no 'implicitly convertion' found in buildlog
without the patch
- 27_check_radius_segfault.dpatch: check_radius.c:161 initializes "data" to
0 using memset(3) and problem not longer reproducable on amd64 without
the patch
-- Jan Wagner <waja@cyconet.org> Thu, 08 Apr 2010 23:54:05 +0200

View file

@ -4,7 +4,6 @@
18_check_game_cmdline.dpatch
22_check_smb_hostaddress.dpatch
23_check_smb_password.dpatch
27_check_radius_segfault.dpatch
32_check_ldap_pointer.dpatch
33_fix_emb_check_disk_smb.dpatch
34_fix_smbclient_check_disk_smb.dpatch

View file

@ -1,24 +0,0 @@
#! /bin/sh /usr/share/dpatch/dpatch-run
## 27_check_radius_segfault.dpatch by Yasper Casper <komputnik@gmail.com>
##
## DP: Fix for segfaulting check_radius plugin. (bugs.debian.org/399532 and bugs.debian.org/379788)
@DPATCH@
diff -urNad nagios-plugins-1.4.5~/plugins/check_radius.c nagios-plugins-1.4.5/plugins/check_radius.c
--- nagios-plugins-1.4.5~/plugins/check_radius.c 2006-10-20 01:53:28.000000000 +0200
+++ nagios-plugins-1.4.5/plugins/check_radius.c 2006-11-20 20:38:49.000000000 +0100
@@ -137,6 +137,14 @@
rc_read_dictionary (rc_conf_str (str)))
die (STATE_UNKNOWN, _("Config file error"));
+ /* Initialize Value Pair to prevent segfault on rc_avpair_add.
+ * debugging on radiuslib-ng show that the mem isn't allocated,
+ * and some random memory is in the USER-PASSWORD pair.
+ * So, after initialization, the password is filled with the correct values
+ */
+ data.send_pairs = NULL;
+ data.receive_pairs = NULL;
+
service = PW_AUTHENTICATE_ONLY;
if (!(rc_avpair_add (&data.send_pairs, PW_SERVICE_TYPE, &service, 0) &&