Added function (unix_time_gmt_unixsec) needed for des425 to work with
authorTheodore Tso <tytso@mit.edu>
Tue, 21 Mar 1995 02:19:24 +0000 (02:19 +0000)
committerTheodore Tso <tytso@mit.edu>
Tue, 21 Mar 1995 02:19:24 +0000 (02:19 +0000)
the Cygnus krb.a.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5176 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/des425/ChangeLog
src/lib/des425/Makefile.in
src/lib/des425/unix_time.c [new file with mode: 0644]

index 4d17a235035bc8e428aa9f08118a0dd74da51413..955051c1b57d356f05f9128de5f58fedc29b762c 100644 (file)
@@ -1,3 +1,8 @@
+Mon Mar 20 21:14:40 1995  Theodore Y. Ts'o  <tytso@dcl>
+
+       * 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.
index 5024fca9d81b537369980f4e501aa5b4ebf5e96f..7cc8a5202b5c6915e34dcdf96c32add3844174b6 100644 (file)
@@ -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 (file)
index 0000000..c69be61
--- /dev/null
@@ -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 <sys/time.h>
+
+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;
+}