selftest: Fix upgradeprovision test by importing new objects for schema 45
authorAndrew Bartlett <>
Tue, 12 Dec 2017 02:26:35 +0000 (15:26 +1300)
committerAndrew Bartlett <>
Thu, 14 Dec 2017 07:20:16 +0000 (08:20 +0100)
The recent schema changes mean that the upgradeprovision test starts
failing. This is because it's using an old 4.0.0 schema (that doesn't
have these schema changes), but it's comparing it against a fresh
provision (which does have the changes). We can avoid this failure by
using the 'samba-tool domain schemaupgrade' to bring the old 4.0.0 schema
in line with a fresh provision. Note that the 'upgradeprovision --full'
test doesn't need this change as it seems to more aggressively copy over
any schema differences with a fresh provision.

Signed-off-by: Andrew Bartlett <>
Reviewed-by: Garming Sam <>
selftest/knownfail.d/schema45 [deleted file]

diff --git a/selftest/knownfail.d/schema45 b/selftest/knownfail.d/schema45
deleted file mode 100644 (file)
index a95ed54..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# This has a full set of extended rights for schema 45 in the
-# new provision code, but not in the upgrade path
\ No newline at end of file
index 9042f079656e2838ebfed28249e134fdcbbdf7d6..df054e868ad4e70fa7b0ff0d1dd089508ba4d3e2 100755 (executable)
@@ -79,7 +79,11 @@ dbcheck_full_clean_well_known_acls() {
 upgradeprovision() {
+       # bring the really old Samba schema in line with a more recent 2008R2 schema
        $PYTHON $BINDIR/samba_upgradeprovision -s "$PREFIX_ABS/${RELEASE}_upgrade/etc/smb.conf" --debugchange
+       # on top of this, also apply 2008R2 changes we accidentally missed in the past
+       $BINDIR/samba-tool domain schemaupgrade -H tdb://$PREFIX_ABS/${RELEASE}_upgrade/private/sam.ldb --ldf-file=samba-4.7-missing-for-schema45.ldif
 upgradeprovision_full() {