1
0
mirror of https://github.com/apache/httpd.git synced 2025-11-06 16:49:32 +03:00
Commit Graph

225 Commits

Author SHA1 Message Date
Jeff Trawick
cb8a82faed remove TPF support
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758936 13f79535-47bb-0310-9956-ffa450edef68
2009-03-27 00:05:18 +00:00
Ruediger Pluem
ac59ef2068 * We need to return an int not a pointer!
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@736110 13f79535-47bb-0310-9956-ffa450edef68
2009-01-20 21:22:10 +00:00
Rainer Jung
288ac7728a Piped error loggers should use the reliable pipes,
i.e. they should be automatically restarted when they die
similar to what happens for access loggers.

Patch makes error loggers use the same code path as
access loggers.

Side effect: patch adds ap_server_root_relative() to the error
logger path before spawning.

Reviewed by R. Pluem.

Patch needs to be tested on Windows.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@735516 13f79535-47bb-0310-9956-ffa450edef68
2009-01-18 18:19:45 +00:00
Sander Temme
3233157214 The error logging core only logs at very high level if it has no
server_rec from which to read the appropriate LogLevel.  Ensure that 
everything gets logged when -DDEBUG is passed to the compiler. 

This makes the server very verbose, on the command line before stderr is 
redirected and in the error log afterwards.  This is appropriate when 
debugging, but not under normal circumstances. 



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@686271 13f79535-47bb-0310-9956-ffa450edef68
2008-08-15 16:11:46 +00:00
Paul Querna
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
William A. Rowe Jr
586be549f9 On win32, we must never, never close the parent's copy of the
child's read end for a reliable piped logger.  The child runs
and manages it's own logs, and even if the parent did instead, 
the mpm would be adjusted to pass down the child write ends 
without read ends to the pipes, so this forever makes no sense.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@607666 13f79535-47bb-0310-9956-ffa450edef68
2007-12-31 05:00:16 +00:00
William A. Rowe Jr
4f72c6c9f8 We now have an API to describe pipe creation timeout states, so use it
to ensure no platform has quirks with their particular default.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@587670 13f79535-47bb-0310-9956-ffa450edef68
2007-10-23 22:01:29 +00:00
William A. Rowe Jr
89c12727e9 Share a single write-pipe handle for piped stderr logging, this
prevents an extra logging process from hanging around after the
initial config-phase.

Reviewed by: rpluem, wrowe

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@580437 13f79535-47bb-0310-9956-ffa450edef68
2007-09-28 17:43:24 +00:00
William A. Rowe Jr
a4512f7019 redux, use Rudgier's instead, better comments.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@580436 13f79535-47bb-0310-9956-ffa450edef68
2007-09-28 17:41:56 +00:00
William A. Rowe Jr
1823a1d3f1 Logging fixes, round two. Authored and Reviewed by both rplume and wrowe
within the same 10 minutes, this is the obvious fix to prevent any lingering
write handles from hanging around in unexpected ways.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@580431 13f79535-47bb-0310-9956-ffa450edef68
2007-09-28 17:24:26 +00:00
William A. Rowe Jr
26c8ae35a1 Introduce a specific pool for stderr logging, so that we have two
simultanious pools until the new stderr pipe logger is completely 
initialized.  This ensures we have a stderr channel from the time 
we clear the plog in a previous generation through the invocation
of the open_logs hook in the next generation.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@569535 13f79535-47bb-0310-9956-ffa450edef68
2007-08-24 21:49:02 +00:00
William A. Rowe Jr
c43e6c5a24 Refactor r452431, because this should not be fatal to starting
the server if it's horribly broken.  The alternative of returing
'rc' in this case would be to open /dev/null as the error stream
for this generation of the server; and even more useless result.

Also the parent-file was never necessary; we can pass only the
child handle using apr_procattr_child_err_set() and have no extra
file to clean up afterwards.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@568326 13f79535-47bb-0310-9956-ffa450edef68
2007-08-21 23:28:32 +00:00
William A. Rowe Jr
a8a35fe32e This message was confusing during debugging, make it unique.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@568322 13f79535-47bb-0310-9956-ffa450edef68
2007-08-21 23:21:44 +00:00
Joe Orton
acd492152e * server/log.c (ap_open_logs): When dup2'ing the error log to stderr,
use the already-open stderr file object rather than opening a new one.

Submitted by: Tom Donovan <Tom.Donovan acm.org>
PR: 40476


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@467338 13f79535-47bb-0310-9956-ffa450edef68
2006-10-24 14:16:01 +00:00
Joe Orton
d91484f6fc When starting a new piped error logger for the main server, ensure
that the new child's stderr is not a pipe to an old piped logger:

* server/log.c (log_child): Add "dummy_stderr" parameter; if set,
duplicate stdout as the stderr for the child.
(open_error_log): Add "is_main" parameter; use dummy stderr for logger
for main server only.
(ap_open_logs, ap_open_piped_log): Adjust for new open_error_log()/
log_child() parameters.

