summaryrefslogtreecommitdiffstats
path: root/usr.sbin/tzsetup/tzsetup.c
diff options
context:
space:
mode:
authoredwin <edwin@FreeBSD.org>2009-10-19 21:24:19 +0000
committeredwin <edwin@FreeBSD.org>2009-10-19 21:24:19 +0000
commitd1e8b30b35eddfcbb4f4e1581b8a7b2cfebc47e5 (patch)
treee9cf4e1c1182231935e4c7f47aca8cf03aceb2f2 /usr.sbin/tzsetup/tzsetup.c
parent22d120ca093f44f1657f4e3257a82dc3a902e2ad (diff)
downloadFreeBSD-src-d1e8b30b35eddfcbb4f4e1581b8a7b2cfebc47e5.zip
FreeBSD-src-d1e8b30b35eddfcbb4f4e1581b8a7b2cfebc47e5.tar.gz
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
Diffstat (limited to 'usr.sbin/tzsetup/tzsetup.c')
-rw-r--r--usr.sbin/tzsetup/tzsetup.c4
1 files changed, 3 insertions, 1 deletions
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);
}
}
OpenPOWER on IntegriCloud