diff options
author | Douglas Bagnall <douglas.bagnall@catalyst.net.nz> | 2015-06-23 16:38:29 +1200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2015-10-29 05:08:16 +0100 |
commit | 46ac3a5308dfc5d03173bbae03734ba327f0e570 (patch) | |
tree | e5df6ce700b0f508cf2b631b5d9066c6530306a8 | |
parent | 6f93ffaf0c446cd72478317636c0dcd7e0f4f4b8 (diff) | |
download | samba-46ac3a5308dfc5d03173bbae03734ba327f0e570.tar.gz |
KCC: kcc.import_ldif doesn't need creds
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>
-rw-r--r-- | python/samba/kcc/__init__.py | 3 | ||||
-rw-r--r-- | python/samba/tests/kcc/ldif_import_export.py | 6 | ||||
-rwxr-xr-x | source4/scripting/bin/samba_kcc | 2 |
3 files changed, 5 insertions, 6 deletions
diff --git a/python/samba/kcc/__init__.py b/python/samba/kcc/__init__.py index 15e05a93f06..c3e92b7cbfd 100644 --- a/python/samba/kcc/__init__.py +++ b/python/samba/kcc/__init__.py @@ -2582,7 +2582,7 @@ class KCC(object): return 0 - def import_ldif(self, dburl, lp, creds, ldif_file, forced_local_dsa=None): + def import_ldif(self, dburl, lp, ldif_file, forced_local_dsa=None): """Import relevant objects and attributes from an LDIF file. The point of this function is to allow a programmer/debugger to @@ -2595,7 +2595,6 @@ class KCC(object): :param dburl: path to the temporary abbreviated db to create :param lp: a loadparm object. - :param cred: a Credentials object. :param ldif_file: path to the ldif file to import :param forced_local_dsa: perform KCC from this DSA's point of view :return: zero on success, 1 on error diff --git a/python/samba/tests/kcc/ldif_import_export.py b/python/samba/tests/kcc/ldif_import_export.py index 4636d91945f..b94fbcaafb4 100644 --- a/python/samba/tests/kcc/ldif_import_export.py +++ b/python/samba/tests/kcc/ldif_import_export.py @@ -169,7 +169,7 @@ class KCCMultisiteLdifTests(samba.tests.TestCaseInTempDir): my_kcc = KCC(unix_now, readonly=readonly, verify=verify, dot_file_dir=dot_file_dir) tmpdb = os.path.join(self.tempdir, 'tmpdb') - my_kcc.import_ldif(tmpdb, self.lp, self.creds, MULTISITE_LDIF) + my_kcc.import_ldif(tmpdb, self.lp, MULTISITE_LDIF) self.remove_files(tmpdb) return my_kcc @@ -185,7 +185,7 @@ class KCCMultisiteLdifTests(samba.tests.TestCaseInTempDir): """ my_kcc = self._get_kcc('test-verify', verify=True) tmpdb = os.path.join(self.tempdir, 'verify-tmpdb') - my_kcc.import_ldif(tmpdb, self.lp, self.creds, MULTISITE_LDIF) + my_kcc.import_ldif(tmpdb, self.lp, MULTISITE_LDIF) my_kcc.run(None, self.lp, self.creds, @@ -198,7 +198,7 @@ class KCCMultisiteLdifTests(samba.tests.TestCaseInTempDir): my_kcc = self._get_kcc('test-dotfiles', dot_file_dir=self.tempdir) tmpdb = os.path.join(self.tempdir, 'dotfile-tmpdb') files = [tmpdb] - my_kcc.import_ldif(tmpdb, self.lp, self.creds, MULTISITE_LDIF) + my_kcc.import_ldif(tmpdb, self.lp, MULTISITE_LDIF) my_kcc.run(None, self.lp, self.creds, attempt_live_connections=False) diff --git a/source4/scripting/bin/samba_kcc b/source4/scripting/bin/samba_kcc index 108e288e1e1..02e955684ac 100755 --- a/source4/scripting/bin/samba_kcc +++ b/source4/scripting/bin/samba_kcc @@ -286,7 +286,7 @@ if opts.importldif: logger.error("Specify a target temp database file with --tmpdb option") sys.exit(1) - rc = kcc.import_ldif(opts.tmpdb, lp, creds, opts.importldif, + rc = kcc.import_ldif(opts.tmpdb, lp, opts.importldif, forced_local_dsa=opts.forced_local_dsa) if rc != 0: sys.exit(rc) |