Commit Graph

214 Commits

Author SHA1 Message Date
2334a1ea4f - Add loglevels to request_rec and conn_rec
- Introduce per-directory loglevel configuration


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@951897 13f79535-47bb-0310-9956-ffa450edef68
2010-06-06 17:04:40 +00:00
ebb62867fb Use the new APLOG_USE_MODULE/AP_DECLARE_MODULE macros everywhere to take
advantage of per-module loglevels


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@951895 13f79535-47bb-0310-9956-ffa450edef68
2010-06-06 16:59:50 +00:00
c5e09c5987 Stop unexpected error logs in each requests.
sock_write returns not size but status.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@823797 13f79535-47bb-0310-9956-ffa450edef68
2009-10-10 05:52:17 +00:00
60fbe11de1 Bring back OS/2 support.
Reverses r758929 with a little bit of conflict resolution.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@807930 13f79535-47bb-0310-9956-ffa450edef68
2009-08-26 08:56:13 +00:00
0b9ada684a Use uninterruptable write; noted borrowing this code for lowportd (mod_ftp)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@791604 13f79535-47bb-0310-9956-ffa450edef68
2009-07-06 20:22:49 +00:00
40c818801c * Close the accepted fd in the error case to avoid a file descriptor leak.
PR: 47335
Submitted by: Kornél Pál <kornelpal gmail.com>
Reviewed by: rpluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@783742 13f79535-47bb-0310-9956-ffa450edef68
2009-06-11 12:36:36 +00:00
c250b42a48 * Close the listening Unix socket of the mod_cgid daemon in the CGI scripts.
PR: 47335
Submitted by: Kornél Pál <kornelpal gmail.com>
Reviewed by: rpluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@783740 13f79535-47bb-0310-9956-ffa450edef68
2009-06-11 12:32:59 +00:00
c49f671cac mod_cgid: Improve handling of long AF_UNIX socket names (ScriptSock).
Dynamically allocate the AF_UNIX sockaddr based on the required filename size.
For some platforms (e.g., Solaris, OS X, FreeBSD), this allows longer
socket filenames to be used.

When the name is too long, the failure reporting is more consistent and a 
socket with truncated pathname is not left stranded.  The user still needs
to use ScriptSock to specify a shorter name.

An extra unlink() failure message may be generated when attempting to clean 
up the socket after a daemon initialization error; the message is surpressed 
for ENOTENT, but not for ENAMETOOLONG.

PR: 47037



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@765725 13f79535-47bb-0310-9956-ffa450edef68
2009-04-16 19:23:45 +00:00
ee32468a33 remove OS/2 platform support
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758929 13f79535-47bb-0310-9956-ffa450edef68
2009-03-26 23:47:52 +00:00
40e24b32dd the length arguments are apr_size_t, not int
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@731965 13f79535-47bb-0310-9956-ffa450edef68
2009-01-06 15:05:33 +00:00
9560b93d5b tiny style fix for r729579
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@731963 13f79535-47bb-0310-9956-ffa450edef68
2009-01-06 14:50:47 +00:00
b4a75ed08f PR#39332: fix for segfault problem with mod_cgid on Solaris
Patch by Masaoki Kobayashi


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@729579 13f79535-47bb-0310-9956-ffa450edef68
2008-12-27 02:13:47 +00:00
25a74cc4b3 * Do not add an empty argument if we do not have any args for the script.
Fixes a regression from r682475.

PR: 46380


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@726636 13f79535-47bb-0310-9956-ffa450edef68
2008-12-15 07:47:30 +00:00
a73acf02f6 API Cleanup in preperation for 2.4.x, make sure all exported functions or variables contain an ap_ prefix.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@722399 13f79535-47bb-0310-9956-ffa450edef68
2008-12-02 08:13:36 +00:00
46d3287ea6 * Instead of unixd_setup_child run the drop_privileges hook to switch the
userid / groupid.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@711234 13f79535-47bb-0310-9956-ffa450edef68
2008-11-04 11:55:25 +00:00
b1575e4901 * modules/generators/mod_cgid.c
(cgid_server): Fix warning: 'env' and 'argv0' may be used uninitialized in 
    this function.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@708823 13f79535-47bb-0310-9956-ffa450edef68
2008-10-29 08:27:01 +00:00
90ea0dd959 Simplyfy codepath. Don't treat "" as special, just
plug along. This matches the codepath in mod_cgi.c


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@682475 13f79535-47bb-0310-9956-ffa450edef68
2008-08-04 19:37:31 +00:00
a3dbf90f4e *) mod_cgid: Pass along empty command line arguments from an ISINDEX
query that has consecutive '+' characters in the QUERY_STRING,
     matching the behavior of mod_cgi.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@682389 13f79535-47bb-0310-9956-ffa450edef68