PR: 40651
Submitted by: jorton, rpluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@452431 13f79535-47bb-0310-9956-ffa450edef68
2006-10-03 11:40:30 +00:00
Roy T. Fielding
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
Colm MacCarthaigh
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
Jim Jagielski
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
Jeff Trawick
76c0a8bdd2 fix minor annoyance on z/OS: __FILE__ is set to
"./foo.c" instead of simply "foo.c", so filter
out all but the basename before logging it with
debug messages


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@178299 13f79535-47bb-0310-9956-ffa450edef68
2005-05-24 22:11:24 +00:00
Joe Orton
4741d91295 * server/log.c (piped_log_spawn): Don't leak an fd for each
invocation.

Reviewed by: Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@170719 13f79535-47bb-0310-9956-ffa450edef68
2005-05-18 08:03:37 +00:00
Joe Orton
5e080e68d7 * server/log.c (ap_open_piped_log): Remove errno handling.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@170537 13f79535-47bb-0310-9956-ffa450edef68
2005-05-17 08:03:03 +00:00
Joe Orton
534ee6332c * server/log.c (piped_log_spawn): Return the APR error code,
as expected by piped_log_maintenance (and fixing "Unknown
error" messages in error path there).
(ap_open_piped_log): Expect an APR error code.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@170441 13f79535-47bb-0310-9956-ffa450edef68
2005-05-16 19:59:05 +00:00
Jeff Trawick
f78a4e4a89 Prevent hangs of child processes when writing to piped loggers at
the time of graceful restart. 

PR:          26467
Reviewed by: Joe Orton



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@170281 13f79535-47bb-0310-9956-ffa450edef68
2005-05-15 23:56:48 +00:00
Justin Erenkrantz
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
Jeff Trawick
81e4e36b0e add ap_log_cerror(); use it in a couple of places in core output filter
so that the client IP address is recorded in the log


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105625 13f79535-47bb-0310-9956-ffa450edef68
2004-10-29 14:45:24 +00:00
Joe Orton
df6a1b30c2 * server/log.c (log_error_core): For APLOG_DEBUG on Unix, if __FILE__
is an absolute path (as in a VPATH build), just log the basename.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105258 13f79535-47bb-0310-9956-ffa450edef68
2004-09-22 19:47:51 +00:00
Jeff Trawick
0f0a226ad1 tweak error handling when reading the pid file
previously strtol() would look at unitialized
storage, but now the string is terminated where
the data read ends

give user a hint about removing the file if we can't
read/parse it properly

(somehow I ended up with a truncated httpd.pid on my
own system, leading to these tweaks)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104651 13f79535-47bb-0310-9956-ffa450edef68
2004-08-14 10:49:43 +00:00
Joe Orton
d2e2c4e584 * modules/ssl/ssl_engine_kernel.c (ssl_callback_SSLVerify_CRL),
* server/log.c (ap_log_pid),
* server/mpm/prefork/prefork.c (accept_mutex_on, accept_mutex_off),
* support/htdbm.c (htdbm_list):
Fix some non-literal format strings (warnings from gcc -Wformat-security).

PR: 30585
Submitted by: Ulf Harnhammar (SITIC), Joe Orton


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104548 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 14:25:30 +00:00
Jeff Trawick
5ef3a9aa2b start piped loggers via the shell, passing through the environment variables
in the httpd process

this requires a new APR feature (APR_SHELLCMD_ENV), just added to apr 1.0-dev


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104019 13f79535-47bb-0310-9956-ffa450edef68
2004-06-23 12:32:22 +00:00
Jeff Trawick
14fad9b946 fix typo in recent commit
Submitted by:	Jean-Jacques Clar


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103874 13f79535-47bb-0310-9956-ffa450edef68
2004-06-09 12:43:25 +00:00
Jeff Trawick
0619fe8659 Pass environment variables through to piped loggers, resolving
a regression since 1.3.

Submitted by:	  Ken Coar, Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103796 13f79535-47bb-0310-9956-ffa450edef68
2004-05-27 23:35:41 +00:00
Joe Orton
96c0ef3f90 * modules/loggers/mod_log_config.c, server/log.c (open_error_log,
ap_replace_stderr_log): Use APR_LARGEFILE when opening log files, to
allow log files to exceed the 2Gb limit if necessary.

PR: 13511


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103627 13f79535-47bb-0310-9956-ffa450edef68
2004-05-06 10:18:07 +00:00
André Malo
eeb57c17ad fix name of The Apache Software Foundation
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102619 13f79535-47bb-0310-9956-ffa450edef68
2004-02-09 20:40:53 +00:00
André Malo
e88fcf3c64 fix copyright dates according to the first check in
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102589 13f79535-47bb-0310-9956-ffa450edef68
2004-02-08 13:58:22 +00:00
André Malo
4f02cb1e18 apply Apache License, Version 2.0
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102525 13f79535-47bb-0310-9956-ffa450edef68
2004-02-06 22:58:42 +00:00
André Malo
625dc56af9 use the UNSAFE designation for unescaped errorlogs
Submitted by: Geoffrey Young, Joe Orton


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102306 13f79535-47bb-0310-9956-ffa450edef68
2004-01-12 22:48:08 +00:00
André Malo
b5985f2a18 allow unescaped errorlogs via compile time switch
Submitted by: Geoffrey Young <geoff modperlcookbook.org>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102302 13f79535-47bb-0310-9956-ffa450edef68
2004-01-12 21:19:58 +00:00
André Malo
fb07607180 update license to 2004.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102135 13f79535-47bb-0310-9956-ffa450edef68
2004-01-01 13:26:26 +00:00
Jeff Trawick
04980bafab Fix some piped log problems: bogus "piped log program '(null)'
failed" messages during restart and problem with the logger
respawning again after Apache is stopped.

PR:                21648, 24805


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102048 13f79535-47bb-0310-9956-ffa450edef68
2003-12-13 22:18:13 +00:00
André Malo
a7db87b9ad SECURITY [CAN-2003-0020]: escape arbitrary data before writing into the
errorlog.

Reviewed by: Mark J Cox


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101873 13f79535-47bb-0310-9956-ffa450edef68
2003-11-24 21:34:38 +00:00
Jeff Trawick
17a3b9261b no need to open error log for reading
Submitted by:	Bjoern A. Zeeb
Reviewed by:	Jeff Trawick, who added the same change to another path


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100594 13f79535-47bb-0310-9956-ffa450edef68
2003-07-14 14:48:40 +00:00
Bill Stoddard
9abecdf4e7 Win32: Whack the fully qualified names that appear in the log when
loglevel debug is being used.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100153 13f79535-47bb-0310-9956-ffa450edef68
2003-06-03 18:05:20 +00:00
Martin Kraemer
de2e94a58a Oops - undo wrong commit
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99056 13f79535-47bb-0310-9956-ffa450edef68
2003-03-24 08:52:20 +00:00
Martin Kraemer
d8f10577ef On failures, try to add a hint what went wrong
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99055 13f79535-47bb-0310-9956-ffa450edef68
2003-03-24 08:51:22 +00:00
William A. Rowe Jr
1e7b7d79bb SECURITY: Eliminated leaks of several file descriptors to child
processes, such as CGI scripts.

PR: 17206
Submitted by:	Christian Kratzer <ck@cksoft.de>, Bjoern A. Zeeb <bz@zabbadoz.net>
Reviewed by:	Joe Orton, Will Rowe


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99032 13f79535-47bb-0310-9956-ffa450edef68
2003-03-20 21:50:40 +00:00
Jeff Trawick
1023dd0e61 Fix an existing problem with error handling in piped_log_spawn().
Use new APR apr_proc_create() features to prevent Apache from starting
on Unix* in most cases where a piped log program can be started,
and add log messages for the other situations.  *Other platforms
already failed Apache initialization if a piped log program
couldn't be started.

PR:         15761


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98607 13f79535-47bb-0310-9956-ffa450edef68
2003-02-10 16:27:28 +00:00
Jeff Trawick
aa7d6bb9a7 Make failing piped loggers work more like apache-1.3 by
1) logging a message
2) trying to restart

