diff options
Diffstat (limited to 'source4/scripting/bin/samba_dnsupdate')
-rwxr-xr-x | source4/scripting/bin/samba_dnsupdate | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source4/scripting/bin/samba_dnsupdate b/source4/scripting/bin/samba_dnsupdate index a700118da0..a5cece1333 100755 --- a/source4/scripting/bin/samba_dnsupdate +++ b/source4/scripting/bin/samba_dnsupdate @@ -278,7 +278,7 @@ def get_subst_vars(samdb): def call_nsupdate(d): """call nsupdate for an entry.""" - global ccachename, nsupdate_cmd + global ccachename, nsupdate_cmd, krb5conf if opts.verbose: print "Calling nsupdate for %s" % d @@ -333,10 +333,11 @@ def call_nsupdate(d): try: cmd = nsupdate_cmd[:] cmd.append(tmpfile) + env = {} + if krb5conf: + env["KRB5_CONFIG"] = krb5conf if ccachename: - env = {"KRB5CCNAME": ccachename} - else: - env = {} + env["KRB5CCNAME"] = ccachename ret = subprocess.call(cmd, shell=False, env=env) if ret != 0: if opts.fail_immediately: |