2008-08-04 13:49:07 +00:00
5c1dcb86b3 *) mod_cgid: Explicitly set permissions of the socket (ScriptSock) shared by
mod_cgid and request processing threads, for OS'es such as HPUX and AIX
   that do not use umask for AF_UNIX socket permissions.
   [Eric Covener, Jeff Trawick]



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@654332 13f79535-47bb-0310-9956-ffa450edef68
2008-05-08 00:09:53 +00:00
3da7b6c2c7 mod_cgid: Don't try to restart the daemon if it fails to initialize the socket.
It won't get any better without intervention, and it will fork() until some
sort of intervention.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@654232 13f79535-47bb-0310-9956-ffa450edef68
2008-05-07 19:38:50 +00:00
a324a1d72f Remove all references to CORE_PRIVATE.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@645455 13f79535-47bb-0310-9956-ffa450edef68
2008-04-07 10:45:43 +00:00
5ebab647ff * Prevent running through the error stack by returning OK and setting r->status
accordingly if ret is HTTP_NOT_MODIFIED as this breaks mod_cache validating a
  stale entity.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@541990 13f79535-47bb-0310-9956-ffa450edef68
2007-05-27 13:57:46 +00:00
876e10d0ad Update the hash table of active script pids even on paths where a
script process wasn't created (storing 0 for the pid in that case).
Otherwise, the remembered pid is that of the last successful script
execution for this hash key.

Prior to this patch, the wrong process could be terminated in
rare circumstances:

- A CGI process with pid 10101 is forked for connection 99.

