From: Theodore Tso Date: Sat, 27 May 1995 01:43:29 +0000 (+0000) Subject: Remove backward compatibility code for Kerberos V3 (!) which was X-Git-Tag: krb5-1.0-beta6~1896 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a12e104e3911c694bd56fe3519e14ae63e995611;p=krb5.git Remove backward compatibility code for Kerberos V3 (!) which was causing problems for shared libraries. Library code shouldn't try to reference global variables defined by the calling application! git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5905 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb4/ChangeLog b/src/lib/krb4/ChangeLog index aaef9fd11..e8feae285 100644 --- a/src/lib/krb4/ChangeLog +++ b/src/lib/krb4/ChangeLog @@ -1,3 +1,10 @@ +Fri May 26 21:11:38 1995 Theodore Y. Ts'o (tytso@dcl) + + * cr_err_repl.c (cr_err_reply): Remove backward compatibility code + for Kerberos V3 (!) which was causing problems for shared + libraries. Library code shouldn't try to reference global + variables defined by the calling application! + Sun May 21 16:06:20 1995 Ezra Peisach * dest_tkt.c: If O_SYNC is not defined, define as 0. diff --git a/src/lib/krb4/Makefile.in b/src/lib/krb4/Makefile.in index 888bb3740..c49dfd1ca 100644 --- a/src/lib/krb4/Makefile.in +++ b/src/lib/krb4/Makefile.in @@ -8,6 +8,10 @@ DEFINES=-I$(srcdir)/../../include/kerberosIV EHDRDIR=$(BUILDTOP)$(S)include +.c.o: + $(CC) $(CFLAGS) -c $(srcdir)/$*.c +@SHARED_RULE@ + OBJS = \ cr_auth_repl.$(OBJEXT) \ cr_ciph.$(OBJEXT) \ @@ -81,6 +85,9 @@ SRCS = \ $(LIB_KRB_HOSTSRCS) $(SERVER_KRB_SRCS) $(NETIO_OBJS) $(REALMDBSRCS) +LIB_SUBDIRS= . +LIBDONE= ./DONE + # # These objects implement ticket cacheing for Unix. They are # replaced by other files when compiling for Windows or Mac. @@ -156,12 +163,19 @@ install:: install-$(WHAT) # We want *library* compiler options... DBG=$(DBG_LIB) -all-unix:: $(LIBNAME) krb_err.h includes +all-unix:: shared $(LIBNAME) krb_err.h includes + +shared: + mkdir shared # comp_et_depend(krb_err) krb_err.h:: krb_err.et krb_err.c: krb_err.et +krb_err.o: krb_err.c + $(CC) $(CFLAGS) -c krb_err.c +@SHARED_RULE_LOCAL@ + depend:: krb_err.h # @@ -233,6 +247,7 @@ clean-unix:: -$(RM) krb_err.c -$(RM) krb_err.h -$(RM) ../../include/krb_err.h + -$(RM) shared/* clean-windows:: -$(RM) kerberos.lib diff --git a/src/lib/krb4/configure.in b/src/lib/krb4/configure.in index dd1efc350..37487e5a0 100644 --- a/src/lib/krb4/configure.in +++ b/src/lib/krb4/configure.in @@ -46,6 +46,8 @@ AC_FUNC_CHECK(strsave,AC_DEFINE(HAVE_STRSAVE)) AC_FUNC_CHECK(setreuid,AC_DEFINE(HAVE_SETREUID)) AC_FUNC_CHECK(setresuid,AC_DEFINE(HAVE_SETRESUID)) ET_RULES +V5_SHARED_LIB_OBJS SubdirLibraryRule([$(OBJS)]) +V5_MAKE_SHARED_LIB(libkrb4) KRB_INCLUDE V5_AC_OUTPUT_MAKEFILE diff --git a/src/lib/krb4/cr_err_repl.c b/src/lib/krb4/cr_err_repl.c index 068d4e2ba..7f68bda76 100644 --- a/src/lib/krb4/cr_err_repl.c +++ b/src/lib/krb4/cr_err_repl.c @@ -13,8 +13,14 @@ #include "prot.h" #include +/* + * This is only needed for backwards compatibility for Kerberos V3 (!) + * and it causes problems for shared libraries. So I've yanked it. + */ +#if 0 extern int req_act_vno; /* this is defined in the kerberos * server code */ +#endif /* * This routine is used by the Kerberos authentication server to @@ -64,7 +70,11 @@ cr_err_reply(pkt,pname,pinst,prealm,time_ws,e,e_string) u_char *t = (u_char *)(pkt->dat+1); /* Prot message type */ /* Create fixed part of packet */ +#if 0 *v = (unsigned char) req_act_vno; /* KRB_PROT_VERSION; */ +#else + *v = (unsigned char) KRB_PROT_VERSION; +#endif *t = (unsigned char) AUTH_MSG_ERR_REPLY; *t |= HOST_BYTE_ORDER;