From: Alan T. DeKok Date: Tue, 11 Jan 2011 08:54:40 +0000 (+0100) Subject: Allow hints && huntgroup files to be NULL X-Git-Tag: release_2_1_11~160 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c502ec2119d7ef911dca547bb262f67245ef3303;p=thirdparty%2Ffreeradius-server.git Allow hints && huntgroup files to be NULL --- diff --git a/src/modules/rlm_preprocess/rlm_preprocess.c b/src/modules/rlm_preprocess/rlm_preprocess.c index 34acc5620a1..6a866ee5df5 100644 --- a/src/modules/rlm_preprocess/rlm_preprocess.c +++ b/src/modules/rlm_preprocess/rlm_preprocess.c @@ -483,21 +483,26 @@ static int preprocess_instantiate(CONF_SECTION *conf, void **instance) /* * Read the huntgroups file. */ - rcode = pairlist_read(data->huntgroup_file, &(data->huntgroups), 0); - if (rcode < 0) { - radlog(L_ERR|L_CONS, "rlm_preprocess: Error reading %s", - data->huntgroup_file); - return -1; + if (data->huntgroup_file) { + rcode = pairlist_read(data->huntgroup_file, + &(data->huntgroups), 0); + if (rcode < 0) { + radlog(L_ERR|L_CONS, "rlm_preprocess: Error reading %s", + data->huntgroup_file); + return -1; + } } /* * Read the hints file. */ - rcode = pairlist_read(data->hints_file, &(data->hints), 0); - if (rcode < 0) { - radlog(L_ERR|L_CONS, "rlm_preprocess: Error reading %s", - data->hints_file); - return -1; + if (data->hints_file) { + rcode = pairlist_read(data->hints_file, &(data->hints), 0); + if (rcode < 0) { + radlog(L_ERR|L_CONS, "rlm_preprocess: Error reading %s", + data->hints_file); + return -1; + } } /*