rlm_rediswho with spaces

Brian Candler B.Candler at pobox.com
Fri Oct 26 23:59:17 CEST 2012


On Fri, Oct 26, 2012 at 09:25:55PM +0100, Brian Candler wrote:
> >   My $0.02 is to do what src/main/exec.c does.  Pass the *raw* query
> > string into rlm_redis_query.  It then splits the string into argv, and
> > calls radius_xlat() on each one.  It then passes the argv array to
> > redisCommand.
> 
> I'll see if I can rework this; I think it will involve changing redis_query
> to take an argv/argc set of arguments instead of a char* query.
> 
> FWIW, I also found another problem, which is that the TRIM command was never
> being called.  There's a fix for that on my branch now, but it'll get
> rebased when I sort the other issue.

OK this is now available at
https://github.com/candlerb/freeradius-server/commits/candlerb/redis_escaping

commit d498c4c: pushes down the xlat functionality into rlm_redis_query,
where it splits into arguments, xlats each one separately, and passes
to redisCommandArgv.

(As a side effect of this, redis_escape_func is no longer used or needed,
but I have left the code in there)

commit cfc6e78: fixes the trim functionality

I have given it a basic functional test, and it all seems OK.

Regards,

Brian.


More information about the Freeradius-Devel mailing list