summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorTheodore Tso <tytso@mit.edu>1995-09-01 05:45:06 +0000
committerTheodore Tso <tytso@mit.edu>1995-09-01 05:45:06 +0000
commitb9b39d222667df44c6311ae8c5857218338642ac (patch)
tree0662cc0c04e510c72cbe8e861730c7d34ab3e859 /src/include
parent565dd658322a355c127c2f8c4decde771e81acfd (diff)
downloadkrb5-b9b39d222667df44c6311ae8c5857218338642ac.tar.gz
krb5-b9b39d222667df44c6311ae8c5857218338642ac.tar.xz
krb5-b9b39d222667df44c6311ae8c5857218338642ac.zip
Add time offset field to the os_context structure. This offset is
added to the system clock time to produce the "true" time. Added prototypes for the functions which manipulate the time offset structures: krb5_set_real_time(), krb5_set_debugging_time(), krb5_use_natural_time(), krb5_get_time_offsets(), and krb5_set_time_offsets(). git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6648 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/include')
-rw-r--r--src/include/ChangeLog10
-rw-r--r--src/include/k5-int.h31
2 files changed, 41 insertions, 0 deletions
diff --git a/src/include/ChangeLog b/src/include/ChangeLog
index c6c19e4170..42c0913da3 100644
--- a/src/include/ChangeLog
+++ b/src/include/ChangeLog
@@ -1,3 +1,13 @@
+Fri Sep 1 00:44:59 1995 Theodore Y. Ts'o <tytso@dcl>
+
+ * k5-int.h: Add time offset field to the os_context structure.
+ This offset is added to the system clock time to produce
+ the "true" time.
+
+ Added prototypes for the functions which manipulate the
+ time offset structures: krb5_set_real_time(),
+ krb5_set_debugging_time(), krb5_use_natural_time(),
+ krb5_get_time_offsets(), and krb5_set_time_offsets().
Tue Aug 29 13:26:22 EDT 1995 Paul Park (pjpark@mit.edu)
* k5-int.h - Add ser_ctx[_count] to krb5_context. This keeps track
diff --git a/src/include/k5-int.h b/src/include/k5-int.h
index 9240a50eab..d4031dd12e 100644
--- a/src/include/k5-int.h
+++ b/src/include/k5-int.h
@@ -722,6 +722,17 @@ krb5_error_code krb5_make_fulladdr
krb5_address *,
krb5_address *));
+krb5_error_code krb5_set_real_time
+ KRB5_PROTOTYPE((krb5_context, krb5_int32, krb5_int32));
+krb5_error_code krb5_set_debugging_time
+ KRB5_PROTOTYPE((krb5_context, krb5_int32, krb5_int32));
+krb5_error_code krb5_use_natural_time
+ KRB5_PROTOTYPE((krb5_context));
+krb5_error_code krb5_get_time_offsets
+ KRB5_PROTOTYPE((krb5_context, krb5_int32 *, krb5_int32 *));
+krb5_error_code krb5_set_time_offsets
+ KRB5_PROTOTYPE((krb5_context, krb5_int32, krb5_int32));
+
/* in here to deal with stuff from lib/crypto/os */
krb5_error_code krb5_crypto_os_localaddr
@@ -752,8 +763,28 @@ time_t gmt_mktime KRB5_PROTOTYPE((struct tm *));
typedef struct _krb5_os_context {
krb5_magic magic;
+ krb5_int32 time_offset;
+ krb5_int32 usec_offset;
+ krb5_int32 os_flags;
} *krb5_os_context;
+/*
+ * Flags for the os_flags field
+ *
+ * KRB5_OS_TOFFSET_VALID means that the time offset fields are valid.
+ * The intention is that this facility to correct the system clocks so
+ * that they reflect the "real" time, for systems where for some
+ * reason we can't set the system clock. Instead we calculate the
+ * offset between the system time and real time, and store the offset
+ * in the os context so that we can correct the system clock as necessary.
+ *
+ * KRB5_OS_TOFFSET_TIME means that the time offset fields should be
+ * returned as the time by the krb5 time routines. This should only
+ * be used for testing purposes (obviously!)
+ */
+#define KRB5_OS_TOFFSET_VALID 1
+#define KRB5_OS_TOFFSET_TIME 2
+
/* lock mode flags */
#define KRB5_LOCKMODE_SHARED 0x0001
#define KRB5_LOCKMODE_EXCLUSIVE 0x0002