aboutsummaryrefslogtreecommitdiff
path: root/src/lib/krb5/ccache/stdio
diff options
context:
space:
mode:
authorKeith Vetter <keithv@fusion.com>1995-09-11 19:06:45 +0000
committerKeith Vetter <keithv@fusion.com>1995-09-11 19:06:45 +0000
commitcdd6c33b9ae48076999e33ffa70e2365ecc5eb8c (patch)
tree84682f14e77a844dfab2174318ebccb9067c829f /src/lib/krb5/ccache/stdio
parenta66029e852781fa0333dc92bd88bd8184f6feeb1 (diff)
downloadkrb5-cdd6c33b9ae48076999e33ffa70e2365ecc5eb8c.zip
krb5-cdd6c33b9ae48076999e33ffa70e2365ecc5eb8c.tar.gz
krb5-cdd6c33b9ae48076999e33ffa70e2365ecc5eb8c.tar.bz2
Mac Beta 1 submission
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6749 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/krb5/ccache/stdio')
-rw-r--r--src/lib/krb5/ccache/stdio/ChangeLog5
-rw-r--r--src/lib/krb5/ccache/stdio/scc.h2
-rw-r--r--src/lib/krb5/ccache/stdio/scc_eseq.c2
-rw-r--r--src/lib/krb5/ccache/stdio/scc_maybe.c26
-rw-r--r--src/lib/krb5/ccache/stdio/scc_read.c10
-rw-r--r--src/lib/krb5/ccache/stdio/scc_retrv.c4
-rw-r--r--src/lib/krb5/ccache/stdio/scc_write.c7
7 files changed, 23 insertions, 33 deletions
diff --git a/src/lib/krb5/ccache/stdio/ChangeLog b/src/lib/krb5/ccache/stdio/ChangeLog
index a503fbd..fc85dce 100644
--- a/src/lib/krb5/ccache/stdio/ChangeLog
+++ b/src/lib/krb5/ccache/stdio/ChangeLog
@@ -1,3 +1,8 @@
+Thu Sept 7 12:00:00 EDT 1995 James Mattly (mattly@fusion.com)
+
+ * scc_retrv.c: fixed paramter passing in a call to standard_fields_match.
+ prototypes would have caught this.
+
Thu Sep 7 18:07:56 1995 Mark Eichin <eichin@cygnus.com>
* scc_gennew.c (krb5_scc_generate_new): don't use automatic
diff --git a/src/lib/krb5/ccache/stdio/scc.h b/src/lib/krb5/ccache/stdio/scc.h
index 6212adc..5fed533 100644
--- a/src/lib/krb5/ccache/stdio/scc.h
+++ b/src/lib/krb5/ccache/stdio/scc.h
@@ -46,7 +46,7 @@
* some overriding compatibility reasons not to do so.
*/
-#define KRB5_SCC_FVNO_1 0x0501 /* krb v5, scc v1 */
+#define KRB5_SCC_FVNO_1 0x0501 /* krb v5, scc v1 */
#define KRB5_SCC_FVNO_2 0x0502 /* krb v5, scc v2 */
#define KRB5_SCC_FVNO_3 0x0503 /* krb v5, scc v3 */
#define KRB5_SCC_FVNO_4 0x0504 /* krb v5, scc v4 */
diff --git a/src/lib/krb5/ccache/stdio/scc_eseq.c b/src/lib/krb5/ccache/stdio/scc_eseq.c
index f8cf9c0..6d75950 100644
--- a/src/lib/krb5/ccache/stdio/scc_eseq.c
+++ b/src/lib/krb5/ccache/stdio/scc_eseq.c
@@ -47,7 +47,7 @@ krb5_scc_end_seq_get(context, id, cursor)
krb5_cc_cursor *cursor;
{
int ret = KRB5_OK;
-/* MAYBE_CLOSE (context, id, ret);*/
+/* MAYBE_CLOSE (context, id, ret); */
krb5_xfree((krb5_scc_cursor *) *cursor);
diff --git a/src/lib/krb5/ccache/stdio/scc_maybe.c b/src/lib/krb5/ccache/stdio/scc_maybe.c
index 706b10b..f6e008d 100644
--- a/src/lib/krb5/ccache/stdio/scc_maybe.c
+++ b/src/lib/krb5/ccache/stdio/scc_maybe.c
@@ -164,30 +164,12 @@ krb5_scc_open_file (context, id, mode)
data->version = (fvno_bytes[0] << 8) + fvno_bytes[1];
if ((data->version != KRB5_SCC_FVNO_1) &&
(data->version != KRB5_SCC_FVNO_2) &&
- (data->version != KRB5_SCC_FVNO_3) &&
- (data->version != KRB5_SCC_FVNO_4)) {
+ (data->version != KRB5_SCC_FVNO_3)) {
(void) krb5_unlock_file(context, fileno(f));
(void) fclose(f);
return KRB5_CCACHE_BADVNO;
}
- if (data->version == KRB5_SCC_FVNO_4) {
- char buf[1024];
- int len;
-
- if (!fread((char *)fvno_bytes, sizeof(fvno_bytes), 1, f)) {
- (void) krb5_unlock_file(context, fileno(f));
- (void) fclose(f);
- return KRB5_CCACHE_BADVNO;
- }
- if (len = (fvno_bytes[0] << 8) + fvno_bytes[1]) {
- if (!fread(buf, len, 1, f)) {
- (void) krb5_unlock_file(context, fileno(f));
- (void) fclose(f);
- return KRB5_CCACHE_BADVNO;
- }
- }
- }
- }
- data->file = f;
- return 0;
+ }
+ data->file = f;
+ return 0;
}
diff --git a/src/lib/krb5/ccache/stdio/scc_read.c b/src/lib/krb5/ccache/stdio/scc_read.c
index de29794..88bf620 100644
--- a/src/lib/krb5/ccache/stdio/scc_read.c
+++ b/src/lib/krb5/ccache/stdio/scc_read.c
@@ -197,12 +197,14 @@ krb5_scc_read_keyblock(context, id, keyblock)
keyblock->contents = 0;
kret = krb5_scc_read_ui_2(context, id, &ui2);
- keyblock->enctype = ui2;
+ keyblock->keytype = ui2;
CHECK(kret);
- if (data->version == KRB5_SCC_FVNO_3) {
- /* This works because the old etype is the same as the new enctype. */
+ if ((data->version == KRB5_SCC_FVNO_1) ||
+ (data->version == KRB5_SCC_FVNO_2))
+ keyblock->etype = ETYPE_UNKNOWN;
+ else {
kret = krb5_scc_read_ui_2(context, id, &ui2);
- keyblock->enctype = ui2;
+ keyblock->etype = ui2;
CHECK(kret);
}
diff --git a/src/lib/krb5/ccache/stdio/scc_retrv.c b/src/lib/krb5/ccache/stdio/scc_retrv.c
index 5b20ad5..c196c00 100644
--- a/src/lib/krb5/ccache/stdio/scc_retrv.c
+++ b/src/lib/krb5/ccache/stdio/scc_retrv.c
@@ -175,8 +175,8 @@ krb5_scc_retrieve(context, id, whichfields, mcreds, creds)
while ((kret = krb5_scc_next_cred(context, id, &cursor, &fetchcreds)) == KRB5_OK) {
if (((set(KRB5_TC_MATCH_SRV_NAMEONLY) &&
- srvname_match(mcreds, &fetchcreds)) ||
- standard_fields_match(mcreds, &fetchcreds))
+ srvname_match(context, mcreds, &fetchcreds)) ||
+ standard_fields_match(context, mcreds, &fetchcreds))
&&
(! set(KRB5_TC_MATCH_IS_SKEY) ||
mcreds->is_skey == fetchcreds.is_skey)
diff --git a/src/lib/krb5/ccache/stdio/scc_write.c b/src/lib/krb5/ccache/stdio/scc_write.c
index 3c55200..9226bb1 100644
--- a/src/lib/krb5/ccache/stdio/scc_write.c
+++ b/src/lib/krb5/ccache/stdio/scc_write.c
@@ -148,10 +148,11 @@ krb5_scc_store_keyblock(context, id, keyblock)
krb5_scc_data *data = (krb5_scc_data *)id->data;
krb5_error_code ret;
- ret = krb5_scc_store_ui_2(context, id, keyblock->enctype);
+ ret = krb5_scc_store_ui_2(context, id, keyblock->keytype);
CHECK(ret);
- if (data->version == KRB5_SCC_FVNO_3) {
- ret = krb5_scc_store_ui_2(context, id, keyblock->enctype);
+ if ((data->version != KRB5_SCC_FVNO_1) &&
+ (data->version != KRB5_SCC_FVNO_2)) {
+ ret = krb5_scc_store_ui_2(context, id, keyblock->etype);
CHECK(ret);
}
ret = krb5_scc_store_int32(context, id, keyblock->length);