[krbdev.mit.edu #6815] Failed kdb5_util load removes real database
Greg Hudson via RT
rt-comment at krbdev.mit.edu
Fri Nov 5 20:28:24 EDT 2010
Index: src/plugins/kdb/db2/kdb_db2.c
===================================================================
--- src/plugins/kdb/db2/kdb_db2.c (revision 24510)
+++ src/plugins/kdb/db2/kdb_db2.c (working copy)
@@ -1206,6 +1206,7 @@
{
krb5_error_code status = 0;
krb5_db2_context *db_ctx;
+ char *db_name;
if (k5db2_inited(context)) {
status = krb5_db2_fini(context);
@@ -1223,7 +1224,12 @@
return status;
db_ctx = context->dal_handle->db_context;
- return destroy_db(context, db_ctx->db_name);
+ db_name = gen_dbsuffix(db_ctx->db_name, db_ctx->tempdb ? "~" : "");
+ if (db_name == NULL)
+ return ENOMEM;
+ status = destroy_db(context, db_name);
+ free(db_name);
+ return status;
}
void *
More information about the krb5-bugs
mailing list