s4-kerberos: use TZ=GMT when we are invoking krb5 code in helpers
authorAndrew Tridgell <tridge@samba.org>
Wed, 29 Sep 2010 03:43:58 +0000 (20:43 -0700)
committerAndrew Tridgell <tridge@samba.org>
Wed, 29 Sep 2010 03:55:04 +0000 (03:55 +0000)
Our helper scripts can fail on Fedora with the PDT timezone (Western
USA). This is the same issue we found with Heimdal earlier today, the
24 second difference between GMT and UTC, but this time in MIT
Kerberos as linked into bind9.

By forcing TZ=GMT in these scripts we avoid the problem

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

source4/scripting/bin/samba_dnsupdate
source4/scripting/bin/samba_spnupdate

index 5ed46c326c5f5485d6d07bb37ad6feb92133d74a..a8a7e591c687598b59054ff7dab3b9c0eb15a088 100755 (executable)
@@ -27,6 +27,12 @@ import tempfile
 # and don't get swallowed by a timeout
 os.putenv('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")
+
 # Find right directory when running from source tree
 sys.path.insert(0, "bin/python")
 
index 7c9ed4fbdd9a98e0fa12a2a7e899dd21a2a74839..b6501fbc4741dbc8464b0945a2d453ae37385b24 100755 (executable)
@@ -24,6 +24,12 @@ import os, sys
 # and don't get swallowed by a timeout
 os.putenv('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")
+
 # Find right directory when running from source tree
 sys.path.insert(0, "bin/python")