mirror of
https://github.com/Qortal/Brooklyn.git
synced 2025-01-30 23:02: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.
20 lines
505 B
C
20 lines
505 B
C
#include <linux/kernel.h>
|
|
#include <linux/sched.h>
|
|
#include <linux/fs.h>
|
|
#include <linux/file.h>
|
|
#include <linux/grsecurity.h>
|
|
#include <linux/grinternal.h>
|
|
|
|
void
|
|
gr_log_chdir(const struct dentry *dentry, const struct vfsmount *mnt)
|
|
{
|
|
#ifdef CONFIG_GRKERNSEC_AUDIT_CHDIR
|
|
if ((grsec_enable_chdir && grsec_enable_group &&
|
|
in_group_p(grsec_audit_gid)) || (grsec_enable_chdir &&
|
|
!grsec_enable_group)) {
|
|
gr_log_fs_generic(GR_DO_AUDIT, GR_CHDIR_AUDIT_MSG, dentry, mnt);
|
|
}
|
|
#endif
|
|
return;
|
|
}
|