diff options
author | Douglas Bagnall <douglas.bagnall@catalyst.net.nz> | 2015-06-22 16:38:29 +1200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2015-10-29 05:08:15 +0100 |
commit | 8fe9992cffed82e9e26ebe8185f372c8a1dfb3a9 (patch) | |
tree | a9ef08c1f0f3d98c2801c3f680f53212b1bb33f4 /source4/scripting | |
parent | 47b3334f48f21118ba1f61e841eb95920f384ee4 (diff) | |
download | samba-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-x | source4/scripting/bin/samba_kcc | 5 |
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() |