From: Theodore Tso Date: Thu, 29 Sep 1994 20:54:22 +0000 (+0000) Subject: Make sure mod time on the dump_ok file is updated. (Some systems X-Git-Tag: krb5-1.0-beta4.3~68 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1555176add8a72f7eb80d33a07b60c288093213e;p=krb5.git 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 --- diff --git a/src/admin/edit/ChangeLog b/src/admin/edit/ChangeLog index a371de063..cd5d61d03 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 5cdf04e5c..afc0a8f0e 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;