literal '%' in smb.conf
Andrew Bartlett
abartlet at samba.org
Mon May 7 10:20:24 GMT 2007
Dragging up an old thread I realised never got anywhere...
On Thu, 2007-03-08 at 14:50 +1100, Alison Winters wrote:
> Andrew Bartlett wrote:
> > On Thu, 2007-03-08 at 12:28 +1100, Alison Winters wrote:
> >> I've been looking at the alloc_sub_basic() case statement in
> >> source/lib/substitute.c and i can't see a way to insert a literal '%'.
> >> I think this means that if you have a '%' followed by a 'U' you will
> >> always get a username substitution regardless of if it was desired or
> >> not. Would it make sense to add a facility to do literal '%' characters
> >> in the config file? I wonder because characters like '%' are valid
> >> characters for AD logon names, filenames etc.
> > Doesn't %% work?
> >
> It doesn't appear to.
> 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...
Andrew Bartlett
--
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
Samba Developer, Red Hat Inc. http://redhat.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba-technical/attachments/20070507/7d579a0f/attachment.bin
More information about the samba-technical
mailing list