* adb_openclose.c (osa_adb_fini_db): Don't fclose the lock file if
authorKen Raeburn <raeburn@mit.edu>
Tue, 21 Sep 1999 22:58:07 +0000 (22:58 +0000)
committerKen Raeburn <raeburn@mit.edu>
Tue, 21 Sep 1999 22:58:07 +0000 (22:58 +0000)
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
src/lib/kadm5/srv/adb_openclose.c

index f96abed5015af74e7a8b7987522ac7aa37435ace..5bbc5dcbf07ecd41848297cdde5ae3c3460f9123 100644 (file)
@@ -1,3 +1,8 @@
+1999-09-08  Ken Raeburn  <raeburn@mit.edu>
+
+       * 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  <epeisach@mit.edu>
 
        * svr_principal.c (kadm5_randkey_principal_3): Fix typo in
index 0f0bec7e5e60e5890aee713e6a99af338afc82a8..e776192c2eaff490c67140353747ed4653b77ae2 100644 (file)
@@ -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);
      }