summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ac
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1997-10-09 15:07:17 +0000
committerderaadt <deraadt@openbsd.org>1997-10-09 15:07:17 +0000
commitf470cc8ca608a2c689d9a472317630e457294137 (patch)
tree1ad4a53c69389e045c08eccc15bf4b4703a5e7e7 /usr.sbin/ac
parentsync (diff)
downloadwireguard-openbsd-f470cc8ca608a2c689d9a472317630e457294137.tar.xz
wireguard-openbsd-f470cc8ca608a2c689d9a472317630e457294137.zip
if user specified wtmp file, use timestamp on final record instead of
current system time for "end of run" time; tim@pool1.convey.ru
Diffstat (limited to 'usr.sbin/ac')
-rw-r--r--usr.sbin/ac/ac.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/ac/ac.c b/usr.sbin/ac/ac.c
index 82fc8e4a6e8..1a57109acbb 100644
--- a/usr.sbin/ac/ac.c
+++ b/usr.sbin/ac/ac.c
@@ -14,7 +14,7 @@
*/
#ifndef lint
-static char rcsid[] = "$Id: ac.c,v 1.6 1997/08/30 19:54:45 deraadt Exp $";
+static char rcsid[] = "$Id: ac.c,v 1.7 1997/10/09 15:07:17 deraadt Exp $";
#endif
#include <sys/types.h>
@@ -513,7 +513,8 @@ ac(fp)
}
}
(void)fclose(fp);
- usr.ut_time = time((time_t *)0);
+ if (!(Flags & AC_W))
+ usr.ut_time = time((time_t *)0);
(void)strcpy(usr.ut_line, "~");
if (Flags & AC_D) {