From 7ad34d120614f2449816025fc84a1ecb4979222b Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 6 Jul 2017 16:25:19 +1200 Subject: [PATCH] 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 Reviewed-by: Douglas Bagnall --- source4/torture/drs/python/drs_base.py | 10 ++++++++-- 1 file 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 return ["drs", drs_command, cmdline_auth] -- 2.34.1