summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorBarry Jaspan <bjaspan@mit.edu>1990-01-30 18:01:51 +0000
committerBarry Jaspan <bjaspan@mit.edu>1990-01-30 18:01:51 +0000
commit293442f71ceeb1c483f3658e99ee35b3964824b1 (patch)
tree095dcb384f4af906f138dfd63d4d27ce83332a4f /src/lib
parentcf0c1d14cc6a9dd57d47504ea34902d1d1c33d14 (diff)
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
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/krb5/ccache/file/fcc.h11
-rw-r--r--src/lib/krb5/ccache/file/fcc_gennew.c2
-rw-r--r--src/lib/krb5/ccache/file/fcc_nseq.c6
-rw-r--r--src/lib/krb5/ccache/file/fcc_ops.c2
-rw-r--r--src/lib/krb5/ccache/file/fcc_reslv.c2
-rw-r--r--src/lib/krb5/ccache/file/fcc_sflags.c4
6 files changed, 16 insertions, 11 deletions
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 <krb5/krb5.h>
+#include <krb5/krb5_err.h>
#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;
}