LDAP: profilePath and smbHome macro expansion

Simo Sorce idra at samba.org
Mon Oct 29 05:08:03 GMT 2001


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.


-- 
Simo Sorce       idra at samba.org
-------------------------------
Samba Team http://www.samba.org




More information about the samba-technical mailing list