Revert "s3: vfs: add user_vfs_evg to connection_struct"
[Samba.git] / testprogs / blackbox / join_ldapcmp.sh
blob30d3e1e0192d711c2cebc557cf17aef127ab4c26
1 #!/bin/sh
2 # Does a join against the testenv's DC and then runs ldapcmp on the resulting DB
4 . `dirname $0`/subunit.sh
6 TARGET_DIR="$PREFIX_ABS/join_$SERVER"
8 cleanup_output_dir()
10 if [ -d $TARGET_DIR ]; then
11 rm -fr $TARGET_DIR
15 SAMBA_TOOL="$PYTHON $BINDIR/samba-tool"
17 join_dc() {
18 JOIN_ARGS="--targetdir=$TARGET_DIR --server=$SERVER -U$USERNAME%$PASSWORD"
19 $SAMBA_TOOL domain join $REALM dc $JOIN_ARGS --option="netbios name = TESTJOINDC"
22 ldapcmp_result() {
23 DB1_PATH="tdb://$PREFIX_ABS/$SERVER/private/sam.ldb"
24 DB2_PATH="tdb://$TARGET_DIR/private/sam.ldb"
26 # interSiteTopologyGenerator gets periodically updated. With the restored
27 # testenvs, it can sometimes point to the old/deleted DC object still
28 $SAMBA_TOOL ldapcmp $DB1_PATH $DB2_PATH --filter=interSiteTopologyGenerator
31 cleanup_output_dir
33 # check that we can join this DC
34 testit "check_dc_join" join_dc
36 # check resulting DB matches server DC
37 testit "new_db_matches" ldapcmp_result
39 cleanup_output_dir
41 exit $failed