- After the CGI exits and some time elapses, some other process gets 
  pid 10101. (Connection 99 hasn't handled another CGI request yet.)

- The next time connection 99 has a CGI process, the fork()
  or other early setup fails, so no CGI process is created.

- The remembered pid for connection 99 is still 10101.  It
  gets terminated (subject to permissions).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@503340 13f79535-47bb-0310-9956-ffa450edef68
2007-02-04 00:57:03 +00:00
d20ce0c6a1 Follow up to r451006, use APR_STATUS_IS_TIMEUP instead of comparing against
APR_TIMEUP directly.

Reported by: jorton

* modules/generators/mod_cgi.c
  (cgi_handler): Use APR_STATUS_IS_TIMEUP.

* modules/generators/mod_cgid.c
  (cgid_handler): Ditto.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@451289 13f79535-47bb-0310-9956-ffa450edef68
2006-09-29 13:48:09 +00:00
faacd788d1 * Notice that reading of the request entity body failed due to a timeout
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@451006 13f79535-47bb-0310-9956-ffa450edef68
2006-09-28 20:15:42 +00:00
8c2b72b53c PR 31759 (mutated) - reported by Jo Rhett
Don't return apr_status_t error value from input filter chain.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@442758 13f79535-47bb-0310-9956-ffa450edef68
2006-09-12 23:44:12 +00:00
de659cbed0 update license header text
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@420983 13f79535-47bb-0310-9956-ffa450edef68
2006-07-11 20:33:53 +00:00
dd95d7c37c Update the copyright year in all .c, .h and .xml files
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@395228 13f79535-47bb-0310-9956-ffa450edef68
2006-04-19 12:11:27 +00:00
5061d9fa92 No functional Change: Removing trailing whitespace. This also
means that "blank" lines consisting of just spaces or
tabs are now really blank lines


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@332306 13f79535-47bb-0310-9956-ffa450edef68
2005-11-10 15:11:44 +00:00
5d2fae4818 No functional change: simple detabbing of indented code.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@332305 13f79535-47bb-0310-9956-ffa450edef68
2005-11-10 15:05:51 +00:00
16ef40e5ff Remove CGI block on OPTIONS method so that scripts can
respond to OPTIONS directly rather than via server default.

PR: 15242
Reviewed-by: Paul Querna, Andre Malo, William A. Rowe, Jr.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@326255 13f79535-47bb-0310-9956-ffa450edef68
2005-10-18 21:29:43 +00:00
7bd608a78e Whitespace fixes.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@293316 13f79535-47bb-0310-9956-ffa450edef68
2005-10-03 11:38:32 +00:00
d81de0d9b3 Add ap_append_pid(); This is performed enough to warrant
a function I think, especially with the fact that
the mapping of getpid() to APR_PID_T_FMT isn't
consistant in some areas. 


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@265506 13f79535-47bb-0310-9956-ffa450edef68
2005-08-31 15:22:08 +00:00
19a0d050b0 If uid_t and gid_t are unsigned on a platform (hurd, for example), using -1
may cause a compiler warning. 



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@264788 13f79535-47bb-0310-9956-ffa450edef68
2005-08-30 14:28:48 +00:00
c8e6fa78af Fix PR36410; Change how the get_suexec_identity hook is handled by CGID.
Instead of using mod_userdir and mod_suexec specific hacks, we now run the hook
on the httpd side of the handler. 

If this is NULL, we pass on a magic empty_ugid constant, otherwise pass on the
real ugid.

On the cgid side of the equation, we add our own hook, with REALLY_FIRST, and
then order the hooks. This ensures that cgid's doer runs before any other
registered get_suexec_identity doers.

We use cgid's request config to store the ugid. If ugid == empty_ugid, we DON'T
call ap_os_create_privileged_process, because our doer would return the magic
empty_ugid constant. Having the doer return NULL is no good, because then
userdir and mod_suexec's doers would be called. Instead, we call plain old
apr_proc_create(). 



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@264759 13f79535-47bb-0310-9956-ffa450edef68
2005-08-30 11:26:45 +00:00
f87b4c1af1 Correct mod_cgid's argv[0] so that the full path can be delved by the
invoked cgi application, to conform to the behavior of mod_cgi.

PR: 34542
Reviewed by: Andre, OtherBill
Submitted by: Pradeep Kumar S <pradeep.smani gmail.com>



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@264623 13f79535-47bb-0310-9956-ffa450edef68
2005-08-29 20:12:43 +00:00
de0b459ab0 CGId keeps a copy of the listening sockets open, which interferes with a
graceful shutdown/start. Close the listening sockets on cgid start.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@241815 13f79535-47bb-0310-9956-ffa450edef68
2005-08-27 23:05:42 +00:00
b379e699a4 Append the .PID to the ScriptSock filename. This change ensures that multiple
running instances of httpd will not clobber each others script sockets. 

Because a different socket will be created for each instance, this change also
unlinks the script-socket on exit, to prevent pollution. 

unlink() happens from within the parent process, since the change in userid's
means the cgid process likely won't have the correct permissions.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@240044 13f79535-47bb-0310-9956-ffa450edef68
2005-08-25 11:51:24 +00:00
e3d4e1fe50 nit: Consistently CamelCase "ScriptSock".
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@240043 13f79535-47bb-0310-9956-ffa450edef68
2005-08-25 10:56:12 +00:00
aec1dab812 fix 64bit build warnings
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@239423 13f79535-47bb-0310-9956-ffa450edef68
2005-08-23 16:06:24 +00:00
badfb79c67 mod_cgid: Fix buffer overflow processing ScriptSock directive.
Submitted by:        Steve Kemp <steve steve.org.uk>
Reviewed/tweaked by: trawick



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@192995 13f79535-47bb-0310-9956-ffa450edef68
2005-06-22 20:54:28 +00:00
905cdf9f0b Update copyright year to 2005 and standardize on current copyright owner line.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@151408 13f79535-47bb-0310-9956-ffa450edef68
2005-02-04 20:28:49 +00:00
f8e41a4112 mod_cgid: Catch configuration problem where two web server instances
share same ServerRoot but admin forgot to use ScriptSock.

reviewed by: nd, stoddard


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@106408 13f79535-47bb-0310-9956-ffa450edef68
2004-11-24 11:24:32 +00:00
65153a5687 * modules/generators/mod_cgid.c (cgid_init): Fix GCC strict-aliasing
warning.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105753 13f79535-47bb-0310-9956-ffa450edef68
2004-11-12 10:16:01 +00:00
022f0af97c Remove deprecated APR_STATUS_IS_SUCCESS() macro in favor of direct test against
APR_SUCCESS.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104439 13f79535-47bb-0310-9956-ffa450edef68
2004-08-01 01:12:30 +00:00
1577a9adf6 Let CGI daemon die if the network layer has been shut down (problem noticed on BS2000/OSD)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104080 13f79535-47bb-0310-9956-ffa450edef68
2004-06-29 13:48:20 +00:00
ef03042845 * modules/generators/mod_cgid.c (cgid_server, set_script_socket):
Remove unused variables.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103209 13f79535-47bb-0310-9956-ffa450edef68
2004-03-30 10:57:30 +00:00
8fcedf0718 mod_cgid: Don't allow Scriptsock to be specified inside VirtualHost;
Don't place script socket inside default server root instead of
actual server root.

The sock name was being stored in the server config, though it
was not specific to a server.

ap_server_root_relative() was being used prior to config processing,
so it was always picking up the default server root.

PR:            27886


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103184 13f79535-47bb-0310-9956-ffa450edef68
2004-03-29 02:56:21 +00:00
18edbaaf56 mod_cgid: Fix storage corruption caused by use of incorrect pool.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102961 13f79535-47bb-0310-9956-ffa450edef68
2004-03-15 20:00:13 +00:00
a688f06b19 fix name of The Apache Software Foundation
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102618 13f79535-47bb-0310-9956-ffa450edef68
2004-02-09 20:31:03 +00:00