summaryrefslogtreecommitdiffstats
path: root/src/admin
diff options
context:
space:
mode:
authorTheodore Tso <tytso@mit.edu>1994-09-29 20:54:22 +0000
committerTheodore Tso <tytso@mit.edu>1994-09-29 20:54:22 +0000
commit1555176add8a72f7eb80d33a07b60c288093213e (patch)
tree732d67c5b2a65194ea1efa765bab14c4db520d5c /src/admin
parent348744ed602b849db90e4d87571c6f3fe2b25552 (diff)
downloadkrb5-1555176add8a72f7eb80d33a07b60c288093213e.tar.gz
krb5-1555176add8a72f7eb80d33a07b60c288093213e.tar.xz
krb5-1555176add8a72f7eb80d33a07b60c288093213e.zip
Make sure mod time on the dump_ok file is updated. (Some systems
don't update the mod-time when a file is opened for writing.) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4384 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/admin')
-rw-r--r--src/admin/edit/ChangeLog4
-rw-r--r--src/admin/edit/dump.c8
2 files changed, 12 insertions, 0 deletions
diff --git a/src/admin/edit/ChangeLog b/src/admin/edit/ChangeLog
index a371de063b..cd5d61d033 100644
--- a/src/admin/edit/ChangeLog
+++ b/src/admin/edit/ChangeLog
@@ -1,5 +1,9 @@
Thu Sep 29 15:52:22 1994 Theodore Y. Ts'o (tytso@dcl)
+ * dump.c (update_ok_file): Make sure mod time on the dump_ok file
+ is updated. (Some systems don't update the mod-time when
+ a file is opened for writing.)
+
* Makefile.in: Relink executable when libraries change.
* kdb5_edit.c (show_principal): Pass variable with correct type to
diff --git a/src/admin/edit/dump.c b/src/admin/edit/dump.c
index 5cdf04e5c4..afc0a8f0e7 100644
--- a/src/admin/edit/dump.c
+++ b/src/admin/edit/dump.c
@@ -182,6 +182,14 @@ void update_ok_file (file_name)
free(file_ok);
return;
}
+ if (write(fd, "", 1) != 1) {
+ com_err(progname, errno, "while writing to 'ok' file, '%s'",
+ file_ok);
+ exit_status++;
+ free(file_ok);
+ return;
+ }
+
free(file_ok);
close(fd);
return;