Skip to content

Commit

Permalink
Disable sync during kadmin load
Browse files Browse the repository at this point in the history
(cherry picked from commit 7d5f8bb)

Change-Id: I1fb60d697a4f80be1336dd0980f0758eb6436bbb
  • Loading branch information
nicowilliams authored and jaltman committed May 23, 2019
1 parent 27cb774 commit b9b985f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion kadmin/load.c
Expand Up @@ -453,6 +453,7 @@ doit(const char *filename, int mergep)
fclose(f);
return 1;
}
(void) db->hdb_set_sync(context, db, 0);
for (lineno = 1;
(ret2 = my_fgetln(f, &line, &linesz, &linelen)) == 0 && linelen > 0;
++lineno) {
Expand Down Expand Up @@ -608,7 +609,10 @@ doit(const char *filename, int mergep)
}
free(line);
if (ret2)
ret = ret2;
ret = ret2;
ret2 = db->hdb_set_sync(context, db, 1);
if (ret2)
krb5_err(context, 1, ret, "failed to sync the HDB");
(void) kadm5_log_end(kadm_handle);
ret2 = db->hdb_close(context, db);
if (ret2)
Expand Down

0 comments on commit b9b985f

Please sign in to comment.