From d1e8b30b35eddfcbb4f4e1581b8a7b2cfebc47e5 Mon Sep 17 00:00:00 2001 From: edwin Date: Mon, 19 Oct 2009 21:24:19 +0000 Subject: 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(-) (limited to 'usr.sbin/tzsetup/tzsetup.c') diff --git a/usr.sbin/tzsetup/tzsetup.c b/usr.sbin/tzsetup/tzsetup.c index 66a34c4..e00e3bd 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); } } -- cgit v1.1