Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Oct 2009 21:24:19 +0000 (UTC)
From:      Edwin Groothuis <edwin@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r198254 - head/usr.sbin/tzsetup
Message-ID:  <200910192124.n9JLOJaP015697@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: edwin
Date: Mon Oct 19 21:24:19 2009
New Revision: 198254
URL: http://svn.freebsd.org/changeset/base/198254

Log:
  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

Modified:
  head/usr.sbin/tzsetup/tzsetup.c

Modified: head/usr.sbin/tzsetup/tzsetup.c
==============================================================================
--- head/usr.sbin/tzsetup/tzsetup.c	Mon Oct 19 21:10:56 2009	(r198253)
+++ head/usr.sbin/tzsetup/tzsetup.c	Mon Oct 19 21:24:19 2009	(r198254)
@@ -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);
 			}
 		}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910192124.n9JLOJaP015697>