+++ This bug was initially created as a clone of Bug #684261 +++
Description of problem:
In some situations it would be good to clear the terminal's scrollback buffer, for example on new login or when the terminal is locked so someone else won't be able to see the previous content with shift-pgup. (bug #683733)
There are hacks can be used to force clearing the buffer, like switching to another console and back, or changing the size of the terminal, but all seem to have some drawbacks.
This is a request to add a new command like \E[3J which would reset the scrollback buffer and which could be added to the linux terminfo entry, either to the clear sequence or as a new string capability.
--- Additional comment from ppisar on 2011-03-23 15:47:52 GMT ---
Created attachment 487076[details]
Proposed fix
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.
Tested on VGA and FB_VGA16 console in qemu.
--- Additional comment from davej on 2011-03-24 03:38:16 GMT ---
post it to linux-kernel.org
We'll pick it up when we rebase if it gets merged.
--- Additional comment from ppisar on 2011-05-24 06:57:58 GMT ---
Merged to Linus' linux-2.6:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f8df13e0a901fe55631fed66562369b4dba40f8b
----
This is in Fedora Rahwide now and it will be part of Linux-3.0. Based on discussion with Steve Grubb, I propose this feature for RHEL-6.2 as an alternative to disabled scroll-back buffer. Depending utilization by user space (mingetty and screen) will be request too.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
http://rhn.redhat.com/errata/RHSA-2011-1530.html