+Thu Jul 25 02:08:17 1996 Theodore Y. Ts'o <tytso@mit.edu>
+
+ * init_sec_context.c (krb5_gss_init_sec_context): Fixed error
+ checking so that if you pass a bad mechanism type, it
+ *will* get flagged as an error.
+
Wed Jul 24 22:54:37 1996 Ezra Peisach <epeisach@kangaroo.mit.edu>
* acquire_cred.c (krb5_gss_acquire_cred): Initialize variable
Wed Jul 24 19:40:55 1996 Theodore Y. Ts'o <tytso@mit.edu>
+ * rel_oid.c (krb5_gss_release_oid):
+ * krb5_gss_glue.c(gss_release_oid): Re-enable function
+
* ser_sctx.c (kg_oid_externalize): Add proper return code
* accept_sec_context.c (krb5_gss_accept_sec_context):
$(srcdir)/krb5_gss_glue.c \
$(srcdir)/process_context_token.c \
$(srcdir)/rel_cred.c \
+ $(srcdir)/rel_oid.c \
$(srcdir)/rel_name.c \
$(srcdir)/seal.c \
$(srcdir)/ser_sctx.c \
# $(srcdir)/pname_to_uid.c \
# $(srcdir)/k5mech.c \
-# $(srcdir)/rel_oid.c
OBJS = \
accept_sec_context.$(OBJEXT) \
krb5_gss_glue.$(OBJEXT) \
process_context_token.$(OBJEXT) \
rel_cred.$(OBJEXT) \
+ rel_oid.$(OBJEXT) \
rel_name.$(OBJEXT) \
seal.$(OBJEXT) \
ser_sctx.$(OBJEXT) \
# k5mech.$(OBJEXT) \
# pname_to_uid.$(OBJEXT) \
-# rel_oid.$(OBJEXT)
HDRS= $(ETHDRS)
all-unix:: $(SRCS) $(HDRS) includes $(OBJS)
all-mac:: $(SRCS) $(HDRS) includes $(OBJS)
-all-windows:: $(SRCS) $(HDRS) includes $(OBJS)
+all-windows:: win-include $(SRCS) $(HDRS) $(OBJS)
+
+win-include::
if not exist $(EHDRDIR)\nul mkdir $(EHDRDIR)
copy gssapi_krb5.h $(EHDRDIR)
#include "gssapiP_krb5.h"
#include <memory.h>
+#include <stdlib.h>
/*
* $Id$
/* verify the mech_type */
+ err = 0;
if (mech_type == GSS_C_NULL_OID) {
mech_type = cred->rfc_mech?gss_mech_krb5:gss_mech_krb5_old;
- } else if ((g_OID_equal(mech_type, gss_mech_krb5) && !cred->rfc_mech) ||
- (g_OID_equal(mech_type, gss_mech_krb5_old) &&
- !cred->prerfc_mech)) {
+ } else if (g_OID_equal(mech_type, gss_mech_krb5)) {
+ if (!cred->rfc_mech)
+ err = 1;
+ } else if (g_OID_equal(mech_type, gss_mech_krb5_old)) {
+ if (!cred->prerfc_mech)
+ err = 1;
+ } else
+ err = 1;
+
+ if (err) {
*minor_status = 0;
return(GSS_S_BAD_MECH);
}
ptr = (unsigned char *) input_token->value;
- if (err = g_verify_token_header((gss_OID) mech_type, &(ap_rep.length),
- &ptr, KG_TOK_CTX_AP_REP,
- input_token->length)) {
+ if ((err = g_verify_token_header((gss_OID) mech_type, &(ap_rep.length),
+ &ptr, KG_TOK_CTX_AP_REP,
+ input_token->length))) {
*minor_status = err;
return(GSS_S_DEFECTIVE_TOKEN);
}
buffer));
}
-#if 0
/* V2 */
OM_uint32 INTERFACE
gss_release_oid(minor_status, oid)
{
return(krb5_gss_release_oid(minor_status, oid));
}
-#endif
OM_uint32 INTERFACE
gss_release_oid_set(minor_status, set)
*/
#include "gssapiP_krb5.h"
-#if 0
-/*
- * Don't compile this, since nothing is actually using it. The
- * mechanism glue layer will just use the internal release function.
- */
OM_uint32
krb5_gss_release_oid(minor_status, oid)
OM_uint32 *minor_status;
* descriptor. This allows applications to freely mix their own heap-
* allocated OID values with OIDs returned by GSS-API.
*/
- if (krb5_gss_internal_release_oid(NULL, minor_status,
- oid) != GSS_S_COMPLETE) {
+ if (krb5_gss_internal_release_oid(minor_status, oid) != GSS_S_COMPLETE) {
/* Pawn it off on the generic routine */
return(generic_gss_release_oid(minor_status, oid));
}
return(GSS_S_COMPLETE);
}
}
-#endif
OM_uint32
-krb5_gss_internal_release_oid(ct, minor_status, oid)
- void *ct;
+krb5_gss_internal_release_oid(minor_status, oid)
OM_uint32 *minor_status;
gss_OID *oid;
{
- krb5_context context = ct;
/*
* This function only knows how to release internal OIDs. It will
* return GSS_S_CONTINUE_NEEDED for any OIDs it does not recognize.