From 39a6d2845230c6ca20e2dc1e6b9af8ba4c2ac048 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Tue, 21 Sep 1999 22:58:07 +0000 Subject: [PATCH] * adb_openclose.c (osa_adb_fini_db): Don't fclose the lock file if the lock is permanent, because it's already been done. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11837 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/kadm5/srv/ChangeLog | 5 +++++ src/lib/kadm5/srv/adb_openclose.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lib/kadm5/srv/ChangeLog b/src/lib/kadm5/srv/ChangeLog index f96abed50..5bbc5dcbf 100644 --- a/src/lib/kadm5/srv/ChangeLog +++ b/src/lib/kadm5/srv/ChangeLog @@ -1,3 +1,8 @@ +1999-09-08 Ken Raeburn + + * adb_openclose.c (osa_adb_fini_db): Don't fclose the lock file if + the lock is permanent, because it's already been done. + Mon Dec 7 15:19:11 1998 Ezra Peisach * svr_principal.c (kadm5_randkey_principal_3): Fix typo in diff --git a/src/lib/kadm5/srv/adb_openclose.c b/src/lib/kadm5/srv/adb_openclose.c index 0f0bec7e5..e776192c2 100644 --- a/src/lib/kadm5/srv/adb_openclose.c +++ b/src/lib/kadm5/srv/adb_openclose.c @@ -232,7 +232,8 @@ osa_adb_ret_t osa_adb_fini_db(osa_adb_db_t db, int magic) * after trashing it. This has to be allowed, so don't * generate an error. */ - (void) fclose(db->lock->lockfile); + if (db->lock->lockmode != OSA_ADB_PERMANENT) + (void) fclose(db->lock->lockfile); db->lock->lockfile = NULL; krb5_free_context(db->lock->context); } -- 2.26.2