(krb5_db2_db_init): When creating a temporary database, use the suffix
authorKen Raeburn <raeburn@mit.edu>
Thu, 12 Oct 2006 03:50:15 +0000 (03:50 +0000)
committerKen Raeburn <raeburn@mit.edu>
Thu, 12 Oct 2006 03:50:15 +0000 (03:50 +0000)
"~.kadm5" for the policy database filename.

ticket: 4354
version_reported: 1.5
tags: pullup

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18692 dc483132-0cff-0310-8789-dd5450dbe970

src/plugins/kdb/db2/kdb_db2.c

index 4cf137ad472fa8ed68323161760337002bd42ebc..9a0254dd3d57984a5638dd1668f8f8fe9ddc6506 100644 (file)
@@ -337,7 +337,8 @@ krb5_db2_db_init(krb5_context context)
     if ((retval = krb5_db2_db_get_age(context, NULL, &db_ctx->db_lf_time)))
        goto err_out;
 
-    sprintf(policy_db_name, "%s.kadm5", db_ctx->db_name);
+    sprintf(policy_db_name, db_ctx->tempdb ? "%s~.kadm5" : "%s.kadm5",
+           db_ctx->db_name);
     sprintf(policy_lock_name, "%s.lock", policy_db_name);
 
     if ((retval = osa_adb_init_db(&db_ctx->policy_db, policy_db_name,