(doit): truncate the log since there's no way of knowing what changes

are going to be added


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8806 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
2000-07-24 04:33:55 +00:00
parent ed3264222f
commit f6ec8279ca

View File

@@ -324,6 +324,13 @@ doit(const char *filename, int merge)
krb5_warn(context, errno, "fopen(%s)", filename);
return 1;
}
ret = kadm5_log_truncate (kadm_handle);
if (ret) {
fclose (f);
krb5_warn(context, ret, "kadm5_log_truncate");
return 1;
}
if(!merge)
flags |= O_CREAT | O_TRUNC;
ret = db->open(context, db, flags, 0600);