From d05a236c1da221eebb692c5705e5dd89a8a22bfa Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Fri, 1 Dec 1995 22:15:32 +0000 Subject: [PATCH] In case of permission problems, don't unlink the old replay cache; make it a hard (repeatable) error. This also reduces the chance we accidentally delete valuable data. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7150 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/rcache/ChangeLog | 7 +++++++ src/lib/krb5/rcache/rc_io.c | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/lib/krb5/rcache/ChangeLog b/src/lib/krb5/rcache/ChangeLog index 0001ac9b9..a4201c083 100644 --- a/src/lib/krb5/rcache/ChangeLog +++ b/src/lib/krb5/rcache/ChangeLog @@ -1,3 +1,10 @@ +Fri Dec 1 17:07:24 1995 Theodore Y. Ts'o + + * rc_io.c (krb5_rc_io_creat): In case of permission problems, + don't unlink the old replay cache; make it a hard + (repeatable) error. This also reduces the chance we + accidentally delete valuable data. + Mon Nov 27 14:52:23 1995 Tom Yu * rc_dfl.c (krb5_rc_dfl_init): default lifespan to diff --git a/src/lib/krb5/rcache/rc_io.c b/src/lib/krb5/rcache/rc_io.c index 96cfe2bb5..fa0bdc0ae 100644 --- a/src/lib/krb5/rcache/rc_io.c +++ b/src/lib/krb5/rcache/rc_io.c @@ -130,7 +130,7 @@ krb5_error_code krb5_rc_io_creat (context, d, fn) case EACCES: case EROFS: case EEXIST: - retval = KRB5_RC_IO_PERM; goto fail; + retval = KRB5_RC_IO_PERM; goto no_unlink; default: retval = KRB5_RC_IO_UNKNOWN; goto fail; @@ -141,6 +141,7 @@ krb5_error_code krb5_rc_io_creat (context, d, fn) { fail: (void) unlink(d->fn); + no_unlink: FREE(d->fn); d->fn = NULL; (void) close(d->fd); -- 2.26.2