]> git.pld-linux.org Git - packages/nagios-plugins.git/blob - nagios-plugins-check_radius_segfault.patch
fix check_file_age utils.pm locate
[packages/nagios-plugins.git] / nagios-plugins-check_radius_segfault.patch
1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## 27_check_radius_segfault.dpatch by Yasper Casper <komputnik@gmail.com>
3 ##
4
5 @DPATCH@
6 diff -urNad nagios-plugins-1.4.5~/plugins/check_radius.c nagios-plugins-1.4.5/plugins/check_radius.c
7 --- nagios-plugins-1.4.5~/plugins/check_radius.c        2006-10-20 01:53:28.000000000 +0200
8 +++ nagios-plugins-1.4.5/plugins/check_radius.c 2006-11-20 20:38:49.000000000 +0100
9 @@ -137,6 +137,14 @@
10                         rc_read_dictionary (rc_conf_str (str)))
11                 die (STATE_UNKNOWN, _("Config file error"));
12  
13 +       /* Initialize Value Pair to prevent segfault on rc_avpair_add. 
14 +        * debugging on radiuslib-ng show that the mem isn't allocated,
15 +        * and some random memory is in the USER-PASSWORD pair.
16 +        * So, after initialization, the password is filled with the correct values 
17 +        */
18 +       data.send_pairs = NULL;
19 +       data.receive_pairs = NULL;
20 +
21         service = PW_AUTHENTICATE_ONLY;
22  
23         if (!(rc_avpair_add (&data.send_pairs, PW_SERVICE_TYPE, &service, 0) &&
This page took 0.030503 seconds and 3 git commands to generate.