+Tue Jul 9 16:44:22 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
+
+ * win_glue.c: Add a quick hack so we can time-bomb the libkrb5.dll
+ and sapkrb5.dll when we compile them at MIT.
+
+ * Makefile.in (sap_glue.obj): Build the sapkrb5.dll with the
+ timebomb enabled (since we couldn't get the version server
+ code working).
+
Wed Jun 12 12:52:30 1996 Ezra Peisach <epeisach@kangaroo.mit.edu>
* Makefile.in (lib-windows): Replace spaces with tab
rc /nologo /p /k libkrb5.dll
sap_glue.obj: win_glue.c
- $(CC) $(CFLAGS) -DSAP_VERSERV -I$(VERS_DIR) /c \
+ $(CC) $(CFLAGS) -DSAP_TIMEBOMB -I$(VERS_DIR) /c \
/Fosap_glue.obj win_glue.c
+win_glue.obj: win_glue.c
+ $(CC) $(CFLAGS) /c win_glue.c
+
sapkrb5.dll:: $(GLIB) $(LIBS) gssapi.def sap_glue.obj
link /co /seg:400 /noe /nod /nol sap_glue, sapkrb5.dll, sapkrb5.map, \
$(LIBS) $(VERS_DIR)\vswin.lib ldllcew libw oldnames, sapkrb5.def
#define NEED_SOCKETS
#include "k5-int.h"
+/*
+ * #defines for MIT-specific time-based timebombs and/or version
+ * server for the Kerberos DLL.
+ */
+#ifdef SAP_TIMEBOMB
+#if 1
+#define TIMEBOMB 852094800 /* 1-Jan-97 */
+#else
+#define TIMEBOMB 820472400 /* 1-Jan-96 */
+#endif
+#define TIMEBOMB_PRODUCT "SAPGUI"
+#define TIMEBOMB_WARN 31
+#endif
+
+#ifdef KRB_TIMEBOMB
+#if 1
+#define TIMEBOMB 852094800 /* 1-Jan-97 */
+#else
+#define TIMEBOMB 820472400 /* 1-Jan-96 */
+#endif
+#define TIMEBOMB_PRODUCT "Kerberos V5"
+#define TIMEBOMB_WARN 31
+#endif
+
#ifdef SAP_VERSERV
#define VERSERV
#define APP_TITLE "KRB5-SAP"
WORD cbHeap;
LPSTR CmdLine;
{
+#ifdef TIMEBOMB
+ char buf[256];
+ long timeleft;
+
+ timeleft = TIMEBOMB - time(0);
+ if (timeleft <= 0) {
+ sprintf(buf, "Your version of %s has expired.\n", TIMEBOMB_PRODUCT);
+ strcat(buf, "Please upgrade it.");
+ MessageBox(NULL, buf, "", MB_OK);
+ PostQuitMessage(0);
+ }
+ timeleft = timeleft / ((long) 60*60*24);
+ if (timeleft < TIMEBOMB_WARN) {
+ sprintf(buf, "Your version of %s will expire in %ld days.\n",
+ TIMEBOMB_PRODUCT, timeleft);
+ strcat(buf, "Please upgrade it soon.");
+ MessageBox(NULL, buf, "", MB_OK);
+ }
+#endif
#ifdef SAP_VERSERV
if (CallVersionServer(APP_TITLE, APP_VER, APP_INI, NULL))
PostQuitMessage(0);
#endif
-
win_socket_initialize ();
return 1;
}