From: Danilo Almeida Date: Wed, 19 Jul 2000 17:11:09 +0000 (+0000) Subject: Add krb5int_accessor() to access internal krb5 functions from outside X-Git-Tag: krb5-1.3-alpha1~1979 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=cb8bbad1e5e53983b6c2c1804d99611cc5ca2ea5;p=krb5.git 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. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12560 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/os/ChangeLog b/src/lib/krb5/os/ChangeLog index 87e99ad41..75645b20c 100644 --- a/src/lib/krb5/os/ChangeLog +++ b/src/lib/krb5/os/ChangeLog @@ -1,3 +1,12 @@ +2000-07-19 Danilo Almeida + + * 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 * locate_kdc.c, hst_realm.c, def_realm.c, changepw.c: Include diff --git a/src/lib/krb5/os/Makefile.in b/src/lib/krb5/os/Makefile.in index 09df5a13d..05775c41b 100644 --- a/src/lib/krb5/os/Makefile.in +++ b/src/lib/krb5/os/Makefile.in @@ -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 index 000000000..c872c8361 --- /dev/null +++ b/src/lib/krb5/os/accessor.c @@ -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; +}