summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTheodore Tso <tytso@mit.edu>1996-01-11 04:05:22 +0000
committerTheodore Tso <tytso@mit.edu>1996-01-11 04:05:22 +0000
commitef24891c5c9dd2d7a1b3a828fcc3cf34fd5b8f0d (patch)
treeb7da7ed4fb0b979c2caecc87fc25020742b9d495
parentb510380e3424065552eb7af9bf3ca3a28f93a1ca (diff)
downloadkrb5-ef24891c5c9dd2d7a1b3a828fcc3cf34fd5b8f0d.tar.gz
krb5-ef24891c5c9dd2d7a1b3a828fcc3cf34fd5b8f0d.tar.xz
krb5-ef24891c5c9dd2d7a1b3a828fcc3cf34fd5b8f0d.zip
fcc.h (KRB5_FCC_DEFAULT_VNO): Remove KRB5_FCC_DEFAULT_VNO; now set in
init_ctx.c. fcc_maybe.c (krb5_fcc_open_file): fcc_gennew.c (krb5_fcc_generate_new): Use context->fcc_default_format to determine the credentials cache type. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7301 dc483132-0cff-0310-8789-dd5450dbe970
-rw-r--r--src/lib/krb5/ccache/file/ChangeLog8
-rw-r--r--src/lib/krb5/ccache/file/fcc.h8
-rw-r--r--src/lib/krb5/ccache/file/fcc_gennew.c4
-rw-r--r--src/lib/krb5/ccache/file/fcc_maybe.c6
4 files changed, 15 insertions, 11 deletions
diff --git a/src/lib/krb5/ccache/file/ChangeLog b/src/lib/krb5/ccache/file/ChangeLog
index 43b2976dfd..d9634a7116 100644
--- a/src/lib/krb5/ccache/file/ChangeLog
+++ b/src/lib/krb5/ccache/file/ChangeLog
@@ -1,5 +1,13 @@
Wed Jan 10 21:14:31 1996 Theodore Y. Ts'o <tytso@dcl>
+ * fcc.h (KRB5_FCC_DEFAULT_VNO): Remove KRB5_FCC_DEFAULT_VNO; now
+ set in init_ctx.c.
+
+ * fcc_maybe.c (krb5_fcc_open_file):
+ * fcc_gennew.c (krb5_fcc_generate_new): Use
+ context->fcc_default_format to determine the credentials
+ cache type.
+
* fcc_read.c (krb5_fcc_read_keyblock): If reading in a version 3
credentials cache, ignore the second enctype stored in the
ccache; just read it into a dummy variable.
diff --git a/src/lib/krb5/ccache/file/fcc.h b/src/lib/krb5/ccache/file/fcc.h
index 0e26fa7f69..bd3f8c368e 100644
--- a/src/lib/krb5/ccache/file/fcc.h
+++ b/src/lib/krb5/ccache/file/fcc.h
@@ -47,9 +47,9 @@
* The code will accept version 1, 2, and 3 ccaches, and depending
* what KRB5_FCC_DEFAULT_FVNO is set to, it will create version 1, 2,
* or 3 FCC caches.
- *
- * KRB5_FCC_DEFAULT_FVNO should be set to version 3, unless there is
- * some overriding compatibility reasons not to do so.
+ *
+ * The default credentials cache should be type 3 for now (see
+ * init_ctx.c).
*/
#define KRB5_FCC_FVNO_1 0x0501 /* krb5 v5, fcc v1 */
@@ -57,8 +57,6 @@
#define KRB5_FCC_FVNO_3 0x0503 /* krb5 v5, fcc v3 */
#define KRB5_FCC_FVNO_4 0x0504 /* krb5 v5, fcc v4 */
-#define KRB5_FCC_DEFAULT_FVNO KRB5_FCC_FVNO_3
-
#define FCC_OPEN_AND_ERASE 1
#define FCC_OPEN_RDWR 2
#define FCC_OPEN_RDONLY 3
diff --git a/src/lib/krb5/ccache/file/fcc_gennew.c b/src/lib/krb5/ccache/file/fcc_gennew.c
index 93d963b150..177e0e9608 100644
--- a/src/lib/krb5/ccache/file/fcc_gennew.c
+++ b/src/lib/krb5/ccache/file/fcc_gennew.c
@@ -106,7 +106,7 @@ krb5_fcc_generate_new (context, id)
retcode = krb5_fcc_interpret(context, errno);
goto err_out;
} else {
- krb5_int16 fcc_fvno = htons(KRB5_FCC_DEFAULT_FVNO);
+ krb5_int16 fcc_fvno = htons(context->fcc_default_format);
krb5_int16 fcc_flen = 0;
int errsave, cnt;
@@ -127,7 +127,7 @@ krb5_fcc_generate_new (context, id)
goto err_out;
}
/* For version 4 we save a length for the rest of the header */
- if (KRB5_FCC_DEFAULT_FVNO == KRB5_FCC_FVNO_4) {
+ if (context->fcc_default_format == KRB5_FCC_FVNO_4) {
if ((cnt = write(ret, (char *)&fcc_flen, sizeof(fcc_flen)))
!= sizeof(fcc_flen)) {
errsave = errno;
diff --git a/src/lib/krb5/ccache/file/fcc_maybe.c b/src/lib/krb5/ccache/file/fcc_maybe.c
index 2071c681ea..2b4961e95c 100644
--- a/src/lib/krb5/ccache/file/fcc_maybe.c
+++ b/src/lib/krb5/ccache/file/fcc_maybe.c
@@ -34,8 +34,6 @@
#include "fcc.h"
-int krb5_fcc_default_format = KRB5_FCC_DEFAULT_FVNO;
-
#ifdef KRB5_USE_INET
#if !defined(_WINSOCKAPI_) && !defined(HAVE_MACSOCK_H)
#include <netinet/in.h>
@@ -254,8 +252,8 @@ krb5_fcc_open_file (context, id, mode)
/* write the version number */
int errsave, cnt;
- fcc_fvno = htons(krb5_fcc_default_format);
- data->version = krb5_fcc_default_format;
+ fcc_fvno = htons(context->fcc_default_format);
+ data->version = context->fcc_default_format;
if ((cnt = write(fd, (char *)&fcc_fvno, sizeof(fcc_fvno))) !=
sizeof(fcc_fvno)) {
errsave = errno;