5 Usage: dbcheck.sh PREFIX
14 . $
(dirname $0)/subunit.sh
18 $PYTHON $BINDIR/samba-tool dbcheck
--cross-ncs $ARGS
21 # This list of attributes can be freely extended
22 dbcheck_fix_one_way_links
()
24 $PYTHON $BINDIR/samba-tool dbcheck
--quiet --fix --yes fix_all_old_dn_string_component_mismatch
--attrs="lastKnownParent defaultObjectCategory fromServer rIDSetReferences" --cross-ncs $ARGS
27 # This list of attributes can be freely extended
28 dbcheck_fix_stale_links
()
30 $PYTHON $BINDIR/samba-tool dbcheck
--quiet --fix --yes remove_plausible_deleted_DN_links
--attrs="member msDS-NC-Replica-Locations msDS-NC-RO-Replica-Locations msDS-RevealOnDemandGroup msDS-NeverRevealGroup msDS-RevealedUsers" --cross-ncs $ARGS
33 # This list of attributes can be freely extended
34 dbcheck_fix_crosspartition_backlinks
()
36 # we may not know the target yet when we receive a cross-partition link,
37 # which can result in a missing backlink
38 $PYTHON $BINDIR/samba-tool dbcheck
--quiet --fix --yes fix_all_missing_backlinks
--attrs="serverReference" --cross-ncs $ARGS
41 # This test shows that this does not do anything to a current
42 # provision (that would be a bug)
43 dbcheck_reset_well_known_acls
()
45 $PYTHON $BINDIR/samba-tool dbcheck
--cross-ncs --reset-well-known-acls $ARGS
50 $PYTHON $BINDIR/samba-tool dbcheck
--reindex $ARGS
55 $PYTHON $BINDIR/samba-tool dbcheck
--attrs=cn
$ARGS
60 $PYTHON $BINDIR/samba-tool dbcheck
--force-modules $ARGS
63 dbcheck_fix_one_way_links
64 dbcheck_fix_stale_links
65 dbcheck_fix_crosspartition_backlinks
66 testit
"dbcheck" dbcheck || failed
=$
(expr $failed + 1)
67 testit
"reindex" reindex || failed
=$
(expr $failed + 1)
68 testit
"fixed_attrs" fixed_attrs || failed
=$
(expr $failed + 1)
69 testit
"force_modules" force_modules || failed
=$
(expr $failed + 1)
70 testit
"reset_well_known_acls" dbcheck_reset_well_known_acls || failed
=$
(expr $failed + 1)