
Even stupider is the assumption that everyone giving out shell access knows that process limits should (or even can) be imposed.befortin wrote:Many people on this thread (and on /.'s thread) are always thinking "if you give someone else a shell access, then you know how to of limit his access".
That's somewhat stupid. Look at the number of threads on the "Networking & Security" forum on which hackers can get shell access but are unable to get root access.<snip>
Infinite recursion is a bug that will always lead to a Denial of Service condition. Can you think of any valid reason not to protect your system from the effects of an error that makes both the program in which it occurs and the entire system useless?localjoe wrote:this is like saying Gentoo should be secure by default from infinite recursion...
Code: Select all
@users - maxlogins 16 # i often keep several xterms open, as well as console sessions
@users hard core 1000
@users hard fsize 819200 # i have to create large files.
@users hard cpu 40 # if it weren't for quake3 i could probably make this much lower
@users hard nproc 256 # lots of slack here, need to bump this down some more
@users hard nofile 2048
@users soft stack 8192
@users hard stack 32768
@users hard data 393216
@users hard as 786432
Code: Select all
$ perl -e 'fork while 1'
I think you want /etc/limits.nat wrote: I found out that the /etc/security/limits.conf is only affecting pam-aware applications. So I guess a sane default value should be set somewhere else but I have not idea where. I have not found out where Debian gets their max user processes = 256 from, but I think that it should be set to something like 2048 or even 1024.
If anyone get problems of this (I doubt anyone would - maybe 32 CPU systems....) there could be some lines in the install docs telling how to set this (for example in /etc/initscript or /etc/security/limits.conf)
Now I need to find out where this is set. (its obviously not in /etc/security/limits.conf)
Code: Select all
root -
* L16 A786432 D393216 S32768 U256 N2048 F819200 C1000 T40
Code: Select all
$ ps u -U <userid> | grep -c .
50
I thought this route was so unbelivably wrong, that I decided to create an account just to voice my opinion.nat wrote:They decided to not do anything about it.![]()
http://bugs.gentoo.org/show_bug.cgi?id=85656#c49

This doesn't mean that that there shouldn't be sane defaults,*nix isn't for folks who want an easy computer.

Linus should at least have better defaults (like the BSD's) and let those who needs more processes raise the limits. (its easy)AngelKnight wrote:Someone convince Linus to put policy code in-kernel.
You should take a look at OSX.AngelKnight wrote:*nix isn't for folks who want an easy computer.
Right, so if you want extreme limits, then set them yourself. In the mean time, we avoid bad press, crashing machines, an elitist sterotypes.AngelKnight wrote:Someone convince Linus to put policy code in-kernel. If he does, then I'll deal with it. Until then, I'll remember to set ulimits for shell users on my own.
Folks, there are *plenty* of Unix system administration books out there. Gentoo is not out to teach you these things; the learning is your responsibility.
*nix isn't for folks who want an easy computer.
My 2c. Bye now.
This would definatley be the best route with the ability to override the defaults to more or less to suit the needs of the admin.Sqeaky wrote:What says the default limits have to be static, they could be calculated during the install process or during boot to something that is near the limits of the system, but still prevents a fork bomb from causing nonresponsivness
I would not like that! If I could wish, then I would like something like limits-config (like the java-config, gcc-config, mirror-select, ufed, etc). But something which is calculated at install time, without me knowing what exactly is calculated, would irritate me. What next? A tool that automaticly does the partitioning for me?lkarayan wrote:This would definatley be the best route with the ability to override the defaults to more or less to suit the needs of the admin.
I know that it's easy to fix this problem.
The fact is that this part of Gentoo is not secured by default!! Is there any good reason to not secure this by default?? Confused
This remembers some other OS... What's its name again?? Win.... Windows??
The limits are already calculated within the kernel, the override was my request.steveb wrote:I would not like that! If I could wish, then I would like something like limits-config (like the java-config, gcc-config, mirror-select, ufed, etc). But something which is calculated at install time, without me knowing what exactly is calculated, would irritate me. What next? A tool that automaticly does the partitioning for me?lkarayan wrote:This would definatley be the best route with the ability to override the defaults to more or less to suit the needs of the admin.
Please no! To much automatic stuff is not the way to go. Tools are okay, but I want to be in charge of the changes.
cheers
SteveB