lkml.org 
[lkml]   [2007]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Patch related with Fork Bobmbing Attack
From
Date
 > +	/*
> + * following code does not allow Non Root User to cross its process
> + * limit. it alerts administrator about fork bombing attack and prevents
> + * it.
> + */
> if (atomic_read(&p->user->processes) >= p->signal->rlim[RLIMIT_NPROC].rlim_cur)
> if (!capable(CAP_SYS_ADMIN) && !capable(CAP_SYS_RESOURCE) &&
> - p->user != &root_user)
> -
> + p->user != &root_user) {
> + if (printk_ratelimit())
> + printk(KERN_CRIT"User with uid %d is crossing its process limit\n",p->user->uid);
> goto bad_fork_free;
> + }

please run scripts/checkpatch.pl against your patch. It will point
out numerous problems with the coding style. Also, I think a space
between KERN_CRIT and " would look better too.

- R.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-06-12 19:07    [W:0.575 / U:0.452 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site