Downgrade issue with new ldb 2.0.0

Andrew Bartlett abartlet at samba.org
Tue May 21 10:19:55 UTC 2019


On Mon, 2019-04-08 at 16:00 +1200, Andrew Bartlett via samba-technical
wrote:
> Just a heads-up that we have noticed that we need to write a
> downgrade
> script (like sambaundoguididx) for Samba 4.11 (master) -> 4.10 and
> below. 
> 
> The symptom (eg on a dbcheck --reindex) is:
> 
> Invalid @ATTRIBUTES element for 'accountExpires'
> Failed to connect to 'tdb:///usr/local/samba/private/sam.ldb' with
> backend 'tdb': Unable to load ltdb cache records for backend 'ldb_tdb
> backend'
> 
> There is no issue on upgrade, just downgrade.
> 
> For non-Samba users of ldb additionally the ORDERED_INTEGER value
> would
> need to be specified in @ATTRIBUTES to opt in to this feature, so
> this
> really only matters for Samba because it auto-upgrades the @ATTRIBUTE
> record.
> 
> I'll soon write a script which drops the problem record by directly
> modifying the ldb, similar to sambaundoguididx.

So, I've been thinking long and hard about how to do this right, and
what I'm going to do (subject to comment here) is to finish the tie (as
it should always have been) of ORDERED_INTEGER support to GUID indexed
DBs.

That way, the downgrade is via exactly sambaundoguididx, which can then
be upgraded by running Samba 4.8 or later. 

I'll do this in ldb_kv_index_key() and in
dsdb_schema_set_indices_and_attributes().

Thanks,

Andrew Bartlett
-- 
Andrew Bartlett                       http://samba.org/~abartlet/
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba





More information about the samba-technical mailing list