Bug 691406 - RFE: Clear screen including scroll-back buffer before log-in
Summary: RFE: Clear screen including scroll-back buffer before log-in
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: mingetty
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Petr Pisar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 684261
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-28 13:13 UTC by Petr Pisar
Modified: 2011-06-20 13:10 UTC (History)
1 user (show)

Fixed In Version: mingetty-1.08-8.fc16
Clone Of:
: 714687 (view as bug list)
Environment:
Last Closed: 2011-06-10 12:51:22 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Implementation (893 bytes, patch)
2011-06-10 12:26 UTC, Petr Pisar
no flags Details | Diff

Description Petr Pisar 2011-03-28 13:13:54 UTC
There was a discussion (bug #681600) how to disable access to text printed by previous user on the console to prevent sensitive data leak.

mingetty should instruct Linux virtual terminal to clear screen including scroll-back buffer. Once Linux will implement it (bug #684261), adapt mingetty to perform the safe clear.

Because current behavior is not to clear the screen and there can be demand not to do it always (e.g. to debug broken login shell or to investigate init scripts output on /dev/console), new mingetty positional argument will be added to switch on/off the screen cleaning.

Comment 1 Petr Pisar 2011-06-10 09:38:26 UTC
F16 delivers kernel-3.0* that supports \E[3;J to clear screen including scroll-back buffer.

F16 uses systemd as init that by default reallocate VT before spawning mingetty, thus the scroll-back buffer is always empty.

To test this bug report, one can use following command:

# openvt -f -c 10 -s -w -- /bin/bash \
  -c 'dmesg; exec /sbin/mingetty --loginprog=/bin/false tty10'

This allocates TTY10, switches console there, pollutes buffer with kernel log, and then executes mingetty. Now it's possible to press Shift-PgUp to verify the buffer has gone.

I will add new positional argument to mingetty to enable safe console clearing. The clearing will be done by issuing the the new escape sequence followed by the older 2J variant to clean at least current visible area if mingetty run on system not supporting the new 3J sequence.

Comment 2 Petr Pisar 2011-06-10 11:31:31 UTC
Se there is already --noclear option defaulting to clear. So adding the new sequence seems to be enough.

Comment 3 Petr Pisar 2011-06-10 12:26:42 UTC
Created attachment 504091 [details]
Implementation

Tested with Linux 3.0-0.rc2.git0.1.fc16.x86_64 on VGA console.


Note You need to log in before you can comment on or make changes to this bug.