s3:libsmb: let get_ipc_connect() use CLI_FULL_CONNECTION_FORCE_SMB1
[Samba.git] / testprogs / blackbox / dbcheck.sh
blob387ce70eefc4a9176aa174b5a604b634059c7487
1 #!/bin/sh
3 if [ $# -lt 1 ]; then
4 cat <<EOF
5 Usage: dbcheck.sh PREFIX
6 EOF
7 exit 1;
8 fi
10 PREFIX="$1"
11 shift 1
12 ARGS=$@
14 . `dirname $0`/subunit.sh
16 dbcheck() {
17 $BINDIR/samba-tool dbcheck --cross-ncs $ARGS
20 # This list of attributes can be freely extended
21 dbcheck_fix_one_way_links() {
22 $BINDIR/samba-tool dbcheck --quiet --fix --yes fix_all_string_dn_component_mismatch --attrs="lastKnownParent defaultObjectCategory fromServer rIDSetReferences" --cross-ncs $ARGS
25 # This list of attributes can be freely extended
26 dbcheck_fix_stale_links() {
27 $BINDIR/samba-tool dbcheck --quiet --fix --yes remove_plausible_deleted_DN_links --attrs="member msDS-NC-Replica-Locations msDS-NC-RO-Replica-Locations" --cross-ncs $ARGS
30 # This list of attributes can be freely extended
31 dbcheck_fix_crosspartition_backlinks() {
32 # we may not know the target yet when we receive a cross-partition link,
33 # which can result in a missing backlink
34 $BINDIR/samba-tool dbcheck --quiet --fix --yes fix_all_missing_backlinks --attrs="serverReference" --cross-ncs $ARGS
37 # This test shows that this does not do anything to a current
38 # provision (that would be a bug)
39 dbcheck_reset_well_known_acls() {
40 $BINDIR/samba-tool dbcheck --cross-ncs --reset-well-known-acls $ARGS
43 reindex() {
44 $BINDIR/samba-tool dbcheck --reindex $ARGS
47 fixed_attrs() {
48 $BINDIR/samba-tool dbcheck --attrs=cn $ARGS
51 force_modules() {
52 $BINDIR/samba-tool dbcheck --force-modules $ARGS
55 dbcheck_fix_one_way_links
56 dbcheck_fix_stale_links
57 dbcheck_fix_crosspartition_backlinks
58 testit "dbcheck" dbcheck
59 testit "reindex" reindex
60 testit "fixed_attrs" fixed_attrs
61 testit "force_modules" force_modules
63 exit $failed