If there's a problem in get_credentials() (getting the machine account
Kerberos credentials), then we fallback to use_samba_tool (essentially
ignoring use-file). However, there's no need to do this, as use-file
shouldn't require Kerberos credentials.
This was making bootstrapping issues starting a testenv harder to debug.
Obviously, Kerberos is dependent on DNS functioning correctly, but
running dnsupdate was also dependent on having a working Kerberos KDC.
In my case, the testenv had a bad krb5.conf file, but the problem
appeared as resolv-wrapper errors (due to a missing RESOLV_WRAPPER_HOSTS
file, which should've been generated by dnsupdate).
Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-With: Garming Sam <garming@catalyst.net.nz>
creds.set_krb_forwardable(credentials.NO_KRB_FORWARDABLE)
(tmp_fd, ccachename) = tempfile.mkstemp()
try:
- creds.get_named_ccache(lp, ccachename)
-
if opts.use_file is not None:
return
+ creds.get_named_ccache(lp, ccachename)
+
# Now confirm we can get a ticket to the DNS server
get_krb5_rw_dns_server(creds, sub_vars['DNSDOMAIN'] + '.')
return creds