From 08c7e8c8797149bff625621be605863dfedc9af2 Mon Sep 17 00:00:00 2001 From: Edwin Groothuis Date: Mon, 19 Oct 2009 21:24:19 +0000 Subject: [PATCH] When tzsetup is run as non-root and the "CMOS clock question on UTC" is answered as No, it would abort without properly ending the dialog session. MFC after: 1 week --- usr.sbin/tzsetup/tzsetup.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usr.sbin/tzsetup/tzsetup.c b/usr.sbin/tzsetup/tzsetup.c index 66a34c4d2f7b..e00e3bddc432 100644 --- a/usr.sbin/tzsetup/tzsetup.c +++ b/usr.sbin/tzsetup/tzsetup.c @@ -709,9 +709,11 @@ main(int argc, char **argv) fd = open(_PATH_WALL_CMOS_CLOCK, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IRGRP | S_IROTH); - if (fd < 0) + if (fd < 0) { + end_dialog(); err(1, "create %s", _PATH_WALL_CMOS_CLOCK); + } close(fd); } }