mirror of
https://github.com/Qortal/Brooklyn.git
synced 2025-01-31 07:12:18 +00:00
2a709f28fa
* 0day explit mitigation * Memory corruption prevention * Privilege escalation prevention * Buffer over flow prevention * File System corruption defense * Thread escape prevention This may very well be the most intensive inclusion to BrooklynR. This will not be part of an x86 suite nor it will be released as tool kit. The security core toolkit will remain part of kernel base.
19 lines
428 B
C
19 lines
428 B
C
#include <linux/kernel.h>
|
|
#include <linux/sched.h>
|
|
#include <linux/grsecurity.h>
|
|
#include <linux/grinternal.h>
|
|
#include <linux/capability.h>
|
|
#include <linux/tty.h>
|
|
|
|
int gr_handle_tiocsti(struct tty_struct *tty)
|
|
{
|
|
#ifdef CONFIG_GRKERNSEC_HARDEN_TTY
|
|
if (grsec_enable_harden_tty && (current->signal->tty == tty) &&
|
|
!capable(CAP_SYS_ADMIN)) {
|
|
gr_log_noargs(GR_DONT_AUDIT, GR_TIOCSTI_MSG);
|
|
return 1;
|
|
}
|
|
#endif
|
|
return 0;
|
|
}
|