LDAP: profilePath and smbHome macro expansion

Andrew Bartlett abartlet at pcug.org.au
Mon Oct 29 05:29:51 GMT 2001


Simo Sorce wrote:
> 
> On Mon, Oct 29, 2001 at 11:21:58PM +1100, Andrew Bartlett wrote:
> [snip]
> > The problem occurs here: We have a the string, now macro expanded ready
> > for use.  Then we store the changes to that object - the macros is still
> > expanded, and there is no way to tell that there ever was a macro there
> > in the first place.
> >
> > This is double trouble if you consider PDC->BDC replication over NT
> > protocols, as these values *must* be in fully expanded form - what the
> > heck will NT do with the macros?
> >
> > As such I have just removed the references to macro expansion in the
> > other passdb modules - they it simply cannot be done properly in the
> > current code.
> >
> > The 'macro expansion' in pdb_smbpasswd is a little different - it is
> > never stored, as the values all come from lp_ functions.
> >
> > As far as I can see the best that can be done is to use the 'default if
> > not present' feature (as this can get a macro-containing value, and
> > can't be written back into the database) and to expand the macros at
> > storage time.  My recent changes make smbpasswd -a store correctly
> > expanded macros for new records.
> 
> I think this is the right way andrew, good job.

Thanks!  Its nice to know somebody else agrees on these things.

Even so, it would be really nice to be able to keep this functionality
in some form for some sites - so if anybody as some real suggestions on
how to implement it (probably by tagging fields as they are modified) I
would be glad to hear them.  But the solutions *must* be robust, or they
end up being of no value in any case.

All in all however, we should not attempt to confuse any SAM
substitution with the lp_ substitution, nor with how the lp_ functions
provide default values to some of these functions. (we have plenty of
hacks to clean up in this area already, see 'ssb_in_sam_logon').

Its a mess, hence my position above.

Thanks,

Andrew Bartlett

-- 
Andrew Bartlett                                 abartlet at pcug.org.au
Samba Team member, Build Farm maintainer        abartlet at samba.org
Student Network Administrator, Hawker College   abartlet at hawkerc.net
http://samba.org     http://build.samba.org     http://hawkerc.net




More information about the samba-technical mailing list