From 51d83b217d1cd2e573d7e11a723d4df50b6e9941 Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Mon, 25 May 1998 01:54:34 +0000 Subject: [PATCH] copy_ccache.c (gss_krb5_copy_ccache): Fix bugs in copy_ccache.c, which never compiled cleanly (since it wasn't added to the Makefile correctly originally). k5seal.c (make_seal_token): Clean up -Wall flames git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10578 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/gssapi/krb5/ChangeLog | 8 ++++++++ src/lib/gssapi/krb5/Makefile.in | 1 + src/lib/gssapi/krb5/copy_ccache.c | 4 ++-- src/lib/gssapi/krb5/k5seal.c | 16 ++++++++-------- 4 files changed, 19 insertions(+), 10 deletions(-) diff --git a/src/lib/gssapi/krb5/ChangeLog b/src/lib/gssapi/krb5/ChangeLog index d736938f7..0e9f73bea 100644 --- a/src/lib/gssapi/krb5/ChangeLog +++ b/src/lib/gssapi/krb5/ChangeLog @@ -1,3 +1,11 @@ +1998-05-24 Theodore Ts'o + + * copy_ccache.c (gss_krb5_copy_ccache): Fix bugs in copy_ccache.c, + which never compiled cleanly (since it wasn't added to the + Makefile correctly originally). + + * k5seal.c (make_seal_token): Clean up -Wall flames + 1998-05-18 Theodore Ts'o * inq_cred.c (krb5_gss_inquire_cred): diff --git a/src/lib/gssapi/krb5/Makefile.in b/src/lib/gssapi/krb5/Makefile.in index e191d99fc..5b74b81d9 100644 --- a/src/lib/gssapi/krb5/Makefile.in +++ b/src/lib/gssapi/krb5/Makefile.in @@ -111,6 +111,7 @@ STLIBOBJS = \ canon_name.o \ compare_name.o \ context_time.o \ + copy_ccache.o \ delete_sec_context.o \ disp_name.o \ disp_status.o \ diff --git a/src/lib/gssapi/krb5/copy_ccache.c b/src/lib/gssapi/krb5/copy_ccache.c index 39d9bc277..8096eecc3 100644 --- a/src/lib/gssapi/krb5/copy_ccache.c +++ b/src/lib/gssapi/krb5/copy_ccache.c @@ -14,7 +14,7 @@ gss_krb5_copy_ccache(minor_status, cred_handle, out_ccache) krb5_context context; /* validate the cred handle */ - stat = krb5_gss_validate_cred(minor_status, creds); + stat = krb5_gss_validate_cred(minor_status, cred_handle); if (stat) return(stat); @@ -32,7 +32,7 @@ gss_krb5_copy_ccache(minor_status, cred_handle, out_ccache) *minor_status = code; return(GSS_S_FAILURE); } - while (!code && !krb5_cc_next_cred(context, k5creds->ccache, &creds, &cursor)) + while (!code && !krb5_cc_next_cred(context, k5creds->ccache, &cursor, &creds)) code = krb5_cc_store_cred(context, out_ccache, &creds); krb5_cc_end_seq_get(context, k5creds->ccache, &cursor); diff --git a/src/lib/gssapi/krb5/k5seal.c b/src/lib/gssapi/krb5/k5seal.c index 1182b5f31..c174bb7cb 100644 --- a/src/lib/gssapi/krb5/k5seal.c +++ b/src/lib/gssapi/krb5/k5seal.c @@ -45,7 +45,7 @@ make_seal_token(context, enc_ed, seq_ed, seqnum, direction, text, token, char *data_ptr; krb5_checksum md5cksum; krb5_checksum cksum; - int conflen, tmsglen, tlen; + int conflen=0, tmsglen, tlen; unsigned char *t, *ptr; /* create the token buffer */ @@ -315,17 +315,17 @@ kg_seal(context, minor_status, context_handle, conf_req_flag, qop_req, return(GSS_S_NO_CONTEXT); } - if (code = krb5_timeofday(context, &now)) { + if ((code = krb5_timeofday(context, &now))) { *minor_status = code; return(GSS_S_FAILURE); } - if (code = make_seal_token(context, &ctx->enc, &ctx->seq, - &ctx->seq_send, ctx->initiate, - input_message_buffer, output_message_buffer, - ctx->signalg, ctx->cksum_size, ctx->sealalg, - conf_req_flag, toktype, ctx->big_endian, - ctx->mech_used)) { + if ((code = make_seal_token(context, &ctx->enc, &ctx->seq, + &ctx->seq_send, ctx->initiate, + input_message_buffer, output_message_buffer, + ctx->signalg, ctx->cksum_size, ctx->sealalg, + conf_req_flag, toktype, ctx->big_endian, + ctx->mech_used))) { *minor_status = code; return(GSS_S_FAILURE); } -- 2.26.2