From 7a6d9ef5d74abb04d29d9e18e61f78e5017175ed Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Tue, 21 Mar 1995 02:19:24 +0000 Subject: [PATCH] Added function (unix_time_gmt_unixsec) needed for des425 to work with the Cygnus krb.a. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5176 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/des425/ChangeLog | 5 +++++ src/lib/des425/Makefile.in | 2 ++ src/lib/des425/unix_time.c | 25 +++++++++++++++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 src/lib/des425/unix_time.c diff --git a/src/lib/des425/ChangeLog b/src/lib/des425/ChangeLog index 4d17a2350..955051c1b 100644 --- a/src/lib/des425/ChangeLog +++ b/src/lib/des425/ChangeLog @@ -1,3 +1,8 @@ +Mon Mar 20 21:14:40 1995 Theodore Y. Ts'o + + * Makefile.in, unix_time.c(unix_time_gmt_unixsec): Added function + needed for des425 to work with the Cygnus krb.a. + Wed Mar 15 13:44:23 1995 Keith Vetter (keithv@fusion.com) * des.h: now includes des_int.h for proper prototypes. diff --git a/src/lib/des425/Makefile.in b/src/lib/des425/Makefile.in index 5024fca9d..7cc8a5202 100644 --- a/src/lib/des425/Makefile.in +++ b/src/lib/des425/Makefile.in @@ -16,6 +16,7 @@ OBJS= cksum.$(OBJEXT) \ random_key.$(OBJEXT) \ read_passwd.$(OBJEXT) \ str_to_key.$(OBJEXT) \ + unix_time.$(OBJEXT) \ weak_key.$(OBJEXT) SRCS= $(srcdir)/cksum.c \ @@ -29,6 +30,7 @@ SRCS= $(srcdir)/cksum.c \ $(srcdir)/random_key.c \ $(srcdir)/read_passwd.c \ $(srcdir)/str_to_key.c \ + $(srcdir)/unix_time.c \ $(srcdir)/weak_key.c diff --git a/src/lib/des425/unix_time.c b/src/lib/des425/unix_time.c new file mode 100644 index 000000000..c69be6186 --- /dev/null +++ b/src/lib/des425/unix_time.c @@ -0,0 +1,25 @@ +/* + * unix_time.c + * + * Glue code for pasting Kerberos into the Unix environment. + * + * Originally written by John Gilmore, Cygnus Support, May '94. + * Public Domain. + * + * Required for use by the Cygnus krb.a. + */ + +#include "k5-int.h" +#include + +krb5_ui_4 INTERFACE +unix_time_gmt_unixsec (usecptr) + krb5_ui_4 *usecptr; +{ + struct timeval now; + + (void) gettimeofday (&now, (struct timezone *)0); + if (usecptr) + *usecptr = now.tv_usec; + return now.tv_sec; +} -- 2.26.2