From 75399b34c39e37448d422aa97f470bf3f8c67b67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Mon, 3 Dec 2007 22:36:59 +0000 Subject: [PATCH] (fcc_move): make sure ->version is uptodate. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22120 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/krb5/fcache.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/krb5/fcache.c b/lib/krb5/fcache.c index 6e59fcb24..25b5a9f18 100644 --- a/lib/krb5/fcache.c +++ b/lib/krb5/fcache.c @@ -776,7 +776,18 @@ fcc_move(krb5_context context, krb5_ccache from, krb5_ccache to) ret = errno; krb5_set_error_string(context, "Rename of file failed: %s", strerror(ret)); + return ret; } + /* make sure ->version is uptodate */ + { + krb5_storage *sp; + int fd; + ret = init_fcc (context, to, &sp, &fd); + krb5_storage_free(sp); + fcc_unlock(context, fd); + close(fd); + } + return ret; }