%U vs %u substitutions
sharpe at ns.aus.com
Thu Oct 28 18:08:28 GMT 1999
I was writing up stuff about % substitutions and I noticed something funny.
%U is processed in standard_sub_basic, which does not require a connection
structure. %u is processed by standard_sub, which does require a
However, it seems like there are times when standard_sub_basic will be
called when %U does not yet have a value, ie, when the SessSetup&X has not
yet been processed by smbd.
Hmmm, now I see it a bit better after looking at the code and thinking
There are three phases, roughly speaking:
>From startup to before the SessSetup&X
>From SessSetup and X to TreeCon
After TreeCon ...
Try the following:
It produces interesting results ...
So, I guess the distinction to be made here is that standard_sub_basic
substitutions only do substitutions that make sense in the absence of any
tree connects having been done (which translates into a connection from
Samba's point of view), while standard_sub is called with a connection
structure (ie service) and can make all the substitutions it wants to.
Richard Sharpe, sharpe at ns.aus.com, Master Linux Administrator :-),
Samba (Team member, www.samba.org), Ethereal (Team member, www.zing.org)
Co-author, SAMS Teach Yourself Samba in 24 Hours
Author: First Australian 5-day, intensive, hands-on Linux SysAdmin course
More information about the samba-technical