summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib/krb5/ccache/file/ChangeLog6
-rw-r--r--src/lib/krb5/ccache/file/fcc_destry.c10
2 files changed, 11 insertions, 5 deletions
diff --git a/src/lib/krb5/ccache/file/ChangeLog b/src/lib/krb5/ccache/file/ChangeLog
index af8e13c20c..08f7b28d34 100644
--- a/src/lib/krb5/ccache/file/ChangeLog
+++ b/src/lib/krb5/ccache/file/ChangeLog
@@ -1,3 +1,9 @@
+Sat Feb 24 19:16:23 1996 Theodore Y. Ts'o <tytso@dcl>
+
+ * fcc_destry.c (krb5_fcc_destroy): For MS-DOS filesystems, you
+ must close the file before unlinking it, otherwise the
+ unlink() will fail.
+
Thu Feb 15 14:55:56 1996 Ezra Peisach <epeisach@kangaroo.mit.edu>
* fcc_skip.c (krb5_fcc_skip_header): If version is not FVNO_4, do not
diff --git a/src/lib/krb5/ccache/file/fcc_destry.c b/src/lib/krb5/ccache/file/fcc_destry.c
index f160c6811a..02deb7293b 100644
--- a/src/lib/krb5/ccache/file/fcc_destry.c
+++ b/src/lib/krb5/ccache/file/fcc_destry.c
@@ -84,14 +84,14 @@ krb5_fcc_destroy(context, id)
size -= i; /* We've read this much */
}
+ if (OPENCLOSE(id)) {
+ (void) close(((krb5_fcc_data *)id->data)->fd);
+ ((krb5_fcc_data *) id->data)->fd = -1;
+ }
+
ret = unlink(((krb5_fcc_data *) id->data)->filename);
if (ret < 0) {
kret = krb5_fcc_interpret(context, errno);
- if (OPENCLOSE(id)) {
- (void) close(((krb5_fcc_data *)id->data)->fd);
- ((krb5_fcc_data *) id->data)->fd = -1;
- kret = ret;
- }
goto cleanup;
}