Bug 701704 - doesn't clear the screen on logout
doesn't clear the screen on logout
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: systemd (Show other bugs)
15
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Lennart Poettering
Fedora Extras Quality Assurance
RejectedNTH
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-05-03 11:53 EDT by Bill Nottingham
Modified: 2014-03-16 23:27 EDT (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-07-14 08:57:48 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Bill Nottingham 2011-05-03 11:53:03 EDT
Description of problem:

Historically (since the dawn of time, or shortly thereafter) we've cleared the screen before login. This was (more or less) due to the use of mingetty, which did this by default.

With systemd, we've switched to using agetty, which does not do this by default. This is a behavior change, and should at a minimum be documented.

However, it may be simplest to just restore the previous behavior. Options include:

1) patch agetty to clear the screen by default, and support an option to not clear the screen

Pros: clean interface
Cons: requires patching and adding a agetty option

2) patch getty@.service to call agetty like so:

ExecStart=-/sbin/agetty %I -I '\033[2J\033[f' 38400

Pros: works now
Cons: that's gross

3) patch /etc/skel to drop a .bash_logout with 'clear' in it everywhere

Pros: simple
Cons: doesn't catch existing users, or users of other shells

4) ... ?

Version-Release number of selected component (if applicable):

systemd-25-1.fc15.x86_64
util-linux-2.19-4.fc15.x86_64

How reproducible:

100%

Steps to Reproduce:
1. Logout
  
Actual results:

New getty appears below

Expected results:

New getty appears on cleared screen
Comment 1 James Laska 2011-05-03 11:59:41 EDT
At the suggestion from notting, I tested option#2 and option#3, both obviously worked.

This feels like it has security implications since a user can view another users session output.  I'm not aware of any 15 Final release criteria this would impact, but it seems like something we'd really want to resolve.  Perhaps NTH might be a better fit.  Either way, I think this should land in F15.
Comment 2 James Laska 2011-05-03 12:08:49 EDT
(In reply to comment #1)
> At the suggestion from notting, I tested option#2 and option#3, both obviously
> worked.
> 
> This feels like it has security implications since a user can view another
> users session output.  I'm not aware of any 15 Final release criteria this
> would impact, but it seems like something we'd really want to resolve.  Perhaps
> NTH might be a better fit.  Either way, I think this should land in F15.

After some discussion w/ notting, I'm moving this to a proposed nice-to-have (NTH) fix for F15.  We've confirmed that neither mingetty nor agetty inhibit the virtual console's native scrollback ability.  So, prior to Fedora 15, assuming the clearback buffer wasn't purged, a user could <Shift>PgUp and scroll to view a previous logged in user's session info.  This doesn't appear to be a change in behavior.

However, having the session data still present on the screen seems like something people will notice, and seems worth discussing if a simple fix is available.
Comment 3 Karel Zak 2011-05-04 02:59:20 EDT
The util-linux upstream goal is to merge mingetty features into agetty. My guess is that the new features will be available in Fedora-16.

http://thread.gmane.org/gmane.linux.utilities.util-linux-ng/3929/focus=4015
Comment 4 Bill Nottingham 2011-05-04 14:17:40 EDT
Should we move this to util-linux, then, and document it (and potential workaround #2) in the release notes?
Comment 5 James Laska 2011-05-04 15:33:52 EDT
(In reply to comment #4)
> Should we move this to util-linux, then, and document it (and potential
> workaround #2) in the release notes?

Definitely seems worthy of some documentation for F15.  Since the mingetty -> agetty change is intentional, I agree that release notes is a good fit.
Comment 6 Tim Flink 2011-05-06 16:08:19 EDT
Discussed in the 2011-05-06 blocker review meeting. Rejected as NTH because it appears as if all parties agree that a fix in the F15 isn't practical but the change needs to be documented.

If a tested fix becomes available, it can be re-proposed as NTH.
Comment 7 Lennart Poettering 2011-05-11 10:45:34 EDT
So, I think this is actually fixable properly. We probably could teach systemd to deallocate a VT before invoking getty on it. The deallocation step should release the scrollback buffer completely (at least I hope, haven't tried it, but I'd bet on it).

We wanted to add support for vhangup() on the ttys anyway, in order to ensure that the processes we start are guaranteed to be the only ones accessing it. Adding an option to flush the VT scrollback buffer should be relatively easy and could be exposed via the same (or similar) configuration options.

So I am all for fixing this in systemd, rather then agetty, since whatever process we start we probably want to offer the same vhangup/screen clear options.
Comment 8 Lennart Poettering 2011-05-25 15:12:20 EDT
This is not fixed properly in systemd git. With a suitably new kernel we will now issue an escape sequence that clears the scrollback buffer when getty is run.
Comment 9 Bill Nottingham 2011-05-25 15:34:44 EDT
s/not/now/, obviously.

http://cgit.freedesktop.org/systemd/commit/?id=b83bc4e9cce2ba46371e75fe0f83af32060f0ae3
Comment 10 Lennart Poettering 2011-07-14 08:57:48 EDT
This is now in Rawhide.

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