diff options
author | Andreas Schneider <asn@samba.org> | 2015-07-30 17:38:34 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2017-04-29 23:31:08 +0200 |
commit | 0e84e8325219a2408ab0c58af56f228b02ae31d4 (patch) | |
tree | 9992700ef0affd050dbcf0a357974b51b72277de /source4/scripting | |
parent | 9fee64d0e658ad3690c539fa68de4e29081b6840 (diff) | |
download | samba-0e84e8325219a2408ab0c58af56f228b02ae31d4.tar.gz |
samba_dnsupdate: Do not rewrite krb5.conf in selftest
The samba_dnsupdate script is responsible to provision the DNS entries.
The private krb5.conf uses dns lookups to find the KDC to acquire a
Kerberos ticket. Obviously this will fail because currently we are are
in the process of adding the DNS entries for the KDC.
If we are inside of selftest we need to use the krb5.conf created by
selftest itself.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlet <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source4/scripting')
-rwxr-xr-x | source4/scripting/bin/samba_dnsupdate | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source4/scripting/bin/samba_dnsupdate b/source4/scripting/bin/samba_dnsupdate index f9e835bc5c3..d382758168b 100755 --- a/source4/scripting/bin/samba_dnsupdate +++ b/source4/scripting/bin/samba_dnsupdate @@ -662,10 +662,13 @@ if opts.update_cache: else: dns_update_cache = lp.private_path('dns_update_cache') -# use our private krb5.conf to avoid problems with the wrong domain -# bind9 nsupdate wants the default domain set -krb5conf = lp.private_path('krb5.conf') -os.environ['KRB5_CONFIG'] = krb5conf +krb5conf = None +# only change the krb5.conf if we are not in selftest +if 'SOCKET_WRAPPER_DIR' not in os.environ: + # use our private krb5.conf to avoid problems with the wrong domain + # bind9 nsupdate wants the default domain set + krb5conf = lp.private_path('krb5.conf') + os.environ['KRB5_CONFIG'] = krb5conf file = open(dns_update_list, "r") |