mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
selftest: Add expected-value testing for userParameters
This does not means that bugs like https://bugzilla.samba.org/show_bug.cgi?id=11881 are fixed, however we do not wish to cause further issues without noticing it, eg during python3 fixes for dbcheck. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
This commit is contained in:
parent
fbea9d3699
commit
d114ca1e64
@ -0,0 +1,48 @@
|
||||
dn: CN=Guest,CN=Users,DC=release-4-1-0rc3,DC=samba,DC=corp
|
||||
userParameters:: QwB0AHgAQwBmAGcAUAByAGUAcwBlAG4AdAAgACAAIAAgACAAIAAgACAAIAAgA
|
||||
CAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAUAALABoACA
|
||||
ABAEMAdAB4AEMAZgBnAFAAcgBlAHMAZQBuAHQANTUxZTBiYjAgAAIAAQBDAHQAeABXAEYAUAByAG8
|
||||
AZgBpAGwAZQBQAGEAdABoADAwGAACAAEAQwB0AHgAVwBGAEgAbwBtAGUARABpAHIAMDAiAAIAAQBD
|
||||
AHQAeABXAEYASABvAG0AZQBEAGkAcgBEAHIAaQB2AGUAMDASAAgAAQBDAHQAeABTAGgAYQBkAG8Ad
|
||||
wAwMTAwMDAwMC4ACAABAEMAdAB4AE0AYQB4AEQAaQBzAGMAbwBuAG4AZQBjAHQAaQBvAG4AVABpAG
|
||||
0AZQBlMDkzMDQwMCgACAABAEMAdAB4AE0AYQB4AEMAbwBuAG4AZQBjAHQAaQBvAG4AVABpAG0AZQA
|
||||
0MDc3MWIwMBwACAABAEMAdAB4AE0AYQB4AEkAZABsAGUAVABpAG0AZQBjMDI3MDkwMCAAAgABAEMA
|
||||
dAB4AFcAbwByAGsARABpAHIAZQBjAHQAbwByAHkAMDAYAAgAAQBDAHQAeABDAGYAZwBGAGwAYQBnA
|
||||
HMAMQAwMGYwMjY4MCIAAgABAEMAdAB4AEkAbgBpAHQAaQBhAGwAUAByAG8AZwByAGEAbQAwMA==
|
||||
|
||||
dn: CN=krbtgt,CN=Users,DC=release-4-1-0rc3,DC=samba,DC=corp
|
||||
userParameters:: QwB0AHgAQwBmAGcAUAByAGUAcwBlAG4AdAAgACAAIAAgACAAIAAgACAAIAAgA
|
||||
CAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAUAALABoACA
|
||||
ABAEMAdAB4AEMAZgBnAFAAcgBlAHMAZQBuAHQANTUxZTBiYjAgAAIAAQBDAHQAeABXAEYAUAByAG8
|
||||
AZgBpAGwAZQBQAGEAdABoADAwGAACAAEAQwB0AHgAVwBGAEgAbwBtAGUARABpAHIAMDAiAAIAAQBD
|
||||
AHQAeABXAEYASABvAG0AZQBEAGkAcgBEAHIAaQB2AGUAMDASAAgAAQBDAHQAeABTAGgAYQBkAG8Ad
|
||||
wAwMTAwMDAwMC4ACAABAEMAdAB4AE0AYQB4AEQAaQBzAGMAbwBuAG4AZQBjAHQAaQBvAG4AVABpAG
|
||||
0AZQBlMDkzMDQwMCgACAABAEMAdAB4AE0AYQB4AEMAbwBuAG4AZQBjAHQAaQBvAG4AVABpAG0AZQA
|
||||
0MDc3MWIwMBwACAABAEMAdAB4AE0AYQB4AEkAZABsAGUAVABpAG0AZQBjMDI3MDkwMCAAAgABAEMA
|
||||
dAB4AFcAbwByAGsARABpAHIAZQBjAHQAbwByAHkAMDAYAAgAAQBDAHQAeABDAGYAZwBGAGwAYQBnA
|
||||
HMAMQAwMGYwMjY4MCIAAgABAEMAdAB4AEkAbgBpAHQAaQBhAGwAUAByAG8AZwByAGEAbQAwMA==
|
||||
|
||||
dn: CN=Administrator,CN=Users,DC=release-4-1-0rc3,DC=samba,DC=corp
|
||||
userParameters:: IAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgA
|
||||
CAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAI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AGcAcgBhAG0AMDAiAAIAAQBDAHQAeABDAGEAbABsAGIAYQB
|
||||
jAGsATgB1AG0AYgBlAHIAMDA=
|
||||
|
||||
ref: ldap:///CN=Configuration,DC=release-4-1-0rc3,DC=samba,DC=corp
|
||||
|
||||
ref: ldap:///DC=DomainDnsZones,DC=release-4-1-0rc3,DC=samba,DC=corp
|
||||
|
||||
ref: ldap:///DC=ForestDnsZones,DC=release-4-1-0rc3,DC=samba,DC=corp
|
||||
|
@ -142,6 +142,18 @@ EOF
|
||||
fi
|
||||
}
|
||||
|
||||
check_expected_userparameters() {
|
||||
if [ x$RELEASE = x"release-4-1-0rc3" ]; then
|
||||
tmpldif=$PREFIX_ABS/$RELEASE/expected-userParameters-after-dbcheck.ldif.tmp
|
||||
TZ=UTC $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb userParameters=* -s sub -b DC=release-4-1-0rc3,DC=samba,DC=corp userParameters --sorted | grep -v \# > $tmpldif
|
||||
diff $tmpldif $release_dir/expected-userParameters-after-dbcheck.ldif
|
||||
if [ "$?" != "0" ]; then
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
reindex() {
|
||||
$PYTHON $BINDIR/samba-tool dbcheck --reindex -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb $@
|
||||
}
|
||||
@ -406,6 +418,7 @@ if [ -d $release_dir ]; then
|
||||
testit "add_userparameters3" add_userparameters3
|
||||
testit_expect_failure "dbcheck2" dbcheck2
|
||||
testit "dbcheck_clean2" dbcheck_clean2
|
||||
testit "check_expected_userparameters" check_expected_userparameters
|
||||
testit "rm_deleted_objects" rm_deleted_objects
|
||||
# We must re-index again because rm_deleted_objects went behind
|
||||
# the back of the main sam.ldb.
|
||||
|
Loading…
Reference in New Issue
Block a user