summaryrefslogtreecommitdiffstats
path: root/src/lib/krb5/ccache/file
diff options
context:
space:
mode:
authorTheodore Tso <tytso@mit.edu>1995-12-21 23:55:22 +0000
committerTheodore Tso <tytso@mit.edu>1995-12-21 23:55:22 +0000
commit1b9bcfd033a1c1e823bbf2b75643f9fffbecf185 (patch)
tree4850d6ccbc26997116764f3b870446db551e97cc /src/lib/krb5/ccache/file
parent022716c37fbb66711570208fe4002d9b9c249e8b (diff)
downloadkrb5-1b9bcfd033a1c1e823bbf2b75643f9fffbecf185.tar.gz
krb5-1b9bcfd033a1c1e823bbf2b75643f9fffbecf185.tar.xz
krb5-1b9bcfd033a1c1e823bbf2b75643f9fffbecf185.zip
Use KRB5_CC_FORMAT as an error code instead of KRB5_CCACHE_BADVNO,
when it's really a format error in the credentials cache file. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7248 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/krb5/ccache/file')
-rw-r--r--src/lib/krb5/ccache/file/ChangeLog3
-rw-r--r--src/lib/krb5/ccache/file/fcc_maybe.c8
2 files changed, 7 insertions, 4 deletions
diff --git a/src/lib/krb5/ccache/file/ChangeLog b/src/lib/krb5/ccache/file/ChangeLog
index 3a2cba8334..9d8e8662dc 100644
--- a/src/lib/krb5/ccache/file/ChangeLog
+++ b/src/lib/krb5/ccache/file/ChangeLog
@@ -4,6 +4,9 @@ Thu Dec 21 18:28:09 1995 Theodore Y. Ts'o <tytso@dcl>
FCC_OPEN_AND_ERASE, unlink the old filename, and then add
the O_EXCL open flag, to prevent O_CREAT from following a
symbolic link.
+ (krb5_fcc_open_file): Use KRB5_CC_FORMAT as an error code
+ instead of KRB5_CCACHE_BADVNO, when it's really a format
+ error in the credentials cache file.
Fri Oct 6 22:03:16 1995 Theodore Y. Ts'o <tytso@dcl>
diff --git a/src/lib/krb5/ccache/file/fcc_maybe.c b/src/lib/krb5/ccache/file/fcc_maybe.c
index 622302a125..2071c681ea 100644
--- a/src/lib/krb5/ccache/file/fcc_maybe.c
+++ b/src/lib/krb5/ccache/file/fcc_maybe.c
@@ -269,7 +269,7 @@ krb5_fcc_open_file (context, id, mode)
sizeof(fcc_fvno)) {
(void) fcc_lock_file(data, fd, UNLOCK_IT);
(void) close(fd);
- return KRB5_CCACHE_BADVNO;
+ return KRB5_CC_FORMAT;
}
if ((fcc_fvno != htons(KRB5_FCC_FVNO_4)) &&
(fcc_fvno != htons(KRB5_FCC_FVNO_3)) &&
@@ -287,14 +287,14 @@ krb5_fcc_open_file (context, id, mode)
!= sizeof(fcc_flen)) {
(void) fcc_lock_file(data, fd, UNLOCK_IT);
(void) close(fd);
- return KRB5_CCACHE_BADVNO;
+ return KRB5_CC_FORMAT;
}
/* Skip past the header info for now */
- if (fcc_flen = htons(fcc_flen)) {
+ if ((fcc_flen = htons(fcc_flen)) != 0) {
if ((krb5_ui_2) read(fd, buf, fcc_flen) != fcc_flen) {
(void) fcc_lock_file(data, fd, UNLOCK_IT);
(void) close(fd);
- return KRB5_CCACHE_BADVNO;
+ return KRB5_CC_FORMAT;
}
}
}