Using linelog with "-" in filename results in "--".
Arran Cudbard-Bell
a.cudbardb at freeradius.org
Thu Apr 16 20:00:04 CEST 2015
> On 16 Apr 2015, at 18:24, Chaigneau, Nicolas <nicolas.chaigneau at capgemini.com> wrote:
>
> Hello,
>
>
> 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.
-Arran
Arran Cudbard-Bell <a.cudbardb at freeradius.org>
FreeRADIUS development team
FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 872 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20150416/0d6e5fbd/attachment-0001.sig>
More information about the Freeradius-Users
mailing list