0

Where is the mod_cgi.c script, or where are all the modules in the apache software?

I have a problem with the RLimitNProc settings on my server, because this settings don't work properly. I've found in the deep of the internet that there is a bug in the apache 2.2 software, exactly in mod_cgi.c script, but I can't find that script wether on the server nor on a fresh downloaded apache 2.2. software.

I have just found the mod_cgi.so file, but the .so files are not intended to being changed...

I'm running CentOS 5.8

Thanks in advance. Regards, John.

John Brunner
  • 145
  • 2
  • 7

2 Answers2

1

The file mod_cgi.c isn't a script, it's a C source file. You can find the CentOS 5.8 version in the SRPM.

user9517
  • 115,471
  • 20
  • 215
  • 297
1

mod_cgi.c is not a script. It is C source code. You would need to download the source code, not the compiled software.

Changing the source code for such a complex system is something you probably shouldn't do unless you are very familiar with C indeed. I'd strongly suggest that you look for a version of apache that doesn't have the bug in question; if none exists, wait a little. Also, many bugs have workarounds that can be made in the server configuration to disable the exploit. If you were to add information about the bug, we might be able to help you.

Jenny D
  • 27,780
  • 21
  • 75
  • 114
  • thanks. the question with my problem is [here](http://serverfault.com/questions/489665/ulimit-u-could-be-exceeded-by-some-user?noredirect=1#comment546860_489665), and i found [this](https://issues.apache.org/bugzilla/show_bug.cgi?id=54133) "solution" (don't know if it's a solution for **my** problem) – John Brunner Mar 21 '13 at 10:33
  • On the bug report page, it says "fixed in 2.4.4". So upgrading to that version should fix your problem. If it doesn't, you can download the SRPM as Iain suggested, patch the file yourself with the patch from the Apache page, and then compile it. – Jenny D Mar 21 '13 at 10:51
  • yes, thanks. i will prefer to update to 2.4.4, but i found it interesting for myself to check if my "mod_cgi.c" is corrupted or not :) regards – John Brunner Mar 21 '13 at 10:52
  • Looking at source code is always interesting :-) – Jenny D Mar 21 '13 at 11:31
  • @JennyD: aye, and the source code for the C5.8 version of mod_cgi.c doesn't have the code listed in the OPs 'solution'. – user9517 Mar 21 '13 at 12:28
  • @lain: maybe i'm looking wrong, but i'm sure it does! looking at "modules/generators/mod_cgi.c" lines 426 to 460 are exactly the wrong lines of code as stated in the "bug report" at my question :) – John Brunner Mar 21 '13 at 16:56