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

drsbase: use credentials if supplied

Pair-programmed-with: Bob Campbell <bobcampbell@catalyst.net.nz>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Garming Sam 2017-03-08 17:13:40 +13:00 committed by Andrew Bartlett
parent 213349b4bf
commit b01fac24ec

View File

@ -352,10 +352,12 @@ class DrsBaseTestCase(SambaToolCmdTest):
return req10
def _ds_bind(self, server_name):
def _ds_bind(self, server_name, creds=None):
binding_str = "ncacn_ip_tcp:%s[seal]" % server_name
drs = drsuapi.drsuapi(binding_str, self.get_loadparm(), self.get_credentials())
if creds is None:
creds = self.get_credentials()
drs = drsuapi.drsuapi(binding_str, self.get_loadparm(), creds)
(drs_handle, supported_extensions) = drs_DsBind(drs)
return (drs, drs_handle)