If timed is running when system clock is changed by date command,
improper wtmp entry is made.  According to wtmp(5), two entries, one
with "|" as ut_line field and one with "{" for ut_line, should be
recorded, but, one with "|" and one with "}" are made.

Closes: PR#bin/1182

Submitted by:	 Masafumi NAKANE <masafumi@tky007.tth.expo96.ad.jp>
This commit is contained in:
Marc G. Fournier 1996-10-22 05:13:42 +00:00
parent ebcf24fb2b
commit 8c78c8f41c
2 changed files with 4 additions and 4 deletions

View File

@ -36,7 +36,7 @@ static char sccsid[] = "@(#)master.c 8.1 (Berkeley) 6/6/93";
#endif /* not lint */
#ifdef sgi
#ident "$Revision: 1.21 $"
#ident "$Revision: 1.1.1.1 $"
#endif
#include "globals.h"
@ -390,7 +390,7 @@ mchgdate(msg)
#else
logwtmp("|", "date", "");
(void)settimeofday(&msg->tsp_time, 0);
logwtmp("}", "date", "");
logwtmp("{", "date", "");
#endif /* sgi */
spreadtime();
}

View File

@ -36,7 +36,7 @@ static char sccsid[] = "@(#)slave.c 8.1 (Berkeley) 6/6/93";
#endif /* not lint */
#ifdef sgi
#ident "$Revision: 1.20 $"
#ident "$Revision: 1.1.1.1 $"
#endif
#include "globals.h"
@ -294,7 +294,7 @@ loop:
#else
logwtmp("|", "date", "");
(void)settimeofday(&msg->tsp_time, 0);
logwtmp("}", "date", "");
logwtmp("{", "date", "");
#endif /* sgi */
syslog(LOG_NOTICE,
"date changed by %s from %s",