summaryrefslogtreecommitdiff
path: root/source4/torture/drs
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2017-07-06 16:25:19 +1200
committerAndrew Bartlett <abartlet@samba.org>2017-07-28 00:25:14 +0200
commit7ad34d120614f2449816025fc84a1ecb4979222b (patch)
tree56ce08d613c0c0ae678ff0faf2adecf89eb93195 /source4/torture/drs
parent4cc5ceb297e310f749d7449b38207dd70554a009 (diff)
downloadsamba-7ad34d120614f2449816025fc84a1ecb4979222b.tar.gz
selftest: Use new --krb5-ccache in drs_base.py
This means that instead of doing a new kinit, the process-wide ccache is re-used, which is much faster. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Diffstat (limited to 'source4/torture/drs')
-rw-r--r--source4/torture/drs/python/drs_base.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/source4/torture/drs/python/drs_base.py b/source4/torture/drs/python/drs_base.py
index c215003b3fb..8af1af34f80 100644
--- a/source4/torture/drs/python/drs_base.py
+++ b/source4/torture/drs/python/drs_base.py
@@ -100,9 +100,15 @@ class DrsBaseTestCase(SambaToolCmdTest):
def _samba_tool_cmd_list(self, drs_command):
# make command line credentials string
+
creds = self.get_credentials()
- cmdline_auth = "-U%s/%s%%%s" % (creds.get_domain(),
- creds.get_username(), creds.get_password())
+ ccache = creds.get_named_ccache(self.get_loadparm())
+ ccache_name = ccache.get_name()
+
+ # Tunnel the command line credentials down to the
+ # subcommand to avoid a new kinit
+ cmdline_auth = "--krb5-ccache=%s" % ccache_name
+
# bin/samba-tool drs <drs_command> <cmdline_auth>
return ["drs", drs_command, cmdline_auth]