summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohn Kohl <jtkohl@mit.edu>1990-07-03 15:38:19 +0000
committerJohn Kohl <jtkohl@mit.edu>1990-07-03 15:38:19 +0000
commit51cdfb7a34d76666e25fb10ba074c4af7748e0e2 (patch)
tree64f1ce5cf2d1ac9888399e444b521c023424521d /src
parent49ff831308a950a833582dc8ce3775127d51d047 (diff)
*** empty log message ***
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1032 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r--src/lib/krb5/ccache/file/fcc_errs.c63
1 files changed, 63 insertions, 0 deletions
diff --git a/src/lib/krb5/ccache/file/fcc_errs.c b/src/lib/krb5/ccache/file/fcc_errs.c
new file mode 100644
index 000000000..6f50ec0f0
--- /dev/null
+++ b/src/lib/krb5/ccache/file/fcc_errs.c
@@ -0,0 +1,63 @@
+/*
+ * $Source$
+ * $Author$
+ *
+ * Copyright 1990 by the Massachusetts Institute of Technology.
+ *
+ * For copying and distribution information, please see the file
+ * <krb5/copyright.h>.
+ *
+ * error code interpretation routine
+ */
+
+#if !defined(lint) && !defined(SABER)
+static char rcsid_fcc_errs_c [] =
+"$Id$";
+#endif /* !lint & !SABER */
+
+#include <krb5/copyright.h>
+
+#include "fcc.h"
+
+krb5_error_code
+krb5_fcc_interpret(errnum)
+int errnum;
+{
+ register int retval;
+ switch (errnum) {
+ case ENOENT:
+ retval = KRB5_FCC_NOFILE;
+ break;
+ case EPERM:
+ case EACCES:
+ case EISDIR:
+ case ENOTDIR:
+ case ELOOP: /* XXX */
+ case ETXTBSY:
+ case EBUSY:
+ case EROFS:
+ retval = KRB5_FCC_PERM;
+ break;
+ case EINVAL:
+ case EEXIST: /* XXX */
+ case EFAULT:
+ case EBADF:
+ case ENAMETOOLONG:
+#ifdef EWOULDBLOCK
+ case EWOULDBLOCK:
+#endif
+ retval = KRB5_FCC_INTERNAL;
+ break;
+#ifdef EDQUOT
+ case EDQUOT:
+#endif
+ case ENOSPC:
+ case EIO:
+ case ENFILE:
+ case EMFILE:
+ case ENXIO:
+ default:
+ retval = KRB5_CC_IO; /* XXX */
+ }
+ return retval;
+}