mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
netcmd/ldapcmp: pass --skip-missing-dn to LDAPBase
This option has default value False, and was actually not passed down from cli to LDAPBase. However, LDAPBase.__init__ has default value True for it. After the change, a few tests using ldapcmp are affected. Add --skip-missing-dn explicitly to keep the behavior consistent, otherwise test will fail. Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
bbd082e792
commit
2851cd5bcc
@ -949,13 +949,13 @@ class cmd_ldapcmp(Command):
|
||||
con1 = LDAPBase(URL1, creds, lp,
|
||||
two=two, quiet=quiet, descriptor=descriptor, sort_aces=sort_aces,
|
||||
verbose=verbose, view=view, base=base, scope=scope,
|
||||
outf=self.outf, errf=self.errf)
|
||||
outf=self.outf, errf=self.errf, skip_missing_dn=skip_missing_dn)
|
||||
assert len(con1.base_dn) > 0
|
||||
|
||||
con2 = LDAPBase(URL2, creds2, lp,
|
||||
two=two, quiet=quiet, descriptor=descriptor, sort_aces=sort_aces,
|
||||
verbose=verbose, view=view, base=base2, scope=scope,
|
||||
outf=self.outf, errf=self.errf)
|
||||
outf=self.outf, errf=self.errf, skip_missing_dn=skip_missing_dn)
|
||||
assert len(con2.base_dn) > 0
|
||||
|
||||
filter_list = filter.split(",")
|
||||
|
@ -61,7 +61,7 @@ provision_2012r2() {
|
||||
ldapcmp_ignore() {
|
||||
# At some point we will need to ignore, but right now, it should be perfect
|
||||
IGNORE_ATTRS=$1
|
||||
$PYTHON $BINDIR/samba-tool ldapcmp tdb://$PREFIX_ABS/$2/private/sam.ldb tdb://$PREFIX_ABS/$3/private/sam.ldb --two
|
||||
$PYTHON $BINDIR/samba-tool ldapcmp tdb://$PREFIX_ABS/$2/private/sam.ldb tdb://$PREFIX_ABS/$3/private/sam.ldb --two --skip-missing-dn
|
||||
}
|
||||
|
||||
ldapcmp() {
|
||||
|
@ -59,7 +59,7 @@ ldapcmp_with_orig() {
|
||||
IGNORE_ATTRS="$IGNORE_ATTRS,serverReferenceBL,msDS-IsDomainFor"
|
||||
|
||||
LDAPCMP_CMD="$PYTHON $BINDIR/samba-tool ldapcmp"
|
||||
$LDAPCMP_CMD $DB1_PATH $DB2_PATH --two --filter=$IGNORE_ATTRS $BASE_DN_OPTS
|
||||
$LDAPCMP_CMD $DB1_PATH $DB2_PATH --two --skip-missing-dn --filter=$IGNORE_ATTRS $BASE_DN_OPTS
|
||||
}
|
||||
|
||||
# check that the restored testenv DC basically matches the original
|
||||
|
@ -50,7 +50,7 @@ ldapcmp_ignore() {
|
||||
# objects, but we don't have the 2012 DisplaySpecifiers documentation...
|
||||
IGNORE_ATTRS="$IGNORE_ATTRS,adminContextMenu,adminPropertyPages"
|
||||
|
||||
$PYTHON $BINDIR/samba-tool ldapcmp tdb://$PREFIX_ABS/$2_schema/private/sam.ldb tdb://$PREFIX_ABS/$3_schema/private/sam.ldb --two --filter=$IGNORE_ATTRS
|
||||
$PYTHON $BINDIR/samba-tool ldapcmp tdb://$PREFIX_ABS/$2_schema/private/sam.ldb tdb://$PREFIX_ABS/$3_schema/private/sam.ldb --two --filter=$IGNORE_ATTRS --skip-missing-dn
|
||||
}
|
||||
|
||||
ldapcmp_old() {
|
||||
|
Loading…
Reference in New Issue
Block a user