Skip to content

Conversation

@ttyva
Copy link

@ttyva ttyva commented Jan 13, 2026

If clearing the screen, also try to clear the vt/syscons history.

Being able to scroll up and see the last session's output after clearing is somewhat unexpected to me. This is my suggestion. Tested on vt(4) and Tektronix 4014 via serial.

Thank you!

@github-actions
Copy link

github-actions bot commented Jan 13, 2026

Thank you for taking the time to contribute to FreeBSD!

All issues resolved.

If clearing the screen, also try to clear the vt/syscons history.

Signed-off-by: Ben Wilber <[email protected]>
@concussious
Copy link
Contributor

concussious commented Jan 15, 2026

This would break a lot of workflows. If you want to stop scrollback at the login screen, maybe you could add a security sysctl to optionally disable scrollback from that login screen?

@ttyva
Copy link
Author

ttyva commented Jan 16, 2026

If you say so. This wouldn't impact a default installation. I'm not sure what the purpose of a sysctl would be. If you prefer the history clearing to be configurable separately from clearing the screen, a new gettytab capability seems more appropriate. Is that what you mean?

By the way, the motivation for this is that, besides being good hygiene, clearing the scrollback buffer on logout is required for SOC 2 and probably other certifications, and auditors have said that "trap 'vidcontrol -C' EXIT" or similar are not sufficient because it's not system configuration.

@concussious
Copy link
Contributor

concussious commented Jan 16, 2026

I was thinking a sysctl security.bsd.clear_scrollback_on_logout (or whatever is more appropriate). If the sysctl is set to 1, then it will behave as you are suggesting. It defaults to 0, which means that it will behave the way it's been behaving.

Then, you could create this compliance and hardening without violating POLA (the rule about not changing behavior that's always been that way).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants