summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohn Kohl <jtkohl@mit.edu>1991-02-12 14:08:47 +0000
committerJohn Kohl <jtkohl@mit.edu>1991-02-12 14:08:47 +0000
commit49baa43cc5038b966112c232ef87a89790bab2fb (patch)
tree851d7cc3e9f6f68a5ba130d61e465f8e9ee01220 /src
parentaf4a5d66ba9cb28858c94269acd8708b3732b8e1 (diff)
add defines for vno and open flags
add macros for MAYBE_OPEN/CLOSE git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1672 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r--src/lib/krb5/ccache/file/fcc.h24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/lib/krb5/ccache/file/fcc.h b/src/lib/krb5/ccache/file/fcc.h
index 07ca0a76f..c310b1c93 100644
--- a/src/lib/krb5/ccache/file/fcc.h
+++ b/src/lib/krb5/ccache/file/fcc.h
@@ -3,7 +3,7 @@
* $Author$
* $Id$
*
- * Copyright 1990 by the Massachusetts Institute of Technology.
+ * Copyright 1990,1991 by the Massachusetts Institute of Technology.
*
* For copying and distribution information, please see the file
* <krb5/copyright.h>.
@@ -27,6 +27,11 @@
#define KRB5_FCC_MAXLEN 100
+#define KRB5_FCC_FVNO 0x0501 /* krb v5, fcc v1 */
+#define FCC_OPEN_AND_ERASE 1
+#define FCC_OPEN_RDWR 2
+#define FCC_OPEN_RDONLY 3
+
#ifndef TKT_ROOT
#define TKT_ROOT "/tmp/tkt"
#endif
@@ -45,5 +50,22 @@ typedef struct _krb5_fcc_cursor {
off_t pos;
} krb5_fcc_cursor;
+#define MAYBE_OPEN(ID, MODE) \
+{ \
+ if (OPENCLOSE (ID)) { \
+ krb5_error_code maybe_open_ret = krb5_fcc_open_file (ID,MODE); \
+ if (maybe_open_ret) return maybe_open_ret; } }
+
+#define MAYBE_CLOSE(ID, RET) \
+{ \
+ if (OPENCLOSE (ID)) { \
+ krb5_error_code maybe_close_ret = krb5_fcc_close_file (ID); \
+ if (!(RET)) RET = maybe_close_ret; } }
+
+#define MAYBE_CLOSE_IGNORE(ID) \
+{ \
+ if (OPENCLOSE (ID)) { \
+ (void) krb5_fcc_close_file (ID); } }
+
/* DO NOT ADD ANYTHING AFTER THIS #endif */
#endif /* __KRB5_FILE_CCACHE__ */