1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-10 01:18:15 +03:00

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>
This commit is contained in:
Douglas Bagnall 2015-06-23 16:38:29 +12:00 committed by Andrew Bartlett
parent 6f93ffaf0c
commit 46ac3a5308
3 changed files with 5 additions and 6 deletions

View File

@ -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

View File

@ -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)

View File

@ -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)