PR:               15761


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98576 13f79535-47bb-0310-9956-ffa450edef68
2003-02-04 17:21:50 +00:00
André Malo
742af25096 finished that boring job:
update license to 2003.

Happy New Year! ;-))


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98573 13f79535-47bb-0310-9956-ffa450edef68
2003-02-03 17:53:28 +00:00
William A. Rowe Jr
d93eef30f2 Some errors are impossible to fathom, without the user knowing certain
base numbers.  This patch introduces "(EAP ##): Eap message" for the EAP
  errors, "(OS ##): Message" for modestly numbered os errors (under 100000)
  and hex "(OS 0x########): Message" for huge errors, which generally have
  bit-flag meanings and are usually represented in hex.

  This should make recognizing user bugreports a little less difficult.
  Would have done the same for other ranges, but they don't have (as) obvious
  numeric meanings on their own.

  Finally, we free up a buffer copy and give apr_strerror our string buffer
  to directly populate the message text.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97191 13f79535-47bb-0310-9956-ffa450edef68
2002-10-13 03:25:04 +00:00
William A. Rowe Jr
c5b0867a95 Modify ap_open_logs (an internal function) to follow the hook open_logs
argument schema so it can be directly invoked by the hook handler.  Also
  clean up the open_logs processing to return an error rather than simply
  exit()ing.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96829 13f79535-47bb-0310-9956-ffa450edef68
2002-09-15 22:04:01 +00:00