summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2015-11-08 08:52:31 -0500
committerJiri Slaby <jslaby@suse.cz>2016-11-28 22:22:57 +0100
commitef99a35dd0b2463ddf2d1a5bdf71e8b2fe0a5018 (patch)
tree9507878ab57eaf78b51345f64a1d859d09e71d76 /include
parentfd81c458a68061a1d7884732f392638b7ad48d85 (diff)
tty: audit: Fix audit source
commit 6b2a3d628aa752f0ab825fc6d4d07b09e274d1c1 upstream. The data to audit/record is in the 'from' buffer (ie., the input read buffer). Fixes: 72586c6061ab ("n_tty: Fix auditing support for cannonical mode") Cc: Miloslav Trmač <mitr@redhat.com> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Acked-by: Laura Abbott <labbott@fedoraproject.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'include')
-rw-r--r--include/linux/tty.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/tty.h b/include/linux/tty.h
index 96c23247a332..31cf8965ace8 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -578,7 +578,7 @@ extern void n_tty_inherit_ops(struct tty_ldisc_ops *ops);
/* tty_audit.c */
#ifdef CONFIG_AUDIT
-extern void tty_audit_add_data(struct tty_struct *tty, unsigned char *data,
+extern void tty_audit_add_data(struct tty_struct *tty, const void *data,
size_t size, unsigned icanon);
extern void tty_audit_exit(void);
extern void tty_audit_fork(struct signal_struct *sig);
@@ -586,8 +586,8 @@ extern void tty_audit_tiocsti(struct tty_struct *tty, char ch);
extern void tty_audit_push(struct tty_struct *tty);
extern int tty_audit_push_current(void);
#else
-static inline void tty_audit_add_data(struct tty_struct *tty,
- unsigned char *data, size_t size, unsigned icanon)
+static inline void tty_audit_add_data(struct tty_struct *tty, const void *data,
+ size_t size, unsigned icanon)
{
}
static inline void tty_audit_tiocsti(struct tty_struct *tty, char ch)