From: Barry Jaspan Date: Tue, 30 Jan 1990 18:01:51 +0000 (+0000) Subject: bjaspan: use krb5_err.h, finishing up to go skiing X-Git-Tag: krb5-1.0-alpha2~1174 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=293442f71ceeb1c483f3658e99ee35b3964824b1;p=krb5.git bjaspan: use krb5_err.h, finishing up to go skiing git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@209 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/ccache/file/fcc.h b/src/lib/krb5/ccache/file/fcc.h index cbfb8e77f..f8a2303ea 100644 --- a/src/lib/krb5/ccache/file/fcc.h +++ b/src/lib/krb5/ccache/file/fcc.h @@ -18,14 +18,15 @@ #define __KRB5_FILE_CCACHE__ #include +#include #include "fcc-proto.h" #include "fcc-os.h" -/* XXX Until I find out the right #define for this.. XXX */ -#define KRB5_OK -1000 -#define KRB5_NOMEM -1001 -#define KRB5_NOTFOUND -1002 -#define KRB5_EOF -1003 +/* XXX A hack because I don't feel like updating every file. */ +#define KRB5_OK 0 +#define KRB5_NOMEM ENOMEM +#define KRB5_NOTFOUND KRB5_CC_NOTFOUND +#define KRB5_EOF KRB5_CC_END #define KRB5_FCC_MAXLEN 100 #ifndef TKT_ROOT diff --git a/src/lib/krb5/ccache/file/fcc_gennew.c b/src/lib/krb5/ccache/file/fcc_gennew.c index 2776a7421..ecba20bcd 100644 --- a/src/lib/krb5/ccache/file/fcc_gennew.c +++ b/src/lib/krb5/ccache/file/fcc_gennew.c @@ -65,6 +65,8 @@ krb5_fcc_generate_new (id) return KRB5_NOMEM; } + ((krb5_fcc_data *) lid->data)->flags = 0; + /* Set up the filename */ strcpy(((krb5_fcc_data *) lid->data)->filename, scratch); diff --git a/src/lib/krb5/ccache/file/fcc_nseq.c b/src/lib/krb5/ccache/file/fcc_nseq.c index ef1a7817c..4ed792d4d 100644 --- a/src/lib/krb5/ccache/file/fcc_nseq.c +++ b/src/lib/krb5/ccache/file/fcc_nseq.c @@ -84,9 +84,9 @@ krb5_fcc_next_cred(id, cursor, creds) fcursor->pos = tell(((krb5_fcc_data *) id->data)->fd); cursor = (krb5_cc_cursor *) fcursor; -#ifdef OPENCLOSE - close(((krb5_fcc_data *) id->data)->fd); -#endif + if (OPENCLOSE(id)) + close(((krb5_fcc_data *) id->data)->fd); + lose: return kret; diff --git a/src/lib/krb5/ccache/file/fcc_ops.c b/src/lib/krb5/ccache/file/fcc_ops.c index 71091c323..ac125436b 100644 --- a/src/lib/krb5/ccache/file/fcc_ops.c +++ b/src/lib/krb5/ccache/file/fcc_ops.c @@ -33,7 +33,7 @@ krb5_cc_ops krb5_fcc_ops = { krb5_fcc_next_cred, krb5_fcc_end_seq_get, NULL, /* XXX krb5_fcc_remove, */ - NULL, /* XXX What is the set_flags field? */ + krb5_fcc_set_flags, }; diff --git a/src/lib/krb5/ccache/file/fcc_reslv.c b/src/lib/krb5/ccache/file/fcc_reslv.c index a0f83c676..2aa0a4f38 100644 --- a/src/lib/krb5/ccache/file/fcc_reslv.c +++ b/src/lib/krb5/ccache/file/fcc_reslv.c @@ -68,6 +68,8 @@ krb5_fcc_resolve (id, residual) return KRB5_NOMEM; } + ((krb5_fcc_data *) lid->data)->flags = 0; + /* Set up the filename */ strcpy(((krb5_fcc_data *) lid->data)->filename, residual); diff --git a/src/lib/krb5/ccache/file/fcc_sflags.c b/src/lib/krb5/ccache/file/fcc_sflags.c index aaff8faa6..3fea711c9 100644 --- a/src/lib/krb5/ccache/file/fcc_sflags.c +++ b/src/lib/krb5/ccache/file/fcc_sflags.c @@ -30,12 +30,12 @@ static char fcc_set_flags_c[] = "$Id$"; * Sets the operational flags of id to flags. */ krb5_error_code -krb5_fcc_set_flags(id, flags); +krb5_fcc_set_flags(id, flags) krb5_ccache id; krb5_flags flags; { /* XXX This should check for illegal combinations, if any.. */ - ((krb5_fcc_data *) lid->data)->flags = flags; + ((krb5_fcc_data *) id->data)->flags = flags; return KRB5_OK; }