Index: root/Desktop/a1/linux-2.6.17.tar.bz2_FILES/linux-2.6.17/kernel/fork.c =================================================================== --- root.orig/Desktop/a1/linux-2.6.17.tar.bz2_FILES/linux-2.6.17/kernel/fork.c 2007-06-26 20:40:06.000000000 +0530 +++ root/Desktop/a1/linux-2.6.17.tar.bz2_FILES/linux-2.6.17/kernel/fork.c 2007-06-26 20:41:41.000000000 +0530 @@ -957,12 +957,19 @@ retval = -EAGAIN; - + /* + * following code does not allow Non Root User to cross its process + * limit and it alerts administrator about user Nearing the process limit. + */ + if (atomic_read(&p->user->processes) >= p->signal->rlim[RLIMIT_NPROC].rlim_cur) + if (atomic_read(&p->user->processes) >= p->signal->rlim[RLIMIT_NPROC].rlim_max) if (!capable(CAP_SYS_ADMIN) && !capable(CAP_SYS_RESOURCE) && - p->user != &root_user) + p->user != &root_user) { + if (printk_ratelimit()) + printk(KERN_NOTICE "User with uid %u is Nearing the process limit\n",p->user->uid); + goto bad_fork_free; - + } atomic_inc(&p->user->__count); atomic_inc(&p->user->processes);