Commit Graph

138 Commits

Author SHA1 Message Date
255f723fef We already have ap_str_tolower(), so also add ap_str_toupper() function and use
it where possible.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1138617 13f79535-47bb-0310-9956-ffa450edef68
2011-06-22 20:24:27 +00:00
46bdc28bf4 fix some logging calls to include the server_rec
(and even the conn_rec in a couple of places)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1074871 13f79535-47bb-0310-9956-ffa450edef68
2011-02-26 15:32:01 +00:00
49bd9d3de1 Per the existing comment and setrlimit() behavior -- only prevent attempts to
raise the hard limit, not to lower it, by nonroot users.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1042198 13f79535-47bb-0310-9956-ffa450edef68
2010-12-04 15:06:29 +00:00
d4d90bdf0a suEXEC: Add Suexec directive to disable suEXEC without renaming the
binary (Suexec Off), or force startup failure if suEXEC is required
but not supported (Suexec On).  Change SuexecUserGroup to fail 
startup instead of just printing a warning if suEXEC is disabled.

Additionally, ap_unixd_config.suexec_disabled_reason has a message,
suitable for logging/messaging, explaining why the feature isn't
available.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1033519 13f79535-47bb-0310-9956-ffa450edef68
2010-11-10 15:34:43 +00:00
90a12694f8 The directives "User", "Group" and "ChrootDir" have
been moved into mod_unixd.

The old macro UNIX_DAEMON_COMMANDS is no longer in use.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@954783 13f79535-47bb-0310-9956-ffa450edef68
2010-06-15 09:33:20 +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
79d196b3b2 generalize the existing (r589761) platform- and errno-specific
logic to suppress an error message if accept() fails after the
socket has been marked inactive

a message will still be logged, but at debug level instead of error

PR: 49058


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@933657 13f79535-47bb-0310-9956-ffa450edef68
2010-04-13 14:58:03 +00:00
0464e456f6 revert 759711 and 759713... don't require apr2
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@760026 13f79535-47bb-0310-9956-ffa450edef68
2009-03-30 16:10:26 +00:00
f1d5422ab9 0600 is UWRITE+UREAD
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@759713 13f79535-47bb-0310-9956-ffa450edef68
2009-03-29 16:10:02 +00:00
0e19eb7475 Use apr-2 object perms setter
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@759711 13f79535-47bb-0310-9956-ffa450edef68
2009-03-29 16:05:53 +00:00
a1908585a8 Core can specify a platform-specific rewrite args hook. Use that on Unix.
Windows continues to specify this in the MPM, at least until someone
can separate out the MPM-specific bits.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@759699 13f79535-47bb-0310-9956-ffa450edef68
2009-03-29 14:41:02 +00:00
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
736d659de0 use a local module header file to store the function prototype
for ap_unixd_setup_child() that is used outside this module.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@739487 13f79535-47bb-0310-9956-ffa450edef68
2009-01-31 01:46:56 +00:00
5b5045a2d5 revert r711228: the ap_unixd_setup_child prototype needs to go somewhere.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@739150 13f79535-47bb-0310-9956-ffa450edef68
2009-01-30 02:48:08 +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
9327dae3a9 * unixd_setup_child is no longer implemented by unixd.c.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@711228 13f79535-47bb-0310-9956-ffa450edef68
2008-11-04 11:36:31 +00:00
368d9bb335 Further unixd hacks to remove duplication between old-unixd and mod_unixd,
and get it working with old MPMS[1] + mod_unixd.  It's still an uneasy
split, as some modules (mod_cgid, suexec)[2] also use unixd.
More thinking+hacking due.

[1] Should be prefork/worker/event, but only worker is tested.
[2] cgid is OK, suexec is untested.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@711146 13f79535-47bb-0310-9956-ffa450edef68
2008-11-04 00:44:56 +00:00
c63898be91 Also adjust unixd.c with changes from r709406
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@709407 13f79535-47bb-0310-9956-ffa450edef68
2008-10-31 13:37:32 +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
bafd1071fb Support chroot on unix-family platforms
PR 43596 (Dimitar Pashev)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@611483 13f79535-47bb-0310-9956-ffa450edef68
2008-01-12 21:16:27 +00:00
ee4ec8009b After a stop or restart signal, the old listening sockets
are closed. "Some platforms" drop out of the accept() with
an EBADF after the sockets have been closed. Such an
error should not clutter the logs.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@589761 13f79535-47bb-0310-9956-ffa450edef68
2007-10-29 17:38:11 +00:00
cd3ed0c3ca APR_HAVE/AP_HAVE are ALWAYS defined, not always 1.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@486436 13f79535-47bb-0310-9956-ffa450edef68
2006-12-13 00:34:58 +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
913e69c609 * os/unix/unixd.h: Use extern "C" linkage.
PR: 37357


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@354389 13f79535-47bb-0310-9956-ffa450edef68
2005-12-06 09:48:19 +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
105543fce6 I'd prefer, before 2.2-final, to have AP_NEED_SET_MUTEX_PERMS defined
across all architectures as 1|0.  Comments?

  This simply ensures we can use the value in #if tests.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@289592 13f79535-47bb-0310-9956-ffa450edef68
