From e8a87f4e203064d5e7f26fe53ad3b923fe0f9c6e Mon Sep 17 00:00:00 2001 From: Keith Vetter Date: Wed, 22 Mar 1995 04:59:35 +0000 Subject: [PATCH] Changed the name of the gssapi library created under Windows and a couple of signed/unsigned assignment mismatches. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5182 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/gssapi/ChangeLog | 5 +++++ src/lib/gssapi/Makefile.in | 11 +++++++++-- src/lib/gssapi/generic/ChangeLog | 5 +++++ src/lib/gssapi/generic/Makefile.in | 7 ++++++- src/lib/gssapi/krb5/ChangeLog | 9 +++++++++ src/lib/gssapi/krb5/Makefile.in | 5 ++++- src/lib/gssapi/krb5/import_name.c | 20 ++++++++++++-------- src/lib/gssapi/krb5/init_sec_context.c | 5 ++++- 8 files changed, 54 insertions(+), 13 deletions(-) diff --git a/src/lib/gssapi/ChangeLog b/src/lib/gssapi/ChangeLog index 4f010d12a..9ca4547e8 100644 --- a/src/lib/gssapi/ChangeLog +++ b/src/lib/gssapi/ChangeLog @@ -1,3 +1,8 @@ +Tue Mar 21 19:08:51 1995 Keith Vetter (keithv@fusion.com) + + * Makefile.in: changed the name of the library the PC + builds, and added xxx-mac targets to mimic xxx-unix. + Wed Mar 15 20:23:17 1995 Keith Vetter (keithv@fusion.com) * Makefile.in: cleaned up for the PC diff --git a/src/lib/gssapi/Makefile.in b/src/lib/gssapi/Makefile.in index 17b1612ed..86216482b 100644 --- a/src/lib/gssapi/Makefile.in +++ b/src/lib/gssapi/Makefile.in @@ -1,13 +1,14 @@ TST=if test -n "`cat DONE`" ; then ##DOSBUILDTOP = ..\.. -##DOSLIBNAME=libgssapi_krb5.$(LIBEXT) ##DOS!include $(BUILDTOP)\config\windows.in all:: all-$(WHAT) all-unix:: +all-mac:: + libgssapi_krb5.a: generic/DONE krb5/DONE (cd generic; $(TST) $(ARADD) ../$@ `cat DONE` ; fi) (cd krb5; $(TST) $(ARADD) ../$@ `cat DONE` ; fi) @@ -18,10 +19,16 @@ install:: libgssapi_krb5.a $(RANLIB) $(DESTDIR)$(KRB5_LIBDIR)/libgssapi_krb5.a clean:: clean-$(WHAT) - $(RM) libgssapi_krb5.$(LIBEXT) libgssapi_krb5.bak clean-unix:: + $(RM) libgssapi_krb5.a + +clean-mac:: + $(RM) libgssapi_krb5.a +clean-windows:: + $(RM) gssapi.lib gssapi.bak + all-windows:: cd generic @echo Making in gssapi\generic diff --git a/src/lib/gssapi/generic/ChangeLog b/src/lib/gssapi/generic/ChangeLog index 325109f01..252075a66 100644 --- a/src/lib/gssapi/generic/ChangeLog +++ b/src/lib/gssapi/generic/ChangeLog @@ -1,3 +1,8 @@ +Tue Mar 21 19:09:34 1995 Keith Vetter (keithv@fusion.com) + + * Makefile.in: changed the name of the library the PC + builds, and added xxx-mac targets to mimic xxx-unix. + Tue Mar 7 20:14:53 1995 Keith Vetter (keithv@fusion.com) * disp_maj.c: added casts on int->long assignments. diff --git a/src/lib/gssapi/generic/Makefile.in b/src/lib/gssapi/generic/Makefile.in index 182c307e9..9b7311bb2 100644 --- a/src/lib/gssapi/generic/Makefile.in +++ b/src/lib/gssapi/generic/Makefile.in @@ -2,7 +2,7 @@ CFLAGS = $(CCOPTS) $(DEFS) -I. -I$(srcdir) LDFLAGS = -g ##DOSBUILDTOP = ..\..\.. -##DOSLIBNAME=..\libgssapi_krb5.$(LIBEXT) +##DOSLIBNAME=..\gssapi.$(LIBEXT) ##DOSsrcdir = . ##DOS!include $(BUILDTOP)\config\windows.in @@ -64,6 +64,8 @@ all:: all-$(WHAT) $(SRCS) $(HDRS) includes $(OBJS) all-unix:: +all-mac:: + all-windows:: if not exist $(EHDRDIR)\nul mkdir $(EHDRDIR) copy gssapi.h $(EHDRDIR) @@ -74,6 +76,9 @@ clean:: clean-$(WHAT) clean-unix:: $(RM) $(ETHDRS) $(ETSRCS) +clean-mac:: + $(RM) $(ETHDRS) $(ETSRCS) + clean-windows:: $(RM) $(EHDRDIR)\gssapi.h $(EHDRDIR)\gssapi_generic.h if exist $(EHDRDIR)\nul rmdir $(EHDRDIR) diff --git a/src/lib/gssapi/krb5/ChangeLog b/src/lib/gssapi/krb5/ChangeLog index 975e965c5..fbb262e7e 100644 --- a/src/lib/gssapi/krb5/ChangeLog +++ b/src/lib/gssapi/krb5/ChangeLog @@ -1,3 +1,12 @@ +Thu Mar 16 19:54:33 1995 Keith Vetter (keithv@fusion.com) + + * init_sec_context.c: fixed signed/unsigned mismatch and + added a prototype which will later be removed. + * import_name.c: fixed for the PC--made conditional the + code dependent upon passwords. + * Makefile.in: changed the name of the library the PC + builds, and added xxx-mac targets to mimic xxx-unix. + Fri Mar 10 09:44:29 1995 Chris Provenzano (proven@mit.edu) * init_sec_context.c (krb5_gss_init_sec_context()) diff --git a/src/lib/gssapi/krb5/Makefile.in b/src/lib/gssapi/krb5/Makefile.in index eb3e9a01b..8455d91fe 100644 --- a/src/lib/gssapi/krb5/Makefile.in +++ b/src/lib/gssapi/krb5/Makefile.in @@ -2,7 +2,7 @@ CFLAGS = $(CCOPTS) $(DEFS) -I. -I$(srcdir) -I../generic -I$(srcdir)/../generic LDFLAGS = -g ##DOSBUILDTOP = ..\..\.. -##DOSLIBNAME=..\libgssapi_krb5.$(LIBEXT) +##DOSLIBNAME=..\gssapi.$(LIBEXT) ##DOSsrcdir = . ##DOS!include $(BUILDTOP)\config\windows.in @@ -91,6 +91,9 @@ clean:: clean-$(WHAT) clean-unix:: $(RM) $(ETHDRS) $(ETSRCS) +clean-mac:: + $(RM) $(ETHDRS) $(ETSRCS) + clean-windows:: depend:: $(ETSRCS) diff --git a/src/lib/gssapi/krb5/import_name.c b/src/lib/gssapi/krb5/import_name.c index fbe50cc3e..0510a0b8e 100644 --- a/src/lib/gssapi/krb5/import_name.c +++ b/src/lib/gssapi/krb5/import_name.c @@ -21,8 +21,10 @@ */ #include "gssapiP_krb5.h" -#ifndef _MSDOS +#ifndef NO_PASSWORD #include +#endif + #ifdef USE_STRING_H #include #else @@ -48,8 +50,9 @@ krb5_gss_import_name(context, minor_status, input_name_buffer, krb5_principal princ; krb5_error_code code; char *stringrep; +#ifndef NO_PASSWORD struct passwd *pw; - +#endif /* set up default returns */ *output_name = NULL; @@ -72,7 +75,7 @@ krb5_gss_import_name(context, minor_status, input_name_buffer, service = tmp; if ((host = strchr(tmp, '@')) == NULL) { xfree(tmp); - *minor_status = G_BAD_SERVICE_NAME; + *minor_status = (OM_uint32) G_BAD_SERVICE_NAME; return(GSS_S_BAD_NAME); } *host = '\0'; @@ -87,7 +90,7 @@ krb5_gss_import_name(context, minor_status, input_name_buffer, krb5_principal input; if (input_name_buffer->length != sizeof(krb5_principal)) { - *minor_status = G_WRONG_SIZE; + *minor_status = (OM_uint32) G_WRONG_SIZE; return(GSS_S_BAD_NAME); } @@ -104,16 +107,18 @@ krb5_gss_import_name(context, minor_status, input_name_buffer, g_OID_equal(input_name_type, gss_nt_krb5_name) || g_OID_equal(input_name_type, gss_nt_user_name)) { stringrep = (char *) input_name_buffer->value; +#ifndef NO_PASSWORD } else if (g_OID_equal(input_name_type, gss_nt_machine_uid_name)) { if (pw = getpwuid(*((uid_t *) input_name_buffer->value))) stringrep = pw->pw_name; else - *minor_status = G_NOUSER; + *minor_status = (OM_uint32) G_NOUSER; } else if (g_OID_equal(input_name_type, gss_nt_string_uid_name)) { if (pw = getpwuid((uid_t) atoi(input_name_buffer->value))) stringrep = pw->pw_name; else - *minor_status = G_NOUSER; + *minor_status = (OM_uint32) G_NOUSER; +#endif } else { return(GSS_S_BAD_NAMETYPE); } @@ -138,7 +143,7 @@ krb5_gss_import_name(context, minor_status, input_name_buffer, if (! kg_save_name((gss_name_t) princ)) { krb5_free_principal(context, princ); - *minor_status = G_VALIDATE_FAILED; + *minor_status = (OM_uint32) G_VALIDATE_FAILED; return(GSS_S_FAILURE); } @@ -147,4 +152,3 @@ krb5_gss_import_name(context, minor_status, input_name_buffer, *output_name = (gss_name_t) princ; return(GSS_S_COMPLETE); } -#endif diff --git a/src/lib/gssapi/krb5/init_sec_context.c b/src/lib/gssapi/krb5/init_sec_context.c index aab3b23ba..924d0c94d 100644 --- a/src/lib/gssapi/krb5/init_sec_context.c +++ b/src/lib/gssapi/krb5/init_sec_context.c @@ -63,7 +63,7 @@ make_ap_req(context, auth_context, cred, server, endtime, chan_bindings, /* done with this, free it */ xfree(md5.contents); - checksum_data.data = ckbuf; + checksum_data.data = (char *) ckbuf; checksum_data.length = sizeof(ckbuf); /* fill in the necessary fields in creds */ @@ -174,6 +174,8 @@ krb5_gss_init_sec_context(context, minor_status, claimant_cred_handle, krb5_timestamp now; gss_buffer_desc token; int i; +/* Remove this when server is fixed and this function goes away */ +krb5_error_code INTERFACE krb5_auth_con_setkey (); /* set up return values so they can be "freed" successfully */ @@ -412,6 +414,7 @@ krb5_gss_init_sec_context(context, minor_status, claimant_cred_handle, sptr = (char *) ptr; /* PC compiler bug */ TREAD_STR(sptr, ap_rep.data, ap_rep.length); +/* A hack. Don't forget to remove the prototype for it above */ krb5_auth_con_setkey(context, ctx->auth_context, ctx->subkey); /* decode the ap_rep */ if (code = krb5_rd_rep(context,ctx->auth_context,&ap_rep,&ap_rep_data)) { -- 2.26.2