You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by co...@hyperreal.org on 2000/01/01 18:07:37 UTC
cvs commit: apache-1.3/src/main http_config.c http_main.c
coar 00/01/01 09:07:37
Modified: src CHANGES
src/main http_config.c http_main.c
Log:
Add a way to find out where Apache will be looking for the
suexec binary, since its presence and correct permissions
are all that it takes to enable it. It's sort-of a module,
so add the report to the '-l' output.
Revision Changes Path
1.1488 +3 -0 apache-1.3/src/CHANGES
Index: CHANGES
===================================================================
RCS file: /home/cvs/apache-1.3/src/CHANGES,v
retrieving revision 1.1487
retrieving revision 1.1488
diff -u -r1.1487 -r1.1488
--- CHANGES 1999/12/31 05:35:48 1.1487
+++ CHANGES 2000/01/01 17:07:32 1.1488
@@ -1,5 +1,8 @@
Changes with Apache 1.3.10
+ *) Add a suexec status report to the '-l' (compiled-in modules)
+ output. [Ken Coar]
+
*) Changes to enable server-parsed mod_autoindex Header and
Readme files. [Raymond S Brand <rs...@rsbx.net>]
1.149 +6 -1 apache-1.3/src/main/http_config.c
Index: http_config.c
===================================================================
RCS file: /home/cvs/apache-1.3/src/main/http_config.c,v
retrieving revision 1.148
retrieving revision 1.149
diff -u -r1.148 -r1.149
--- http_config.c 1999/10/11 23:05:15 1.148
+++ http_config.c 2000/01/01 17:07:34 1.149
@@ -1636,6 +1636,11 @@
int n;
printf("Compiled-in modules:\n");
- for (n = 0; ap_loaded_modules[n]; ++n)
+ for (n = 0; ap_loaded_modules[n]; ++n) {
printf(" %s\n", ap_loaded_modules[n]->name);
+ }
+ printf("suexec: %s\n",
+ ap_suexec_enabled
+ ? "enabled; valid wrapper " SUEXEC_BIN
+ : "disabled; invalid wrapper " SUEXEC_BIN);
}
1.486 +9 -6 apache-1.3/src/main/http_main.c
Index: http_main.c
===================================================================
RCS file: /home/cvs/apache-1.3/src/main/http_main.c,v
retrieving revision 1.485
retrieving revision 1.486
diff -u -r1.485 -r1.486
--- http_main.c 1999/12/10 11:03:33 1.485
+++ http_main.c 2000/01/01 17:07:34 1.486
@@ -3158,17 +3158,19 @@
/* check to see if we have the 'suexec' setuid wrapper installed */
static int init_suexec(void)
{
+ int result = 0;
+
#ifndef WIN32
struct stat wrapper;
-
- if ((stat(SUEXEC_BIN, &wrapper)) != 0)
- return (ap_suexec_enabled);
- if ((wrapper.st_mode & S_ISUID) && wrapper.st_uid == 0) {
- ap_suexec_enabled = 1;
+ if ((stat(SUEXEC_BIN, &wrapper)) != 0) {
+ result = 0;
+ }
+ else if ((wrapper.st_mode & S_ISUID) && (wrapper.st_uid == 0)) {
+ result = 1;
}
#endif /* ndef WIN32 */
- return (ap_suexec_enabled);
+ return result;
}
/*****************************************************************
@@ -4897,6 +4899,7 @@
show_compile_settings();
exit(0);
case 'l':
+ ap_suexec_enabled = init_suexec();
ap_show_modules();
exit(0);
case 'L':
Re: cvs commit: apache-1.3/src/main http_config.c http_main.c
Posted by Martin Kraemer <Ma...@mch.sni.de>.
On Sat, Jan 01, 2000 at 05:07:37PM -0000, coar@hyperreal.org wrote:
> Add a way to find out where Apache will be looking for the
> suexec binary, since its presence and correct permissions
> are all that it takes to enable it. It's sort-of a module,
> so add the report to the '-l' output.
I'm not sure whether this is a wise decision. People may have parsed
the output of "httpd -l" using scripts; their scripts will break
with this modification. I would feel better if the modification
would add the suexec state to, e.g., output of the -v or -V options.
(They are less probable candidates for parsing by 3rd party scripts).
Martin
--
<Ma...@MchP.Siemens.De> | Fujitsu Siemens
<ma...@apache.org> | 81730 Munich, Germany