s4-samba_dnsupdate: set environment via the env parameter
authorMatthieu Patou <mat@matws.net>
Tue, 21 Jun 2011 09:39:28 +0000 (13:39 +0400)
committerMatthieu Patou <mat@samba.org>
Wed, 22 Jun 2011 18:13:08 +0000 (20:13 +0200)
I faced a situation where the os.environ("KRB5CCNAME") = ... didn't
seems to be effective

source4/scripting/bin/samba_dnsupdate

index 0a13dd7c9bdf08d92b0b0f497cd753670e813404..78d7dc1712c638516b791518a8228189305614db 100755 (executable)
@@ -278,7 +278,7 @@ def call_nsupdate(d):
     try:
         cmd = nsupdate_cmd[:]
         cmd.append(tmpfile)
-        ret = subprocess.call(cmd, shell=False)
+        ret = subprocess.call(cmd, shell=False, env={"KRB5CCNAME": ccachename})
         if ret != 0:
             if opts.fail_immediately:
                 sys.exit(1)