copy_ccache.c (gss_krb5_copy_ccache): Fix bugs in copy_ccache.c, which
authorTheodore Tso <tytso@mit.edu>
Mon, 25 May 1998 01:54:34 +0000 (01:54 +0000)
committerTheodore Tso <tytso@mit.edu>
Mon, 25 May 1998 01:54:34 +0000 (01:54 +0000)
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
src/lib/gssapi/krb5/Makefile.in
src/lib/gssapi/krb5/copy_ccache.c
src/lib/gssapi/krb5/k5seal.c

index d736938f7cd332ee83aea516ede53cb2f0139ff8..0e9f73bea5f4a056130181704515a370d50e5d65 100644 (file)
@@ -1,3 +1,11 @@
+1998-05-24  Theodore Ts'o  <tytso@rsts-11.mit.edu>
+
+       * 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  <tytso@rsts-11.mit.edu>
 
        * inq_cred.c (krb5_gss_inquire_cred): 
index e191d99fcfd8b99119ded1847959aa96580eaaf7..5b74b81d993af208ba99980d23502c238b9ac557 100644 (file)
@@ -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 \
index 39d9bc277c57d8ac1b6d8e15f573abc1897b1182..8096eecc306529250b113b2cd5ffc64fc7ff8575 100644 (file)
@@ -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);
 
index 1182b5f31ee7d83398492ea372de6da62f4c6557..c174bb7cbfc6bb4bad53c6024e2b613e043c7798 100644 (file)
@@ -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);
    }