summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/gssapi/krb5/ChangeLog7
-rw-r--r--src/lib/gssapi/krb5/accept_sec_context.c7
-rw-r--r--src/lib/gssapi/krb5/gssapiP_krb5.h2
-rw-r--r--src/lib/gssapi/krb5/init_sec_context.c11
-rw-r--r--src/lib/gssapi/krb5/inq_context.c2
-rw-r--r--src/lib/gssapi/krb5/ser_sctx.c4
6 files changed, 21 insertions, 12 deletions
diff --git a/src/lib/gssapi/krb5/ChangeLog b/src/lib/gssapi/krb5/ChangeLog
index 88112479a8..27512e776d 100644
--- a/src/lib/gssapi/krb5/ChangeLog
+++ b/src/lib/gssapi/krb5/ChangeLog
@@ -1,3 +1,10 @@
+Fri Jun 7 14:52:56 1996 Kevin L Mitchell <klmitch@mit.edu>
+
+ * accept_sec_context.c, init_sec_context.c, inq_context.c,
+ gssapiP_krb5.h: changed `mutual' element of struct
+ _krb5_gss_ctx_id_rec into more general `gss_flags' and
+ updated functions that process it
+
Tue May 14 19:09:49 1996 Richard Basch <basch@lehman.com>
* k5seal.c k5unseal.c util_cksum.c:
diff --git a/src/lib/gssapi/krb5/accept_sec_context.c b/src/lib/gssapi/krb5/accept_sec_context.c
index 7c0d11743c..79d41b71da 100644
--- a/src/lib/gssapi/krb5/accept_sec_context.c
+++ b/src/lib/gssapi/krb5/accept_sec_context.c
@@ -315,7 +315,8 @@ krb5_gss_accept_sec_context(ct, minor_status, context_handle,
memset(ctx, 0, sizeof(krb5_gss_ctx_id_rec));
ctx->auth_context = auth_context;
ctx->initiate = 0;
- ctx->mutual = gss_flags & GSS_C_MUTUAL_FLAG;
+ ctx->gss_flags = GSS_C_CONF_FLAG | GSS_C_INTEG_FLAG |
+ (gss_flags & (GSS_C_MUTUAL_FLAG | GSS_C_DELEG_FLAG));
ctx->seed_init = 0;
ctx->big_endian = bigend;
@@ -370,7 +371,7 @@ krb5_gss_accept_sec_context(ct, minor_status, context_handle,
/* generate an AP_REP if necessary */
- if (ctx->mutual) {
+ if (ctx->gss_flags & GSS_C_MUTUAL_FLAG) {
krb5_data ap_rep;
unsigned char * ptr;
if ((code = krb5_mk_rep(context, auth_context, &ap_rep))) {
@@ -433,7 +434,7 @@ krb5_gss_accept_sec_context(ct, minor_status, context_handle,
}
if (ret_flags)
- *ret_flags = GSS_C_CONF_FLAG | GSS_C_INTEG_FLAG | ctx->mutual;
+ *ret_flags = ctx->gss_flags;
ctx->established = 1;
diff --git a/src/lib/gssapi/krb5/gssapiP_krb5.h b/src/lib/gssapi/krb5/gssapiP_krb5.h
index a7aebbef72..53c4f46918 100644
--- a/src/lib/gssapi/krb5/gssapiP_krb5.h
+++ b/src/lib/gssapi/krb5/gssapiP_krb5.h
@@ -83,7 +83,7 @@ typedef struct _krb5_gss_enc_desc {
typedef struct _krb5_gss_ctx_id_rec {
int initiate; /* nonzero if initiating, zero if accepting */
- OM_uint32 mutual;
+ OM_uint32 gss_flags;
int seed_init;
unsigned char seed[16];
krb5_principal here;
diff --git a/src/lib/gssapi/krb5/init_sec_context.c b/src/lib/gssapi/krb5/init_sec_context.c
index d1eac9f401..2b671680ae 100644
--- a/src/lib/gssapi/krb5/init_sec_context.c
+++ b/src/lib/gssapi/krb5/init_sec_context.c
@@ -305,7 +305,8 @@ krb5_gss_init_sec_context(ct, minor_status, claimant_cred_handle,
memset(ctx, 0, sizeof(krb5_gss_ctx_id_rec));
ctx->auth_context = NULL;
ctx->initiate = 1;
- ctx->mutual = req_flags & GSS_C_MUTUAL_FLAG;
+ ctx->gss_flags = ((req_flags & (GSS_C_MUTUAL_FLAG | GSS_C_DELEG_FLAG)) |
+ GSS_C_CONF_FLAG | GSS_C_INTEG_FLAG);
ctx->flags = req_flags & GSS_C_DELEG_FLAG;
ctx->seed_init = 0;
ctx->big_endian = 0; /* all initiators do little-endian, as per spec */
@@ -337,7 +338,8 @@ krb5_gss_init_sec_context(ct, minor_status, claimant_cred_handle,
if ((code = make_ap_req(context, &(ctx->auth_context), cred,
ctx->there, &ctx->endtime, input_chan_bindings,
- ctx->mutual, &ctx->flags, &token))) {
+ ctx->gss_flags & GSS_C_MUTUAL_FLAG, &ctx->flags,
+ &token))) {
krb5_free_principal(context, ctx->here);
krb5_free_principal(context, ctx->there);
xfree(ctx);
@@ -403,13 +405,12 @@ krb5_gss_init_sec_context(ct, minor_status, claimant_cred_handle,
*output_token = token;
if (ret_flags)
- *ret_flags = ((req_flags & (GSS_C_MUTUAL_FLAG | GSS_C_DELEG_FLAG)) |
- GSS_C_CONF_FLAG | GSS_C_INTEG_FLAG);
+ *ret_flags = ctx->gss_flags;
/* return successfully */
*minor_status = 0;
- if (ctx->mutual) {
+ if (ctx->gss_flags & GSS_C_MUTUAL_FLAG) {
ctx->established = 0;
return(GSS_S_CONTINUE_NEEDED);
} else {
diff --git a/src/lib/gssapi/krb5/inq_context.c b/src/lib/gssapi/krb5/inq_context.c
index 8ccd8fbb93..c8499212fb 100644
--- a/src/lib/gssapi/krb5/inq_context.c
+++ b/src/lib/gssapi/krb5/inq_context.c
@@ -119,7 +119,7 @@ krb5_gss_inquire_context(ct, minor_status, context_handle, initiator_name,
*mech_type = (gss_OID) gss_mech_krb5;
if (ret_flags)
- *ret_flags = GSS_C_CONF_FLAG | GSS_C_INTEG_FLAG | ctx->mutual;
+ *ret_flags = ctx->gss_flags;
if (locally_initiated)
*locally_initiated = ctx->initiate;
diff --git a/src/lib/gssapi/krb5/ser_sctx.c b/src/lib/gssapi/krb5/ser_sctx.c
index 7b64f74219..5acfd5c678 100644
--- a/src/lib/gssapi/krb5/ser_sctx.c
+++ b/src/lib/gssapi/krb5/ser_sctx.c
@@ -578,7 +578,7 @@ kg_ctx_externalize(kcontext, arg, buffer, lenremain)
/* Now static data */
(void) krb5_ser_pack_int32((krb5_int32) ctx->initiate,
&bp, &remain);
- (void) krb5_ser_pack_int32((krb5_int32) ctx->mutual,
+ (void) krb5_ser_pack_int32((krb5_int32) ctx->gss_flags,
&bp, &remain);
(void) krb5_ser_pack_int32((krb5_int32) ctx->seed_init,
&bp, &remain);
@@ -683,7 +683,7 @@ kg_ctx_internalize(kcontext, argp, buffer, lenremain)
(void) krb5_ser_unpack_int32(&ibuf, &bp, &remain);
ctx->initiate = (int) ibuf;
(void) krb5_ser_unpack_int32(&ibuf, &bp, &remain);
- ctx->mutual = (int) ibuf;
+ ctx->gss_flags = (int) ibuf;
(void) krb5_ser_unpack_int32(&ibuf, &bp, &remain);
ctx->seed_init = (int) ibuf;
(void) krb5_ser_unpack_bytes((krb5_octet *) ctx->seed,