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
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.
* 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 */
#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
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;
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;
#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>
/* 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;