]> git.baikalelectronics.ru Git - kernel.git/commit
tty: wipe buffer if not echoing data
authorGreg KH <greg@kroah.com>
Thu, 4 Oct 2018 18:06:14 +0000 (11:06 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 Oct 2018 17:50:00 +0000 (19:50 +0200)
commit7b68a93bd9d2826743e7a2f16bdfaeba13b1b426
tree79b21a2681fb9fee48b022d6072aa6500cf3de7d
parent7ceca1d515f4c3e3783e7c65a4135b7b0ab7e337
tty: wipe buffer if not echoing data

If we are not echoing the data to userspace or the console is in icanon
mode, then perhaps it is a "secret" so we should wipe it once we are
done with it.

This mirrors the logic that the audit code has.

Reported-by: aszlig <aszlig@nix.build>
Tested-by: Milan Broz <gmazyland@gmail.com>
Tested-by: Daniel Zatovic <daniel.zatovic@gmail.com>
Tested-by: aszlig <aszlig@nix.build>
Cc: Willy Tarreau <w@1wt.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/n_tty.c