The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

shell fork bomb

Discussion in 'Security' started by pthirose, Mar 31, 2010.

  1. pthirose

    pthirose Member

    Mar 30, 2010
    Likes Received:
    Trophy Points:
    First (since it's not really clear in the docs) it appears that what this does is create a /etc/profile.d/ and /etc/profile.d/limits.csh files and edit /etc/profile. These files then essentially contain limit commands.

    Perhaps the check for whoami should be changed to -x rather than just -e.

    Also, for limits.csh, other than for clarity, is there a reason to specifically set root's limits? Wouldn't, presumably, whatever was pre-set by the OS defaults be ok? And is it necessary to set LIMITUSER as an environment variable that carries beyond the script? Couldn't it just be a variable that expires at the end of the script?

    For, I realize you need to reset root's limits because you first set them (unconditionally for everyone) just to ensure the whoami command can run. I would ask if that part is necessary, and if so, would there be a better way to perhaps first save all current settings and then restore them afterwards? Perhaps overkill, but seems "cleaner" or "less changes" to the system, so to speak.

    Mostly, I'm just posting this one to get clarity on what exactly this is doing.

    Thank you,

Share This Page