summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>2015-06-22 16:38:29 +1200
committerAndrew Bartlett <abartlet@samba.org>2015-10-29 05:08:15 +0100
commit8fe9992cffed82e9e26ebe8185f372c8a1dfb3a9 (patch)
treea9ef08c1f0f3d98c2801c3f680f53212b1bb33f4 /source4/scripting
parent47b3334f48f21118ba1f61e841eb95920f384ee4 (diff)
downloadsamba-8fe9992cffed82e9e26ebe8185f372c8a1dfb3a9.tar.gz
KCC: load samdb before calling kcc.run()
kcc.run() is a mega-function that does nearly everything, including loading the database. The --list-valid-dsas and --test-all-reps-from tasks also want to load the database, but not do all that other run() stuff, so it makes sense to pull it out. When the samdb has not been loaded, run() will still load it -- this avoids having to change all the tests. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/scripting')
-rwxr-xr-xsource4/scripting/bin/samba_kcc5
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/scripting/bin/samba_kcc b/source4/scripting/bin/samba_kcc
index 449edda4c48..b0bb61633fb 100755
--- a/source4/scripting/bin/samba_kcc
+++ b/source4/scripting/bin/samba_kcc
@@ -292,13 +292,14 @@ if opts.importldif:
if rc != 0:
sys.exit(rc)
+
+kcc.load_samdb(opts.dburl, lp, creds, force=False)
+
if opts.test_all_reps_from:
- kcc.load_samdb(opts.dburl, lp, creds, force=False)
test_all_reps_from(kcc, lp, creds, unix_now, rng_seed=opts.seed)
sys.exit()
if opts.list_valid_dsas:
- kcc.load_samdb(opts.dburl, lp, creds, force=False)
print '\n'.join(kcc.list_dsas())
sys.exit()