2005-09-16 16:04:37 +00:00
8c1e315d3f Doxygen fixup / cleanup
submited by: Neale Ranns neale ranns.org
reviewed by: Ian Holsman



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@263931 13f79535-47bb-0310-9956-ffa450edef68
2005-08-28 23:03:59 +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
c36ecfa64f Remove the .cvsignore files.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105796 13f79535-47bb-0310-9956-ffa450edef68
2004-11-19 09:07:29 +00:00
1b3a4c2013 * os/unix/os.h: Define AP_NEED_SET_MUTEX_PERMS.
* modules/mappers/mod_rewrite.c, modules/ssl/ssl_engine_mutex.c: Use
AP_NEED_SET_MUTEX_PERMS to determine whether unixd_set_*_mutex_perms
calls are necessary.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105411 13f79535-47bb-0310-9956-ffa450edef68
2004-10-12 11:55:30 +00:00
0f413a829c Move the few BS2000 specific in unixd.c
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105361 13f79535-47bb-0310-9956-ffa450edef68
2004-10-01 16:03:08 +00:00
67a400fb6b readd suexec setuid and user check
Related to PR: 28287


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103510 13f79535-47bb-0310-9956-ffa450edef68
2004-04-24 19:42:52 +00:00
4d8f4c26d6 *) SECURITY: CAN-2004-0174 (cve.mitre.org)
Fix starvation issue on listening sockets where a short-lived
     connection on a rarely-accessed listening socket will cause a
     child to hold the accept mutex and block out new connections until
     another connection arrives on that rarely-accessed listening socket.
     With Apache 2.x there is no performance concern about enabling the
     logic for platforms which don't need it, so it is enabled everywhere
     except for Win32.  [Jeff Trawick]

(already in 2.0.49, propagating to mirrors now)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103029 13f79535-47bb-0310-9956-ffa450edef68
2004-03-19 11:16:03 +00:00
6895aee838 * os/unix/unixd.c (unixd_accept): Eliminate now-redundant call to
apr_os_sock_get(); let APR check for accept returning zero on TPF.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102925 13f79535-47bb-0310-9956-ffa450edef68
2004-03-10 21:06:11 +00:00
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
e0d2db5107 fix copyright dates according to the first check in
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102579 13f79535-47bb-0310-9956-ffa450edef68
2004-02-08 13:13:10 +00:00
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
01da1159b3 Unix MPMs: Stop dropping connections when the file descriptor
is at least FD_SETSIZE.

That isn't a problem for most users (since poll() is widespread).
On old boxes where select() must be used by APR, APR needs to fail
operations that don't work with such fds.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102419 13f79535-47bb-0310-9956-ffa450edef68
2004-01-27 15:19:58 +00:00
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
3b6b4b4325 fix a compile failure with recent z/OS and picky settings for compiler/
library

("unsigned short" is more portable than "ushort")


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101690 13f79535-47bb-0310-9956-ffa450edef68
2003-11-03 17:30:45 +00:00
46941ae3b8 one_process is not a global variable
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101197 13f79535-47bb-0310-9956-ffa450edef68
2003-09-08 16:39:46 +00:00
aa21671e13 switch to APR 1.0 API (which is still in flux)
because of the changes to the argument lists of apr_mmap_dup and apr_socket_create,
2.1-dev won't build with apr and apr-util's 0.9 branch anymore


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101154 13f79535-47bb-0310-9956-ffa450edef68
2003-09-03 19:27:12 +00:00
8f0cd048e0 Unix: Handle permissions settings for flock-based mutexes in
unixd_set_global|proc_mutex_perms().  Allow the functions to be
called for any type of mutex.

This resolves a fatal problem with mod_rewrite on systems where
APR uses flock-based mutex.

It simplifies mod_ssl as well, which had special logic to perform
the chown().  It fixed an init error with mod_ssl on systems where
flock is used when the user had no SSLMutex directive.

The Unix MPMs continue to call unixd_set_global|proc_mutex_perms()
only for SysV sems.  There is no permission problem with flock-based
accept mutexes since the child init logic for the MPMs is done
prior to switching identity.

PR:              20312


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100189 13f79535-47bb-0310-9956-ffa450edef68
2003-06-07 19:50:01 +00:00
b906d05f70 Linux 2.4+: enable coredumps when Apache is started as root if
CoreDumpDirectory is explicitly coded


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98908 13f79535-47bb-0310-9956-ffa450edef68
2003-03-06 21:48:58 +00:00
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
1149429227 fix compile breakage with IBM's xlc compiler caused by the
attempt to lose const on progname

strrchr was not the real library function that takes a
const parameter; instead, strrchr was the Apache macro which
makes it clear that const will be lost


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95900 13f79535-47bb-0310-9956-ffa450edef68
2002-06-27 10:47:49 +00:00
b274510242 Fix a long-standing bug in 2.0, CGI scripts were being called
with relative paths instead of absolute paths.  Apache 1.3 used
absolute paths for everything except for SuExec, this brings back
that standard.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95899 13f79535-47bb-0310-9956-ffa450edef68
2002-06-27 06:07:58 +00:00
c09368cc88 Fix for suexec execution of CGI scripts from mod_include
(including security patch to ensure that <!--#include file="name.cgi"-->
is run as the suexec user rather than the httpd user)
PR: 7791, 8291
Submitted by: Colm MacCarthaigh <colmmacc@redbrick.dcu.ie>
Reviewed by:	Brian Pane


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95290 13f79535-47bb-0310-9956-ffa450edef68
2002-05-26 08:27:10 +00:00