]> git.baikalelectronics.ru Git - kernel.git/commit
Audit: Log TIOCSTI
authorAl Viro <viro@ZenIV.linux.org.uk>
Tue, 9 Dec 2008 09:23:33 +0000 (09:23 +0000)
committerJames Morris <jmorris@namei.org>
Tue, 9 Dec 2008 09:32:06 +0000 (20:32 +1100)
commit2034f20484bb5dc4c5cef055c4e7b0f1b3298434
tree8016113a4965a344415e8bd6366f07c23eee7d5f
parentb93784aa3f5e4360fb2752f0beec936838c5fd37
Audit: Log TIOCSTI

AUDIT_TTY records currently log all data read by processes marked for
TTY input auditing, even if the data was "pushed back" using the TIOCSTI
ioctl, not typed by the user.

This patch records all TIOCSTI calls to disambiguate the input.  It
generates one audit message per character pushed back; considering
TIOCSTI is used very rarely, this simple solution is probably good
enough.  (The only program I could find that uses TIOCSTI is mailx/nail
in "header editing" mode, e.g. using the ~h escape.  mailx is used very
rarely, and the escapes are used even rarer.)

Signed-Off-By: Miloslav Trmac <mitr@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: James Morris <jmorris@namei.org>
drivers/char/tty_audit.c
drivers/char/tty_io.c
include/linux/tty.h