1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## 27_check_radius_segfault.dpatch by Yasper Casper <komputnik@gmail.com>
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
10 rc_read_dictionary (rc_conf_str (str)))
11 die (STATE_UNKNOWN, _("Config file error"));
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
18 + data.send_pairs = NULL;
19 + data.receive_pairs = NULL;
21 service = PW_AUTHENTICATE_ONLY;
23 if (!(rc_avpair_add (&data.send_pairs, PW_SERVICE_TYPE, &service, 0) &&