Write log entry after store is successful.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20607 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -127,13 +127,15 @@ kadm5_s_create_principal_with_key(void *server_handle,
|
|||||||
if (ret)
|
if (ret)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
kadm5_log_create (context, &ent.entry);
|
|
||||||
|
|
||||||
ret = context->db->hdb_open(context->context, context->db, O_RDWR, 0);
|
ret = context->db->hdb_open(context->context, context->db, O_RDWR, 0);
|
||||||
if(ret)
|
if(ret)
|
||||||
goto out;
|
goto out;
|
||||||
ret = context->db->hdb_store(context->context, context->db, 0, &ent);
|
ret = context->db->hdb_store(context->context, context->db, 0, &ent);
|
||||||
context->db->hdb_close(context->context, context->db);
|
context->db->hdb_close(context->context, context->db);
|
||||||
|
if (ret)
|
||||||
|
goto out;
|
||||||
|
kadm5_log_create (context, &ent.entry);
|
||||||
|
|
||||||
out:
|
out:
|
||||||
hdb_free_entry(context->context, &ent);
|
hdb_free_entry(context->context, &ent);
|
||||||
return _kadm5_error_code(ret);
|
return _kadm5_error_code(ret);
|
||||||
@@ -174,13 +176,16 @@ kadm5_s_create_principal(void *server_handle,
|
|||||||
if (ret)
|
if (ret)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
kadm5_log_create (context, &ent.entry);
|
|
||||||
|
|
||||||
ret = context->db->hdb_open(context->context, context->db, O_RDWR, 0);
|
ret = context->db->hdb_open(context->context, context->db, O_RDWR, 0);
|
||||||
if(ret)
|
if(ret)
|
||||||
goto out;
|
goto out;
|
||||||
ret = context->db->hdb_store(context->context, context->db, 0, &ent);
|
ret = context->db->hdb_store(context->context, context->db, 0, &ent);
|
||||||
context->db->hdb_close(context->context, context->db);
|
context->db->hdb_close(context->context, context->db);
|
||||||
|
if (ret)
|
||||||
|
goto out;
|
||||||
|
|
||||||
|
kadm5_log_create (context, &ent.entry);
|
||||||
|
|
||||||
out:
|
out:
|
||||||
hdb_free_entry(context->context, &ent);
|
hdb_free_entry(context->context, &ent);
|
||||||
return _kadm5_error_code(ret);
|
return _kadm5_error_code(ret);
|
||||||
|
Reference in New Issue
Block a user