[SCM] Samba Shared Repository - branch master updated

Andrew Bartlett abartlet at samba.org
Fri Jun 10 19:55:02 MDT 2011


The branch, master has been updated
       via  530e4ca s3-param Remove 'time offset' from smb.conf
      from  35aeeab s3: Update .clang_complete

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 530e4cac2e93177923080daa5ec1bac2c65d269b
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Sat Jun 11 09:49:12 2011 +1000

    s3-param Remove 'time offset' from smb.conf
    
    This strange parameter is apparently very rarely used, and it seems to
    me that on modern networks, if clients don't have correct clocks and
    DST offsets, that many other things (Kerberos) start to fail pretty
    quickly, and time and DST tables tend to be internet delivered anyway.
    
    Autobuild-User: Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date: Sat Jun 11 03:54:45 CEST 2011 on sn-devel-104

-----------------------------------------------------------------------

Summary of changes:
 docs-xml/smbdotconf/misc/timeoffset.xml |   15 ---------------
 lib/util/tests/time.c                   |   18 ------------------
 lib/util/time.c                         |    4 +---
 lib/util/time.h                         |    3 ---
 source3/param/loadparm.c                |    9 ---------
 5 files changed, 1 insertions(+), 48 deletions(-)
 delete mode 100644 docs-xml/smbdotconf/misc/timeoffset.xml


Changeset truncated at 500 lines:

diff --git a/docs-xml/smbdotconf/misc/timeoffset.xml b/docs-xml/smbdotconf/misc/timeoffset.xml
deleted file mode 100644
index 1afc514..0000000
--- a/docs-xml/smbdotconf/misc/timeoffset.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<samba:parameter name="time offset"
-	         context="G"
-			 type="integer"
-		 advanced="1" developer="1"
-		 xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
-<description>
-	<para>This parameter is a setting in minutes to add 
-	to the normal GMT to local time conversion. This is useful if 
-	you are serving a lot of PCs that have incorrect daylight 
-	saving time handling.</para>
-</description>
-
-<value type="default">0</value>
-<value type="example">60</value>
-</samba:parameter>
diff --git a/lib/util/tests/time.c b/lib/util/tests/time.c
index 592f88f..a8b2676 100644
--- a/lib/util/tests/time.c
+++ b/lib/util/tests/time.c
@@ -81,29 +81,11 @@ static bool test_timestring(struct torture_context *tctx)
 	return true;
 }
 
-static bool test_get_time_zone(struct torture_context *tctx)
-{
-	time_t t = time(NULL);
-	int old_extra_time_offset = extra_time_offset;
-	int old_offset, new_offset;
-	/* test that extra_time_offset works */
-
-	old_offset = get_time_zone(t);
-	extra_time_offset = 42;
-	new_offset = get_time_zone(t);
-	extra_time_offset = old_extra_time_offset;
-	torture_assert_int_equal(tctx, old_offset+60*42, new_offset,
-				 "time offset not used");
-	return true;
-}
-
-
 struct torture_suite *torture_local_util_time(TALLOC_CTX *mem_ctx)
 {
 	struct torture_suite *suite = torture_suite_create(mem_ctx, "time");
 
 	torture_suite_add_simple_test(suite, "null_time", test_null_time);
-	torture_suite_add_simple_test(suite, "get_time_zone", test_get_time_zone);
 	torture_suite_add_simple_test(suite, "null_nttime", test_null_nttime);
 	torture_suite_add_simple_test(suite, "http_timestring", 
 								  test_http_timestring);
diff --git a/lib/util/time.c b/lib/util/time.c
index d8fd4a3..31aa05c 100644
--- a/lib/util/time.c
+++ b/lib/util/time.c
@@ -738,8 +738,6 @@ static int tm_diff(struct tm *a, struct tm *b)
 }
 
 
-int extra_time_offset=0;
-
 /**
   return the UTC offset in seconds west of UTC, or 0 if it cannot be determined
  */
@@ -753,7 +751,7 @@ _PUBLIC_ int get_time_zone(time_t t)
 	tm = localtime(&t);
 	if (!tm)
 		return 0;
-	return tm_diff(&tm_utc,tm)+60*extra_time_offset;
+	return tm_diff(&tm_utc,tm);
 }
 
 struct timespec nt_time_to_unix_timespec(NTTIME *nt)
diff --git a/lib/util/time.h b/lib/util/time.h
index 6a473f6..204c261 100644
--- a/lib/util/time.h
+++ b/lib/util/time.h
@@ -300,7 +300,4 @@ struct timespec convert_time_t_to_timespec(time_t t);
 
 bool null_timespec(struct timespec ts);
 
-/** Extra minutes to add to the normal GMT to local time conversion. */
-extern int extra_time_offset;
-
 #endif /* _SAMBA_TIME_H_ */
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index c80b751..ed41fdb 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -4138,15 +4138,6 @@ static struct parm_struct parm_table[] = {
 		.flags		= FLAG_ADVANCED,
 	},
 	{
-		.label		= "time offset",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.ptr		= &extra_time_offset,
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_ADVANCED,
-	},
-	{
 		.label		= "NIS homedir",
 		.type		= P_BOOL,
 		.p_class	= P_GLOBAL,


-- 
Samba Shared Repository


More information about the samba-cvs mailing list