summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2011-02-21 16:46:58 +1100
committerAndrew Tridgell <tridge@samba.org>2011-02-22 02:51:10 +0100
commit949427c208159f4ac580f547dd5465a70b4751b7 (patch)
treee9eef7d495b04516e6161ab9528f964a8d872cd2 /source4/scripting
parent01047e0ba8256ff12345222517a905fd9d66a8b5 (diff)
downloadsamba-949427c208159f4ac580f547dd5465a70b4751b7.tar.gz
samba-949427c208159f4ac580f547dd5465a70b4751b7.tar.bz2
samba-949427c208159f4ac580f547dd5465a70b4751b7.zip
python: use os.environ[] instead of os.putenv()
using os.putenv() causes too much confusion, as it doesn't update os.getenv() Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/scripting')
-rwxr-xr-xsource4/scripting/bin/samba_dnsupdate8
-rwxr-xr-xsource4/scripting/bin/samba_spnupdate4
2 files changed, 6 insertions, 6 deletions
diff --git a/source4/scripting/bin/samba_dnsupdate b/source4/scripting/bin/samba_dnsupdate
index cacdc36194..99f898e204 100755
--- a/source4/scripting/bin/samba_dnsupdate
+++ b/source4/scripting/bin/samba_dnsupdate
@@ -26,13 +26,13 @@ import subprocess
# ensure we get messages out immediately, so they get in the samba logs,
# and don't get swallowed by a timeout
-os.putenv('PYTHONUNBUFFERED', '1')
+os.environ['PYTHONUNBUFFERED'] = '1'
# forcing GMT avoids a problem in some timezones with kerberos. Both MIT
# heimdal can get mutual authentication errors due to the 24 second difference
# between UTC and GMT when using some zone files (eg. the PDT zone from
# the US)
-os.putenv("TZ", "GMT")
+os.environ["TZ"] = "GMT"
# Find right directory when running from source tree
sys.path.insert(0, "bin/python")
@@ -259,7 +259,7 @@ def call_nsupdate(d):
f.write("send\n")
f.close()
- os.putenv("KRB5CCNAME", ccachename)
+ os.environ["KRB5CCNAME"] = ccachename
try:
cmd = nsupdate_cmd[:]
cmd.append(tmpfile)
@@ -359,7 +359,7 @@ else:
# 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.putenv('KRB5_CONFIG', krb5conf)
+os.environ['KRB5_CONFIG'] = krb5conf
file = open(dns_update_list, "r")
diff --git a/source4/scripting/bin/samba_spnupdate b/source4/scripting/bin/samba_spnupdate
index 0dcc9fecfe..169c12ab00 100755
--- a/source4/scripting/bin/samba_spnupdate
+++ b/source4/scripting/bin/samba_spnupdate
@@ -22,13 +22,13 @@ import os, sys
# ensure we get messages out immediately, so they get in the samba logs,
# and don't get swallowed by a timeout
-os.putenv('PYTHONUNBUFFERED', '1')
+os.environ['PYTHONUNBUFFERED'] = '1'
# forcing GMT avoids a problem in some timezones with kerberos. Both MIT
# heimdal can get mutual authentication errors due to the 24 second difference
# between UTC and GMT when using some zone files (eg. the PDT zone from
# the US)
-os.putenv("TZ", "GMT")
+os.environ["TZ"] = "GMT"
# Find right directory when running from source tree
sys.path.insert(0, "bin/python")