Add krb5int_accessor() to access internal krb5 functions from outside
authorDanilo Almeida <dalmeida@mit.edu>
Wed, 19 Jul 2000 17:11:09 +0000 (17:11 +0000)
committerDanilo Almeida <dalmeida@mit.edu>
Wed, 19 Jul 2000 17:11:09 +0000 (17:11 +0000)
the library (so that we don't have to export them for the krb525 and
gssapi libraries).  The goal is to make this function eventually do
nothing.

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

src/lib/krb5/os/ChangeLog
src/lib/krb5/os/Makefile.in
src/lib/krb5/os/accessor.c [new file with mode: 0644]

index 87e99ad41f4762d5ef3cd4953b1f516b3b641279..75645b20cd920f66958dc1b10b046ed8364a6367 100644 (file)
@@ -1,3 +1,12 @@
+2000-07-19  Danilo Almeida  <dalmeida@mit.edu>
+
+       * accessor.c (krb5int_accessor): Add krb5int_accessor() to access
+       internal krb5 functions from outside the library (so that we don't
+       have to export them for the krb525 and gssapi libraries).  The
+       goal is to make this function eventually do nothing.
+
+       * Makefile.in: Compile accessor.c.
+
 2000-07-18  Ezra Peisach  <epeisach@mit.edu>
 
        * locate_kdc.c, hst_realm.c, def_realm.c, changepw.c: Include
index 09df5a13d0b7f1c7f14ed837b6efccb75904fdda..05775c41b02963a03d521a9abecc1e27e6bdb98c 100644 (file)
@@ -12,6 +12,7 @@ PROG_RPATH=$(KRB5_LIBDIR)
 ##WIN16##LIBNAME=..\krb5.lib
 
 STLIBOBJS= \
+       accessor.o      \
        an_to_ln.o      \
        c_ustime.o      \
        def_realm.o     \
@@ -54,6 +55,7 @@ STLIBOBJS= \
        write_msg.o
 
 OBJS= \
+       $(OUTPRE)accessor.$(OBJEXT)     \
        $(OUTPRE)an_to_ln.$(OBJEXT)     \
        $(OUTPRE)c_ustime.$(OBJEXT)     \
        $(OUTPRE)def_realm.$(OBJEXT)    \
@@ -96,6 +98,7 @@ OBJS= \
        $(OUTPRE)write_msg.$(OBJEXT)
 
 SRCS= \
+       $(srcdir)/accessor.c    \
        $(srcdir)/an_to_ln.c    \
        $(srcdir)/c_ustime.c    \
        $(srcdir)/def_realm.c   \
diff --git a/src/lib/krb5/os/accessor.c b/src/lib/krb5/os/accessor.c
new file mode 100644 (file)
index 0000000..c872c83
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * lib/krb5/os/accessor.c
+ *
+ * Copyright 1990 by the Massachusetts Institute of Technology.
+ * All Rights Reserved.
+ *
+ * Export of this software from the United States of America may
+ *   require a specific license from the United States Government.
+ *   It is the responsibility of any person or organization contemplating
+ *   export to obtain such a license before exporting.
+ * 
+ * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
+ * distribute this software and its documentation for any purpose and
+ * without fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright notice and
+ * this permission notice appear in supporting documentation, and that
+ * the name of M.I.T. not be used in advertising or publicity pertaining
+ * to distribution of the software without specific, written prior
+ * permission.  Furthermore if you modify this software you must label
+ * your software as modified software and not distribute it in such a
+ * fashion that it might be confused with the original M.I.T. software.
+ * M.I.T. makes no representations about the suitability of
+ * this software for any purpose.  It is provided "as is" without express
+ * or implied warranty.
+ * 
+*/
+
+#include "k5-int.h"
+#include "os-proto.h"
+
+extern int krb5_max_skdc_timeout;
+extern int krb5_skdc_timeout_shift;
+extern int krb5_skdc_timeout_1;
+extern int krb5_max_dgram_size;
+
+KRB5_DLLIMP krb5_error_code KRB5_CALLCONV
+krb5int_accessor(internals, version)
+     krb5int_access* internals;
+     krb5_int32 version;
+{
+  if (version == KRB5INT_ACCESS_VERSION)
+  {
+    krb5int_access internals_temp;
+    internals_temp.krb5_locate_kdc = krb5_locate_kdc;
+    internals_temp.krb5_max_skdc_timeout = krb5_max_skdc_timeout;
+    internals_temp.krb5_skdc_timeout_shift = krb5_skdc_timeout_shift;
+    internals_temp.krb5_skdc_timeout_1 = krb5_skdc_timeout_1;
+    internals_temp.krb5_max_dgram_size = krb5_max_dgram_size;
+    *internals = internals_temp;
+    return 0;
+  }
+  return KRB5_OBSOLETE_FN;
+}