summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorBjörn Baumbach <bb@sernet.de>2012-12-20 15:57:43 +0100
committerAndrew Bartlett <abartlet@samba.org>2013-01-09 09:11:20 +0100
commit4d1fd0b7daa089bd8863f0efcaf258bf30192c29 (patch)
treeceea0ad64e55c2c0c099720d19a3d5b6b4079eec /source4
parent8d9a77f8646cd26371dc2ec1d3ed52730ac19eb9 (diff)
downloadsamba-4d1fd0b7daa089bd8863f0efcaf258bf30192c29.tar.gz
samba-4d1fd0b7daa089bd8863f0efcaf258bf30192c29.tar.bz2
samba-4d1fd0b7daa089bd8863f0efcaf258bf30192c29.zip
samba_dnsupdate: set KRB5_CONFIG for nsupdate command
Let nslookup use krb5.conf, which is set in our KRB5_CONFIG. Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4')
-rwxr-xr-xsource4/scripting/bin/samba_dnsupdate9
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: