From a68afdd3636a7b158d559f5f3e07763b180f7ce5 Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Sun, 14 Jul 2002 22:37:52 +0000 Subject: [PATCH] * gssapi_krb5.h: Added #include of gssapi.h and gssapi_generic.h for the Mac because we can't assume people will include them and get the OID macro and the old names on the Mac. * disp_status.c: Updated Mac OS X header paths. * gssapiP_krb5.h: Updated Mac OS X header paths and added prototype on Mac. * gssapi_krb5.h: Updated Mac OS X headers to new framework layout * gssapi_krb5.h, gssapi_krb5.c: Added oids from rfc 1964 using the suggested names. [pullups from 1-2-2-branch] git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14646 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/gssapi/krb5/ChangeLog | 21 ++++++++++++ src/lib/gssapi/krb5/disp_status.c | 5 +++ src/lib/gssapi/krb5/gssapiP_krb5.h | 8 ++--- src/lib/gssapi/krb5/gssapi_krb5.c | 17 +++++++--- src/lib/gssapi/krb5/gssapi_krb5.h | 54 +++++++++++++++++++++++++++++- 5 files changed, 96 insertions(+), 9 deletions(-) diff --git a/src/lib/gssapi/krb5/ChangeLog b/src/lib/gssapi/krb5/ChangeLog index b635d888d..eb69c56a6 100644 --- a/src/lib/gssapi/krb5/ChangeLog +++ b/src/lib/gssapi/krb5/ChangeLog @@ -1,3 +1,24 @@ +2002-07-14 Alexandra Ellwood + + * gssapi_krb5.h: Added #include of gssapi.h and gssapi_generic.h + for the Mac because we can't assume people will include them and + get the OID macro and the old names on the Mac. + + * disp_status.c: Updated Mac OS X header paths. + + * gssapiP_krb5.h: Updated Mac OS X header paths and added + prototype on Mac. + + * gssapi_krb5.h: Updated Mac OS X headers to new framework layout + + [pullups from 1-2-2-branch] + +2002-07-14 Miro Jurisic + + * gssapi_krb5.h, gssapi_krb5.c: Added oids from rfc 1964 using the + suggested names. + [pullup from 1-2-2-branch] + 2002-07-12 Ken Raeburn * accept_sec_context.c (rd_and_store_for_creds): Remove diff --git a/src/lib/gssapi/krb5/disp_status.c b/src/lib/gssapi/krb5/disp_status.c index 0b296f6ce..7725e4dda 100644 --- a/src/lib/gssapi/krb5/disp_status.c +++ b/src/lib/gssapi/krb5/disp_status.c @@ -21,7 +21,12 @@ */ #include "gssapiP_krb5.h" + +#if TARGET_OS_MAC +#include +#else #include "com_err.h" +#endif /* XXXX internationalization!! */ diff --git a/src/lib/gssapi/krb5/gssapiP_krb5.h b/src/lib/gssapi/krb5/gssapiP_krb5.h index d8963f2e2..a51db06bb 100644 --- a/src/lib/gssapi/krb5/gssapiP_krb5.h +++ b/src/lib/gssapi/krb5/gssapiP_krb5.h @@ -47,7 +47,11 @@ #ifndef _GSSAPIP_KRB5_H_ #define _GSSAPIP_KRB5_H_ +#if TARGET_OS_MAC +#include +#else #include +#endif #ifdef HAVE_MEMORY_H #include #endif @@ -60,11 +64,7 @@ #undef minor #endif -#ifndef macintosh -#include "../generic/gssapiP_generic.h" -#else #include "gssapiP_generic.h" -#endif /* The include of gssapi_krb5.h will dtrt with the above #defines in * effect. diff --git a/src/lib/gssapi/krb5/gssapi_krb5.c b/src/lib/gssapi/krb5/gssapi_krb5.c index efcf36c86..189c9449d 100644 --- a/src/lib/gssapi/krb5/gssapi_krb5.c +++ b/src/lib/gssapi/krb5/gssapi_krb5.c @@ -93,15 +93,24 @@ const gss_OID_desc krb5_gss_oid_array[] = { /* this is the v2 assigned OID */ {9, "\052\206\110\206\367\022\001\002\003"}, /* these two are name type OID's */ + + /* 2.1.1. Kerberos Principal Name Form: (rfc 1964) + * This name form shall be represented by the Object Identifier {iso(1) + * member-body(2) United States(840) mit(113554) infosys(1) gssapi(2) + * krb5(2) krb5_name(1)}. The recommended symbolic name for this type + * is "GSS_KRB5_NT_PRINCIPAL_NAME". */ {10, "\052\206\110\206\367\022\001\002\002\001"}, + + /* gss_nt_krb5_principal. Object identifier for a krb5_principal. Do not use. */ {10, "\052\206\110\206\367\022\001\002\002\002"}, { 0, 0 } }; -const gss_OID_desc * const gss_mech_krb5 = krb5_gss_oid_array+0; -const gss_OID_desc * const gss_mech_krb5_old = krb5_gss_oid_array+1; -const gss_OID_desc * const gss_nt_krb5_name = krb5_gss_oid_array+3; -const gss_OID_desc * const gss_nt_krb5_principal = krb5_gss_oid_array+4; +const gss_OID_desc * const gss_mech_krb5 = krb5_gss_oid_array+0; +const gss_OID_desc * const gss_mech_krb5_old = krb5_gss_oid_array+1; +const gss_OID_desc * const gss_nt_krb5_name = krb5_gss_oid_array+3; +const gss_OID_desc * const gss_nt_krb5_principal = krb5_gss_oid_array+4; +const gss_OID_desc * const GSS_KRB5_NT_PRINCIPAL_NAME = krb5_gss_oid_array+3; static const gss_OID_set_desc oidsets[] = { {1, (gss_OID) krb5_gss_oid_array+0}, diff --git a/src/lib/gssapi/krb5/gssapi_krb5.h b/src/lib/gssapi/krb5/gssapi_krb5.h index da2e94e7e..1de52d42e 100644 --- a/src/lib/gssapi/krb5/gssapi_krb5.h +++ b/src/lib/gssapi/krb5/gssapi_krb5.h @@ -23,13 +23,65 @@ #ifndef _GSSAPI_KRB5_H_ #define _GSSAPI_KRB5_H_ -#include +#if defined(macintosh) || (defined(__MACH__) && defined(__APPLE__)) +# include +#endif + +#if TARGET_OS_MAC +# include +# include +# include +#else +# include +#endif /* C++ friendlyness */ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ +#if GSS_RFC_COMPLIANT_OIDS +/* Reserved static storage for GSS_oids. See rfc 1964 for more details. */ + +/* 2.1.1. Kerberos Principal Name Form: */ +GSS_DLLIMP extern const gss_OID_desc * const GSS_KRB5_NT_PRINCIPAL_NAME; +/* This name form shall be represented by the Object Identifier {iso(1) + * member-body(2) United States(840) mit(113554) infosys(1) gssapi(2) + * krb5(2) krb5_name(1)}. The recommended symbolic name for this type + * is "GSS_KRB5_NT_PRINCIPAL_NAME". */ + +/* 2.1.2. Host-Based Service Name Form */ +#define GSS_KRB5_NT_HOSTBASED_SERVICE_NAME GSS_C_NT_HOSTBASED_SERVICE +/* This name form shall be represented by the Object Identifier {iso(1) + * member-body(2) United States(840) mit(113554) infosys(1) gssapi(2) + * generic(1) service_name(4)}. The previously recommended symbolic + * name for this type is "GSS_KRB5_NT_HOSTBASED_SERVICE_NAME". The + * currently preferred symbolic name for this type is + * "GSS_C_NT_HOSTBASED_SERVICE". */ + +/* 2.2.1. User Name Form */ +#define GSS_KRB5_NT_USER_NAME GSS_C_NT_USER_NAME +/* This name form shall be represented by the Object Identifier {iso(1) + * member-body(2) United States(840) mit(113554) infosys(1) gssapi(2) + * generic(1) user_name(1)}. The recommended symbolic name for this + * type is "GSS_KRB5_NT_USER_NAME". */ + +/* 2.2.2. Machine UID Form */ +#define GSS_KRB5_NT_MACHINE_UID_NAME GSS_C_NT_MACHINE_UID_NAME +/* This name form shall be represented by the Object Identifier {iso(1) + * member-body(2) United States(840) mit(113554) infosys(1) gssapi(2) + * generic(1) machine_uid_name(2)}. The recommended symbolic name for + * this type is "GSS_KRB5_NT_MACHINE_UID_NAME". */ + +/* 2.2.3. String UID Form */ +#define GSS_KRB5_NT_STRING_UID_NAME GSS_C_NT_STRING_UID_NAME +/* This name form shall be represented by the Object Identifier {iso(1) + * member-body(2) United States(840) mit(113554) infosys(1) gssapi(2) + * generic(1) string_uid_name(3)}. The recommended symbolic name for + * this type is "GSS_KRB5_NT_STRING_UID_NAME". */ + +#endif /* GSS_RFC_COMPLIANT_OIDS */ + extern const gss_OID_desc * const gss_mech_krb5; extern const gss_OID_desc * const gss_mech_krb5_old; extern const gss_OID_set_desc * const gss_mech_set_krb5; -- 2.26.2