Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice