You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
[patch 1/2] audit: let userspace fully control TTY input auditing
Remove the code that automatically disables TTY input auditing in processes that open TTYs when they have no other TTY open; this heuristic was intended to automatically handle daemons, but it has false positives (e.g. with sshd) that make it impossible to control TTY input auditing from a PAM module. With this patch, TTY input auditing is controlled from user-space only. On the other hand, not even for daemons does it make sense to audit "input" from PTY masters; this data was produced by a program writing to the PTY slave, and does not represent data entered by the user. Signed-off-by: Miloslav Trmac <mitr@redhat.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -2755,7 +2755,6 @@ got_driver:
|
||||
__proc_set_tty(current, tty);
|
||||
spin_unlock_irq(¤t->sighand->siglock);
|
||||
mutex_unlock(&tty_mutex);
|
||||
tty_audit_opening();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -2818,10 +2817,8 @@ static int ptmx_open(struct inode *inode, struct file *filp)
|
||||
|
||||
check_tty_count(tty, "tty_open");
|
||||
retval = ptm_driver->open(tty, filp);
|
||||
if (!retval) {
|
||||
tty_audit_opening();
|
||||
if (!retval)
|
||||
return 0;
|
||||
}
|
||||
out1:
|
||||
release_dev(filp);
|
||||
return retval;
|
||||
|
||||
Reference in New Issue
Block a user