summaryrefslogtreecommitdiffstats
path: root/crypto/kerberosIV/admin
diff options
context:
space:
mode:
authorassar <assar@FreeBSD.org>2000-12-29 21:00:22 +0000
committerassar <assar@FreeBSD.org>2000-12-29 21:00:22 +0000
commit2aa51584a1bbbfd8d631a114c91b525674ec0175 (patch)
tree3be1655d8572aa7a94f884419466a6be1d5e9e35 /crypto/kerberosIV/admin
parent7e5f2377be4220b42ea18ddd0112a4a64320943a (diff)
downloadFreeBSD-src-2aa51584a1bbbfd8d631a114c91b525674ec0175.zip
FreeBSD-src-2aa51584a1bbbfd8d631a114c91b525674ec0175.tar.gz
import krb4-1.0.5
Diffstat (limited to 'crypto/kerberosIV/admin')
-rw-r--r--crypto/kerberosIV/admin/kdb_util.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/crypto/kerberosIV/admin/kdb_util.c b/crypto/kerberosIV/admin/kdb_util.c
index cff031c..1e3d190 100644
--- a/crypto/kerberosIV/admin/kdb_util.c
+++ b/crypto/kerberosIV/admin/kdb_util.c
@@ -15,7 +15,7 @@
#include "adm_locl.h"
-RCSID("$Id: kdb_util.c,v 1.42 1999/09/16 20:37:21 assar Exp $");
+RCSID("$Id: kdb_util.c,v 1.42.2.1 2000/10/10 12:59:16 assar Exp $");
static des_cblock master_key, new_master_key;
static des_key_schedule master_key_schedule, new_master_key_schedule;
@@ -489,15 +489,19 @@ main(int argc, char **argv)
switch (op) {
case OP_DUMP:
- if ((dump_db (db_name, file, (void (*)(Principal *)) 0) == EOF) ||
- (fclose(file) == EOF))
- err (1, "%s", file_name);
+ if ((dump_db(db_name, file, (void (*)(Principal *)) 0) == EOF)
+ || (fflush(file) != 0)
+ || (fsync(fileno(file)) != 0)
+ || (fclose(file) == EOF))
+ err(1, "%s", file_name);
break;
case OP_SLAVE_DUMP:
- if ((dump_db (db_name, file, (void (*)(Principal *)) 0) == EOF) ||
- (fclose(file) == EOF))
- err (1, "%s", file_name);
- update_ok_file (file_name);
+ if ((dump_db(db_name, file, (void (*)(Principal *)) 0) == EOF)
+ || (fflush(file) != 0)
+ || (fsync(fileno(file)) != 0)
+ || (fclose(file) == EOF))
+ err(1, "%s", file_name);
+ update_ok_file(file_name);
break;
case OP_LOAD:
load_db (db_name, file);
OpenPOWER on IntegriCloud