From: Theodore Tso Date: Fri, 2 May 1997 02:57:24 +0000 (+0000) Subject: Write special case hack for the SAP kerberos libraries since we can't X-Git-Tag: krb5-1.1-beta1~1141 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b067bb6b01dcc3d6c409fede7fe1350003257f03;p=krb5.git Write special case hack for the SAP kerberos libraries since we can't make the version server code correctly read out the version resource from SAPGUI.EXE for some reason.... git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10082 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/ChangeLog b/src/lib/ChangeLog index 150ef916e..fc807acb5 100644 --- a/src/lib/ChangeLog +++ b/src/lib/ChangeLog @@ -1,3 +1,10 @@ +Thu May 1 22:56:04 1997 Theodore Ts'o + + * Makefile.in, win_glue.c, sapkrb16.def, sapkrb32.def: Write + special case hack for the SAP kerberos libraries since we + can't make the version server code correctly read out the + version resource from SAPGUI.EXE for some reason.... + Tue Apr 29 06:22:03 1997 Theodore Ts'o * win_glue.c (CallVersionServer): Add code to get the version diff --git a/src/lib/Makefile.in b/src/lib/Makefile.in index f8a5b4141..34571e9a4 100644 --- a/src/lib/Makefile.in +++ b/src/lib/Makefile.in @@ -79,11 +79,11 @@ $(KLIB): $(KLIBS) $(CLIB) $(WLIB) $(KDEF) k5_glue.obj $(KRB5RC) $(GLIB): $(GLIBS) $(KLIB) $(CLIB) $(GDEF) gss_glue.obj ##WIN16## link /co /seg:400 /noe /nod /nol \ ##WIN16## gss_glue, $*.dll, $*.map, \ -##WIN16## $(MITLIBS) $(GLIBS) $(KLIB) $(CLIB) $(WINLIBS), $(GDEF) +##WIN16## $(GLIBS) $(KLIB) $(CLIB) $(WINLIBS), $(GDEF) ##WIN16## rc /nologo /p /k $*.dll ##WIN16## implib /nologo $@ $*.dll ##WIN32## link $(WINDLLFLAGS) /def:$(GDEF) /out:$*.dll \ -##WIN32## gss_glue.obj $(MITLIBS) $(GLIBS) $(KLIB) $(CLIB) $(WINLIBS) +##WIN32## gss_glue.obj $(GLIBS) $(KLIB) $(CLIB) $(WINLIBS) $(K4LIB): $(K4LIBS) $(KLIB) $(CLIB) $(K4DEF) k4_glue.obj ##WIN16## link /co /seg:400 /noe /nod /nol \ @@ -94,12 +94,51 @@ $(K4LIB): $(K4LIBS) $(KLIB) $(CLIB) $(K4DEF) k4_glue.obj ##WIN32## link $(WINDLLFLAGS) /def:$(K4DEF) /out:$*.dll \ ##WIN32## k4_glue.obj $(K4LIBS) $(KLIB) $(CLIB) $(WINLIBS) +# +# The following kludge is for MIT's SAP/Version server hack +# + +##WIN16##SGDEF = sapgss16.def +##WIN16##SKDEF = sapkrb16.def +##WIN32##SGDEF = gssapi.def +##WIN32##SKDEF = krb5_32.def +##WIN16##SGLIB = sapgss16.lib +##WIN16##SKLIB = sapkrb16.lib +##WIN32##SGLIB = sapgss32.lib +##WIN32##SKLIB = sapkrb32.lib + +sap_glue.obj: win_glue.c + $(CC) $(CFLAGS) $(MITFLAGS) /DSAP_VERSERV=1 /DKRB5=1 /c \ + /Fo$@ win_glue.c + +$(SKLIB): $(KLIBS) $(CLIB) $(WLIB) $(KDEF) sap_glue.obj $(KRB5RC) +##WIN16## link /co /seg:400 /noe /nod /nol \ +##WIN16## sap_glue, $*.dll, $*.map, \ +##WIN16## $(MITLIBS) $(KLIBS) $(CLIB) $(WINLIBS), $(SKDEF) +##WIN16## rc /nologo /p /k $(CPPFLAGS) -D_MSDOS -DRES_ONLY \ +##WIN16## $(KRB5RC) $*.dll +##WIN16## implib /nologo $@ $*.dll +##WIN32## link $(WINDLLFLAGS) /def:$(SKDEF) /out:$*.dll \ +##WIN32## sap_glue.obj $(KRB5RC) $(MITLIBS) $(KLIBS) $(CLIB) \ +##WIN32## $(WINLIBS) advapi32.lib gdi32.lib + +$(SGLIB): $(GLIBS) $(SKLIB) $(CLIB) $(GDEF) gss_glue.obj +##WIN16## link /co /seg:400 /noe /nod /nol \ +##WIN16## gss_glue, $*.dll, $*.map, \ +##WIN16## $(MITLIBS) $(GLIBS) $(SKLIB) $(CLIB) $(WINLIBS), $(SGDEF) +##WIN16## rc /nologo /p /k $*.dll +##WIN16## implib /nologo $@ $*.dll +##WIN32## link $(WINDLLFLAGS) /def:$(SGDEF) /out:$*.dll \ +##WIN32## gss_glue.obj $(MITLIBS) $(GLIBS) $(SKLIB) $(CLIB) $(WINLIBS) + +##MIT##lib-windows:: $(SKLIB) $(SGLIB) + k5_glue.obj: win_glue.c $(CC) $(CFLAGS) $(MITFLAGS) /c /DKRB5=1 /Fo$@ $** k4_glue.obj: win_glue.c $(CC) $(CFLAGS) /c /DKRB4=1 /Fo$@ $** gss_glue.obj: win_glue.c - $(CC) $(CFLAGS) $(MITFLAGS) /c /DGSSAPI=1 /Fo$@ $** + $(CC) $(CFLAGS) /c /DGSSAPI=1 /Fo$@ $** no_glue.obj: win_glue.c $(CC) $(CFLAGS) /c /Fo$@ $** @@ -117,21 +156,6 @@ krb4.lib: $(K4LIB) krb5.lib: $(KLIB) gssapi.lib: $(GLIB) -sap_glue.obj: win_glue.c - $(CC) $(CFLAGS) -DSAP_TIMEBOMB -DGSSAPI=1 /c /Fo$@ win_glue.c - -##WIN16##krbsap16.dll: $(GLIBS) $(KLIB) $(CLIB) $(GDEF) $(GDEF) sap_glue.obj -##WIN16## link /co /seg:400 /noe /nod /nol \ -##WIN16## sap_glue, $*.dll, $*.map, \ -##WIN16## $(GLIBS) $(KLIB) $(CLIB) $(WINLIBS), $(GDEF) -##WIN16## rc /nologo /p /k $*.dll -##WIN16## implib /nologo $*.lib $*.dll - -##WIN32##krbsap32.dll: $(GLIBS) $(KLIB) $(CLIB) $(GDEF) $(GDEF) sap_glue.obj -##WIN32## link $(WINDLLFLAGS) /def:$(GDEF) /out:$*.dll \ -##WIN32## sap_glue.obj $(GLIBS) $(KLIB) $(CLIB) $(WINLIBS) - - all-windows:: @echo Making in lib\crypto cd crypto @@ -155,7 +179,7 @@ all-windows:: cd .. all-windows:: lib-windows -lib-windows: krb5.lib gssapi.lib krb4.lib +lib-windows:: krb5.lib gssapi.lib krb4.lib clean-windows:: @echo Making clean in lib\crypto diff --git a/src/lib/sapgss16.def b/src/lib/sapgss16.def new file mode 100644 index 000000000..ac6b7c94f --- /dev/null +++ b/src/lib/sapgss16.def @@ -0,0 +1,78 @@ +;---------------------------------------------------- +; SAPGSS16.DEF - GSSAPI.DLL module definition file +;---------------------------------------------------- + +LIBRARY SAPGSS16 +DESCRIPTION 'Base Generic Security Service API' +EXETYPE WINDOWS +CODE PRELOAD MOVEABLE DISCARDABLE +DATA PRELOAD MOVEABLE SINGLE +HEAPSIZE 8192 + +EXPORTS + WEP @1001 RESIDENTNAME + LibMain @1002 +; + gss_acquire_cred + gss_release_cred + gss_init_sec_context + gss_accept_sec_context + gss_process_context_token + gss_delete_sec_context + gss_context_time + gss_sign + gss_verify + gss_seal + gss_unseal + gss_display_status + gss_indicate_mechs + gss_compare_name + gss_display_name + gss_import_name + gss_release_name + gss_release_buffer + gss_release_oid_set + gss_inquire_cred +; +; GSS-API v2 additional credential calls +; + gss_add_cred + gss_inquire_cred_by_mech +; +; GSS-API v2 additional context-level calls +; + gss_inquire_context + gss_wrap_size_limit + gss_export_sec_context + gss_import_sec_context +; +; GSS-API v2 additional calls for OID and OID_set operations +; + gss_release_oid + gss_create_empty_oid_set + gss_add_oid_set_member + gss_test_oid_set_member + gss_oid_to_str + gss_str_to_oid +; +; GSS-API v2 renamed message protection calls +; + gss_wrap + gss_unwrap + gss_get_mic + gss_verify_mic +; +; GSS-API v2 future extensions +; + gss_inquire_names_for_mech +; gss_inquire_mechs_for_name + gss_canonicalize_name + gss_export_name + gss_duplicate_name +; +; GSS-API variables +; + _gss_nt_user_name + _gss_nt_machine_uid_name + _gss_nt_string_uid_name + _gss_nt_service_name diff --git a/src/lib/sapkrb16.def b/src/lib/sapkrb16.def new file mode 100644 index 000000000..944545b69 --- /dev/null +++ b/src/lib/sapkrb16.def @@ -0,0 +1,188 @@ +;---------------------------------------------------- +; SAPKRB16.DEF - KRB5.DLL module definition file +;---------------------------------------------------- + +LIBRARY SAPKRB16 +DESCRIPTION 'DLL for Kerberos 5' +EXETYPE WINDOWS +CODE PRELOAD MOVEABLE DISCARDABLE +DATA PRELOAD MOVEABLE SINGLE +HEAPSIZE 8192 + +EXPORTS + WEP @1001 RESIDENTNAME + LibMain @1002 +; Kerberos 5 + _krb5_build_principal + _krb5_build_principal_ext + krb5_copy_addr + krb5_copy_addresses + krb5_copy_authdata + krb5_copy_authenticator + krb5_copy_checksum + krb5_copy_creds + krb5_copy_data + krb5_copy_keyblock + krb5_copy_keyblock_contents + krb5_copy_principal + krb5_copy_ticket + krb5_decrypt_tkt_part + krb5_free_address + krb5_free_addresses + krb5_free_ap_rep + krb5_free_ap_rep_enc_part + krb5_free_ap_req + krb5_free_authdata + krb5_free_authenticator + krb5_free_authenticator_contents + krb5_free_checksum + krb5_free_context + krb5_free_cred + krb5_free_cred_contents + krb5_free_cred_enc_part + krb5_free_creds + krb5_free_data + krb5_free_data_contents + krb5_free_enc_kdc_rep_part + krb5_free_enc_tkt_part + krb5_free_error + krb5_free_host_realm + krb5_free_kdc_rep + krb5_free_kdc_req + krb5_free_keyblock + krb5_free_keyblock_contents + krb5_free_last_req + krb5_free_pa_data + krb5_free_principal + krb5_free_priv + krb5_free_priv_enc_part + krb5_free_pwd_data + krb5_free_pwd_sequences + krb5_free_safe + krb5_free_tgt_creds + krb5_free_ticket + krb5_free_tickets + krb5_free_tkt_authent + krb5_fwd_tgt_creds + krb5_get_credentials + krb5_get_credentials_renew + krb5_get_credentials_validate + krb5_get_default_realm + krb5_get_host_realm + krb5_get_in_tkt + krb5_get_in_tkt_with_keytab + krb5_get_in_tkt_with_password + krb5_get_in_tkt_with_skey + krb5_get_notification_message + krb5_init_context + krb5_mk_error + krb5_mk_priv + krb5_mk_rep + krb5_mk_req + krb5_mk_req_extended + krb5_mk_safe + krb5_os_localaddr + krb5_parse_name + krb5_principal_compare + krb5_rd_cred + krb5_rd_error + krb5_rd_priv + krb5_rd_rep + krb5_rd_req + krb5_rd_safe + krb5_read_password + krb5_recvauth + krb5_sendauth + krb5_sname_to_principal + krb5_timeofday + krb5_unparse_name + krb5_unparse_name_ext + krb5_us_timeofday +; + krb5_use_enctype + krb5_checksum_size + krb5_encrypt_size + krb5_calculate_checksum + krb5_verify_checksum + krb5_eblock_enctype +; + krb5_decrypt + krb5_encrypt + krb5_string_to_key + krb5_process_key + krb5_finish_key + krb5_init_random_key + krb5_finish_random_key + krb5_random_key +; + krb5_425_conv_principal + krb5_524_conv_principal +; + krb5_cksumtype_to_string + krb5_deltat_to_string + krb5_enctype_to_string + krb5_salttype_to_string + krb5_string_to_cksumtype + krb5_string_to_deltat + krb5_string_to_enctype + krb5_string_to_salttype + krb5_string_to_timestamp + krb5_timestamp_to_sfstring + krb5_timestamp_to_string +; + krb5_auth_con_free + krb5_auth_con_genaddrs + krb5_auth_con_getflags + krb5_auth_con_getkey + krb5_auth_con_getlocalsubkey + krb5_auth_con_getremotesubkey + krb5_auth_con_init + krb5_auth_con_setflags + krb5_auth_con_getlocalseqnumber + krb5_auth_con_getremoteseqnumber + krb5_auth_con_setuseruserkey + krb5_auth_con_getauthenticator + krb5_auth_con_set_req_cksumtype +; + krb5_cc_default + krb5_cc_register + krb5_cc_resolve +; + krb5_kt_default + krb5_kt_register + krb5_kt_resolve + krb5_kt_add_entry + krb5_kt_free_entry + krb5_kt_read_service_key + krb5_kt_remove_entry +;Kadm routines + krb5_adm_connect + krb5_adm_disconnect + krb5_free_adm_data + krb5_read_adm_reply + krb5_send_adm_cmd +; +;Temporary exports (DO NOT USE) + _sscanf + _decode_krb5_ticket + des_ecb_encrypt + des_new_random_key + des_key_sched + des_pcbc_encrypt + des_quad_cksum + des_string_to_key + des_set_random_generator_seed + profile_get_values + krb5_random_confounder + krb5_size_opaque + krb5_internalize_opaque + krb5_externalize_opaque + krb5_ser_pack_int32 + krb5_ser_unpack_int32 + krb5_ser_pack_bytes + krb5_ser_unpack_bytes + krb5_ser_auth_context_init + krb5_ser_context_init + krb5_ser_ccache_init + krb5_ser_keytab_init + krb5_ser_rcache_init diff --git a/src/lib/win_glue.c b/src/lib/win_glue.c index bd1eae642..8df5880ef 100644 --- a/src/lib/win_glue.c +++ b/src/lib/win_glue.c @@ -70,9 +70,8 @@ * #defines for using MIT's version server DLL */ #ifdef SAP_VERSERV -#define VERSERV #define APP_TITLE "KRB5-SAP" -#define APP_VER "3.0c" +#define APP_VER "3.0f" #define APP_INI "krb5sap.ini" #define VERSERV_ERROR KRB5_APPL_EXPIRED #endif @@ -307,6 +306,10 @@ krb5_error_code krb5_vercheck() return KRB5_LIB_EXPIRED; #endif { +#ifdef APP_TITLE + if (CallVersionServer(APP_TITLE, APP_VER, APP_INI, NULL)) + return VERSERV_ERROR; +#else char AppTitle[256]; char AppVer[256]; char AppIni[256]; @@ -318,6 +321,8 @@ krb5_error_code krb5_vercheck() if (CallVersionServer(AppTitle, AppVer, AppIni, NULL)) return KRB5_APPL_EXPIRED; } +#endif + } #endif return 0;