3
0
mirror of https://github.com/Qortal/Brooklyn.git synced 2025-01-30 23:02:18 +00:00
Brooklyn/grsecurity/grsec_fork.c

24 lines
502 B
C
Raw Normal View History

#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/grsecurity.h>
#include <linux/grinternal.h>
#include <linux/errno.h>
void
gr_log_forkfail(const int retval)
{
#ifdef CONFIG_GRKERNSEC_FORKFAIL
if (grsec_enable_forkfail && (retval == -EAGAIN || retval == -ENOMEM)) {
switch (retval) {
case -EAGAIN:
gr_log_str(GR_DONT_AUDIT, GR_FAILFORK_MSG, "EAGAIN");
break;
case -ENOMEM:
gr_log_str(GR_DONT_AUDIT, GR_FAILFORK_MSG, "ENOMEM");
break;
}
}
#endif
return;
}