Using %u in an include parameter
Richard Sharpe
sharpe at ns.aus.com
Tue Feb 1 19:52:01 GMT 2000
Hi,
it would be very useful in some cases to be able to do:
include = /etc/smb.conf.%u
However, Samba precludes that at the moment. This is because the function
handle_include in source/param/loadparm.c does a standard_sub_basic on the
file name that is specified, but not a standard_sub.
It does not do a standard_sub because it was not passwd a connection
structure, because reload_shares was not passed a connection structure, and
there are other cases where it is called and no connection structure is
available.
I propose the following. handle_include should have an extra parameter: a
connection structure. If this param is NULL, it will not call
standard_sub, but if non-NULL, it will call standard_sub on the file name.
Because handle_include is called from do_parameter, which is called as a
call-back, we will have to make provision to give the parsing functions an
argument that is passwd to both do_parameter and do_section.
However, this is not that difficult.
Is it worthwhile to do?
Regards
-------
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
mailing list