Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 487076 Details for
Bug 684261
RFE: command to clear scrollback buffer in linux terminal
Home
New
Search
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh92 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
[?]
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Proposed fix
0001-Clean-console-safely.patch (text/plain), 1.31 KB, created by
Petr Pisar
on 2011-03-23 15:47:52 UTC
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Petr Pisar
Created:
2011-03-23 15:47:52 UTC
Size:
1.31 KB
patch
obsolete
>From 9d0c14a8b5fa0dc965e8d88b84ad42c87f25dd8a Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com> >Date: Wed, 23 Mar 2011 16:36:32 +0100 >Subject: [PATCH] Clean console safely > >Traditional \E[2J sequence erases console display but scroll-back >buffer and underlying device (frame) buffer keeps data that can be >accessed by scrolling console back. > >This patch introduce new \E[J parameter 3 that allows to scramble >scroll-back buffer explicitly. Session locking programs (screen, >vlock) can use it to prevent attacker to browse locked console >history. >--- > drivers/tty/vt/vt.c | 6 ++++++ > 1 files changed, 6 insertions(+), 0 deletions(-) > >diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c >index 147ede3..c31bf2a 100644 >--- a/drivers/tty/vt/vt.c >+++ b/drivers/tty/vt/vt.c >@@ -1198,6 +1198,12 @@ static void csi_J(struct vc_data *vc, int vpar) > vc->vc_x + 1); > } > break; >+ case 3: /* erase scroll-back buffer (and whole display) */ >+ scr_memsetw(vc->vc_screenbuf, vc->vc_video_erase_char, >+ vc->vc_screenbuf_size >> 1); >+ set_origin(vc); >+ if (CON_IS_VISIBLE(vc)) >+ update_screen(vc); > case 2: /* erase whole display */ > count = vc->vc_cols * vc->vc_rows; > start = (unsigned short *)vc->vc_origin; >-- >1.7.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 684261
: 487076