[patch] radtest PPPhint option is not parsed properly

Alan DeKok aland at deployingradius.com
Wed Sep 26 23:20:03 CEST 2012


Brian Candler wrote:
> radtest starts with /bin/sh, not /bin/bash. Are you sure this
> regexp-matching stuff is in a vanilla POSIX shell? I don't think it is.

  Me either.  FreeRADIUS runs on Linux, *BSD, Solaris, and (at one time)
AIX and HPUX.  Portability is good.

> This bombs out if you give a non-numeric value, but then that's your fault
> for passing bad data.  A more backwards-compatible approach is simply:
> 
>   if [ "$6" != "" -a "$6" != "0" ]

  That should work, I think.

  Alan DeKok.


More information about the Freeradius-Devel mailing list