lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <46110F88.5040905@gmail.com>
Date:	Mon, 02 Apr 2007 22:13:28 +0800
From:	"Antonino A. Daplas" <adaplas@...il.com>
To:	Andrew Morton <akpm@...l.org>
CC:	Linux Kernel Development <linux-kernel@...r.kernel.org>,
	Jan Engelhardt <jengelh@...ux01.gwdg.de>,
	Paul LeoNerd Evans <leonerd@...nerd.org.uk>
Subject: [PATCH] vt: Do not clear UTF when resetting console

Resetting the console, either by ANSI escape sequences or by the reset utility,
will drop the console back to legacy (non-UTF-8) mode. Fix this by leaving the
field vc_data.vc_utf untouched in reset_terminal(). In addition, a global
variable (default_utf8) which defines system-wide UTF-8 setting is created.
This variable can be adjusted via sysfs.

This is based from patches by Jan Engelhardt and Paul LeoNerd Evans.

Signed-off-by: Antonino Daplas <adaplas@...il.com>
---

 drivers/char/vt.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/char/vt.c b/drivers/char/vt.c
index 1bbb45b..fdd548f 100644
--- a/drivers/char/vt.c
+++ b/drivers/char/vt.c
@@ -157,6 +157,8 @@ static void blank_screen_t(unsigned long
 static void set_palette(struct vc_data *vc);
 
 static int printable;		/* Is console ready for printing? */
+static int default_utf8;
+module_param(default_utf8, int, S_IRUGO | S_IWUSR);
 
 /*
  * ignore_poke: don't unblank the screen when things are typed.  This is
@@ -1497,7 +1499,6 @@ static void reset_terminal(struct vc_dat
 	vc->vc_charset		= 0;
 	vc->vc_need_wrap	= 0;
 	vc->vc_report_mouse	= 0;
-	vc->vc_utf		= 0;
 	vc->vc_utf_count	= 0;
 
 	vc->vc_disp_ctrl	= 0;
@@ -2590,6 +2591,7 @@ static void vc_init(struct vc_data *vc, 
 	vc->vc_rows = rows;
 	vc->vc_size_row = cols << 1;
 	vc->vc_screenbuf_size = vc->vc_rows * vc->vc_size_row;
+	vc->vc_utf = default_utf8;
 
 	set_origin(vc);
 	vc->vc_pos = vc->vc_origin;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