Using linelog with "-" in filename results in "--".

Chaigneau, Nicolas nicolas.chaigneau at capgemini.com
Fri Apr 17 09:00:09 CEST 2015


> > 
> > 
> > I'm using 3.0.x with linelog module, with a filename set up as follows:
> > 
> > filename=${logdir}/RadiusTrace-%{Client-Shortname}-%Y%m%d%H.log
> > 
> > 
> > In clients.conf I have some clients which contain "-" characters.
> > When the linelog creates the output file, the "-" are doubled (resulting in "--" in the file name).
> > 
> > (This is done in function rad_filename_escape from main\util.c)
> > 
> > 
> > 
> > Is there a way to prevent this ?
> 
> The escape function produces POSIX fully portable filenames, whilst allowing recovery of the input text.
> 
> It should be possible to modify the escape functions so that hyphen doesn't have another hyphen to escape it, unless the  hyphen in the src string was before a disallowed character.
> 
> Thinking about it, that's probably a good idea.
> 


Can this be considered a bug so it can be done in 3.0.x ? :)


Alternatively, rlm_detail provides a parameter (escape_filenames) that allows to disable the escaping.

Maybe this could be a good idea to do this also for rlm_linelog.

This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.




More information about the Freeradius-Users mailing list