Using %u in an include parameter
Luke Kenneth Casson Leighton
lkcl at samba.org
Thu Feb 3 05:57:03 GMT 2000
richard,
this needs to be considered very carefully. it's feasible, however all
these extensions being considered are going to stress the smb.conf concept
quite a lot, and it's already a complex issue to be able to get msrpc
daemons to have the same chracteristics as the smbd process that requested
the services of an msrpc daemon. On Thu, 3 Feb 2000, Richard Sharpe wrote:
what happens to rpcclient, smbclient and nmbd etc, which do not _have_ the
concept of a %u?
what behaviour is expected?
should the standard_sub() just be ignored?
where are you going to _get_ a connection_struct from in order to be able
to call handle_include, in rpcclient, smbclient and nmbd?
in fact, in anythoing _other_ than smbd, you can't.
%u and all other associated parameters in standard_sub only actual mean
anything to smbd, and no other programs.
this implies that another "include" parameter is actually needed, on a
per-share basis:
[someshare]
share include = /usr/local/samba/lib/smb.conf.%u
then and only then will %u actually have significcance, as it's really
clear that it's a per-share thing.
comments anyone? am i off-the-beaten-track, here? anyone see any logic
flaws here?
> 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
>
<a href="mailto:lkcl at samba.org" > Luke Kenneth Casson Leighton </a>
<a href="http://www.cb1.com/~lkcl"> Samba and Network Development </a>
<a href="http://samba.org" > Samba Web site </a>
<a href="http://www.iss.net" > Internet Security Systems, Inc. </a>
<a href="http://mcp.com" > Macmillan Technical Publishing </a>
ISBN1578701503 DCE/RPC over SMB: Samba and Windows NT Domain Internals
More information about the samba-technical
mailing list