freeradius 3.0.0 fails to start on ppc64 and s390 architectures

John Dennis jdennis at redhat.com
Thu Nov 14 15:30:54 CET 2013


On 11/14/2013 08:29 AM, Arran Cudbard-Bell wrote:
> 
> On 14 Nov 2013, at 02:48, John Dennis <jdennis at redhat.com> wrote:
> 
>> On the ppc64 and s390 architectures radiusd fails to start emitting
>> these errors:
>>
>> Error: /etc/raddb/mods-enabled/echo[34]: Cannot read output pairs if
>> wait = no
>> Error: /etc/raddb/mods-enabled/echo[34]: Instantiation failed for module
>> "echo"
>>
>> The problem is due to using the wrong type in the module config struct
>> passed to the config file parser. The type was declared as bool but
>> conffile.c treats PW_TYPE_BOOLEAN as an int. This causes an if test to
>> fail because the bool value is not true when it should be. This is in
>> rlm_exec.c. I found 1 other module which had bool's declared for
>> PW_TYPE_BOOLEAN config items, rlm_pap.c.
> 
> Out of interest did the compiler emit warnings about the size mismatch? 

No compiler warnings. I also did a Coverity scan of the source tree and
although a number of warnings were reported this issue was not detected.
However I'm not surprised, the way the code works with pointer offsets
to void * (untyped) targets it would be remarkable if a tool could
deduce incorrect type declarations.

> 
> Bool is the correct type to use here, the conffile code should be updated
> to treat booleans as the bool type.
> 
> It shouldn't be that hard to find where boolean values are using in module
> configurations, i'll take a look at completing the conversion from int to
> bool.
> 
> Arran Cudbard-Bell <a.cudbardb at freeradius.org>
> FreeRADIUS Development Team
> 
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html
> 


-- 
John


More information about the Freeradius-Devel mailing list