literal '%' in smb.conf
alisonw at sgi.com
Tue May 8 01:55:10 GMT 2007
Andrew Bartlett wrote:
> Dragging up an old thread I realised never got anywhere...
> On Thu, 2007-03-08 at 14:50 +1100, Alison Winters wrote:
>> Judging by what's in substitute.c it looks like it will always
>> substitute known macros regardless, otherwise it will use a literal '%'.
>> That's kinda wonky behavior if you need to use a literal '%' next to a
>> character reserved for macros. We could add '%%' a la printf, but that
>> may regress people's existing smb.confs that expect it to work otherwise.
> It still seems like a reasonable change. It seems silly we can never
> escape that...
Indeed. This fix should be trivial (add an option to alloc_sub_basic to
do something like realloc_string_sub(a_string, "%%", "%")). But it's
also silly that backslashes sometimes have meaning and other times do
think Samba would gain a lot from an audit of what values are expected
and legal for each smb.conf option.
More information about the samba-technical