Re: [Patch] Add sanity checking to htpassd (Was Re: [Patch] DeTabbify htpasswd.c)

2002-05-17 Thread Thom May

* William A. Rowe, Jr. ([EMAIL PROTECTED]) wrote :
 +1 here, I'm only confused by why you needed the extra strcpy(tmp, line);
 which doesn't seem to be necessary.
 
Gone now. I think that was a relic from when I was trying to do this a
different way. Oh, and the spaces are now sorted, thanks to the cluesticking
I got from Justin and Cliff last night on IRC.
Cheers,
-Thom


Index: htpasswd.c
===
RCS file: /home/cvspublic/httpd-2.0/support/htpasswd.c,v
retrieving revision 1.43
diff -u -u -r1.43 htpasswd.c
--- htpasswd.c  16 May 2002 19:57:11 -  1.43
+++ htpasswd.c  17 May 2002 07:43:49 -
@@ -77,6 +77,7 @@
  *  5: Failure; buffer would overflow (username, filename, or computed
  * record too long)
  *  6: Failure; username contains illegal or reserved characters
+ *  7: Failure: file is not a valid htpasswd file
  */
 
 #include apr.h
@@ -133,6 +134,7 @@
 #define ERR_INTERRUPTED 4
 #define ERR_OVERFLOW 5
 #define ERR_BADUSER 6
+#define ERR_INVALID 7
 
 /*
  * This needs to be declared statically so the signal handler can
@@ -582,6 +584,39 @@
 perror(fopen);
 exit(ERR_FILEPERM);
 }
+/*
+ * Now we need to confirm that this is a valid htpasswd file
+ */
+if (! newfile){
+
+fpw = fopen(pwfilename, r);
+while (! (get_line(line, sizeof(line), fpw))) {
+char *testcolon;
+
+if ((line[0] == '#') || (line[0] == '\0')) {
+continue;
+}
+testcolon = strchr(line, ':');
+if (testcolon != NULL){
+/*
+ * We got a valid line. keep going
+ */
+continue;
+}
+else {
+/*
+ * no colon in the line, and it's not a comment
+ * Time to bail out before we do damage.
+ */
+fprintf(stderr, %s: The file %s does not appear 
+to be a valid htpasswd file.\n,
+argv[0], pwfilename);
+fclose(fpw);
+exit(ERR_INVALID);
+}
+}
+fclose(fpw);
+}
 }
 
 /*
@@ -678,7 +713,7 @@
 /*
  * The temporary file now contains the information that should be
  * in the actual password file.  Close the open files, re-open them
- * in the appropriate mode, and copy them file to the real one.
+ * in the appropriate mode, and copy the temp file to the real one.
  */
 fclose(ftemp);
 fpw = fopen(pwfilename, w+);



mod_auth.c alteration : optional strict valid-user

2002-05-17 Thread Scott MacKay

Please excuse the verbosity...

Request: mod_auth augmentation
Apache Version: 1.3.22 (Changes can be made to other
revs too)
Files affected: src/modules/standard/mod_auth.c
Structures Affected: auth_config_struct
Routines Affected: groups_for_user(),
check_user_access(), create_auth_dir_config()
Flags Added: AuthForceGroup (boolean)
Security:  Normal, if flag not specified.  Tightens
'valid-user' if specified.

Description
I would like to propose an augmentation in the
mod_auth.c module.
This would help restrict the allowances of the
'valid-user' user when a group file is specified.  The
design would allow higher level non-authoratative 
modules to more easily use 'valid-user' when they
authenticate with a broad authentication service and
want a local group file to refine control. Of key note
would be for services which auto-generate access
control files.

Details
The need for this augmentation stems from the Front
Page module (yes, I use it...sad) coupled with the
auth_ldap module to provide LDAP authentication of
users in  Front Page.   While the need originated from
this arrangement, I believe it can serve a useful
purpose whenever you authentication thru a high level
module and pass group authentication down to mod_auth.
 A key reason for this arrangement would be if you
used a company provided authentication scheme (like
LDAP), but cannot create/control groups.  An easy
method of control would to be use the LDAP for user
authentication and then pass group authentication down
to mod_auth, using group files which you can control.

The normal Front Page module builds .htaccess files
with mod_auth based authentication, generating one or
more sets of password and groups file for the web and
subwebs.  In the group file, it provides separate
groups for the different classification of users, such
as editors and administrators. 
When coupled with the auth_ldap module from
rudedog.org, you can manipulate  the generated
.htaccess files to cause authentication for the users
to hit against an LDAP database.  Part of the
implementation is to make the LDAP 'non-authoratative'
so group access control is passed down to the
mod_auth, using the generated group files from Front
Page. The problem arises when you want to prevent a
web site from being browseable to general users. 
Front Page provides this protection by setting the
.htaccess file to allow allowing access to
'valid-user'.  In the normal scheme, this means  the
user must exist in the user file.   When you use a
higher level authentication such as LDAP, a large user
base can  authenticate, even though the intent is to
only allow users within the group list.
Yeah, it is more of a FrontPage issue (they should use
a 'require group' with their group lists).

The proposal would add a new flag to the mod_auth
module.  This would indicate that  if the user is
indicated as being 'valid-user' and a group file is
specified, then the user must be a valid user in any
of the groups specified in the group file. This change
only tightens security as it further restricts
'valid-user' and only does so when a new flag is set. 
Changes mod_auth.c would require the following
changes, I believe...
Sorry it is in generic-o diff format.  I can re-post
it in a better form if there is any merit to this
alteration.


diff mod_auth.c mod_auth_proposed.c
70a71,75
  * smackay/2002 - Added adjustment to keyword
control.
  * new key AuthForceGroup : valid-user must
belong in a group, if a group 
  * file is specified.  This allows higher
modules who are not
  * authoritative and use 'valid-user' to
consult the AuthGroupFile.
  * The only exception is if there are no
requires.
82a88
 int auth_forcegroup;   /* requires user to be in
a group  for 'valid-user' */
91a98
 sec-auth_forcegroup = 0;   /* smackay : normal
valid-user by default */
102a110
 /* smackay : Added AuthForceGroup : requires user to
be in a group */
115a124,128
 {AuthForceGroup, ap_set_flag_slot,
  (void *) XtOffsetOf(auth_config_rec,
auth_forcegroup),
  OR_AUTHCFG, FLAG,
  Set to 'on' to force a 'valid-user' user to
exist in the 
  group file, if specified.  If no group file is
specified, this has no effect.},
153a167
 char in_group;   /* Indicator if we are defined
in at least 1 group */
154a169,170
 in_group=0; /* smackay : Set to false by default
*/
 
174a191
   in_group=1;
180a198,201
 /* If we are not in at least 1 group, return a
NULL. */
 if (! in_group)
 return NULL;
 
274c295,300
   return OK;
---
   if (sec-auth_forcegroup 
sec-auth_grpfile) { 
   if (grpstatus) 
   return OK;
   } else {
   return OK;
   }

__
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com



Re: cvs commit: httpd-2.0/docs/conf httpd-std.conf.in

2002-05-17 Thread Joshua Slive


On 17 May 2002 [EMAIL PROTECTED] wrote:

 brianp  02/05/16 18:43:52

   Modified:docs/conf httpd-std.conf.in
   Log:
   Added EnableMMAP (commented out) to the standard config

Is this a directive that pretty much everyone using apache needs to know
about?  My guess is no, and if that is the case, it really doesn't need to
be in the default config file.  Even if it does need to be in there, it
could use a significantly briefer description.  Instead, you could
consider documenting it further in the performance-notes in the manual.

(Sorry, but if we did this for every apache directive, the config file
would be completely horrible.  At the moment it is only a little
horrible.)

Joshua.




[PATCH] TPF doc update of install-tpf.html

2002-05-17 Thread David McCreedy

Update to the installation instructions for TPF to clarify how to
exclude expat-lite from the Apache compilation.
Submitted at a customer's request.

David McCreedy
[EMAIL PROTECTED]



Index: httpd-docs-1.3/htdocs/manual/install-tpf.html
===
RCS file: /home/cvs/httpd-docs-1.3/htdocs/manual/install-tpf.html,v
retrieving revision 1.16
diff -u -d -b -r1.16 install-tpf.html
--- httpd-docs-1.3/htdocs/manual/install-tpf.html   29 Mar 2002 19:05:54 - 
 1.16
+++ httpd-docs-1.3/htdocs/manual/install-tpf.html   17 May 2002 15:10:08 -
@@ -113,14 +113,14 @@
   
bttpaxnbsp;-rvzkfnbsp;ios390_unix_filename/i.tar.Znbsp;-onbsp;from=ISO8859-1,to=IBM-1047nbsp;*/src/tt/bbr
 /
nbsp;/li
 
-  li
+  lia id=delete-expat name=delete-expat/a
 Remove unnecessary subdirectories: 
 ul
-  li
-  bttcdnbsp;apache_1.3.emxx/em/src/os/tt/b/li
-
-  li
-  
bttrmnbsp;-rnbsp;bs2000nbsp;cygwinnbsp;mpeixnbsp;netwarenbsp;os2nbsp;os390nbsp;win32/tt/b/li
+  libttcdnbsp;apache_1.3.emxx/em/src/lib/tt/b/li
+  libttrmnbsp;-rnbsp;expat-litenbsp;sdbm/tt/b/li
+  libttcdnbsp;../os/tt/b/li
+  
+libttrmnbsp;-rnbsp;bs2000nbsp;cygwinnbsp;mpeixnbsp;netwarenbsp;os2nbsp;os390nbsp;win32/tt/b/li
+  libttcdnbsp;../tt/b/li
 /ul
 nbsp;
   /li
@@ -174,11 +174,6 @@
nbsp;
 
 ul
-  liadjust the rules and
-  ttEXTRA_CFLAGS|LIBS|LDFLAGS|INCLUDES/tt if you feel
-  so inclined
-   nbsp;/li
-
   licomment out (by preceding the line with a #) lines
   corresponding to those modules you DO NOT wish to
   include
@@ -189,6 +184,14 @@
   or add new lines corresponding to any custom modules you
   have written (the a href=readme-tpf.htmlreadme-tpf.html/a document 
lists
   the modules that have been tested on TPF)nbsp;/li
+
+  liif you did not delete the src/lib/expat-lite directory
+  as noted in the a href=#delete-expatdownload instructions/a,
+  add ttRulenbsp;EXPAT=no/tt to the src/Configuration file/li
+
+  liadjust the other rules, ttEXTRA_CFLAGS/tt, ttEXTRA_LIBS/tt, 
+ttEXTRA_LDFLAGS/tt,
+  and ttEXTRA_INCLUDES/tt settings if you feel so inclined/li
+
 /ul
 
 pThe modules placed in the Apache distribution are the
@@ -328,7 +331,7 @@
   TPF.nbsp;br /
nbsp;/li
 
-  li
+  lia id=run-configure name=run-configure/a
 Run the Configure script:
 bttConfigure/tt/bnbsp;br /
  
@@ -349,7 +352,6 @@
   Creating Makefile in os/tpf
   Creating Makefile in ap
   Creating Makefile in main
-  Creating Makefile in lib/expat-lite
   Creating Makefile in modules/standard
   $ _
 
@@ -379,14 +381,12 @@
 /bor find a line with a \:   b/\\/b
 /pre
 
-div style=margin-left: 2em
   The end of line should display as tt\$/tt. If it is
   displayed as tt\nbsp;$/tt (with a blank between \
   and $) then you should revert to the distributed version
   of the file and make the site-specific changes again
   using a UNIX compatible editor such as vi or emacs. Then
   try the Configure command again.nbsp;
-/div
 pre
  close the file: b:q/b  (or b:quit!/b)
 /pre
@@ -471,7 +471,6 @@
 has been included as src/os/tpf/samples/linkhttp.jcl. You
 will need to modify this JCL:br /
  nbsp; 
-
 ul
   liChange the IDs, data set names, and libraries for
   your particular site.nbsp;/li
@@ -484,8 +483,18 @@
  font color=#FFfont size=+1TIP:/font/font
 Do NOT include gen_test_char.o or gen_uri_delims.o in the
 link JCL since these files are only used during the
-ttmake/tt step.nbsp;br /
+ttmake/tt step.nbsp;br /br /
+
+
+If you receive an Unresolved references error for ttXML_ErrorString/tt
+you probably need to a href=#delete-expatremove the expat-lite 
+directory/a
+and start back at the a href=#run-configureRun the Configure script 
+step/abr /br /
+
+  
+If you receive an unable to open error  for 
+ttlib/expat-lite/hashtable.o/tt
+you probably need to remove all of the expat-lite .o's from your link JCLbr 
+/
  nbsp;
+
   /li
 
   liCreate a loadset. Sample loadset JCL has been included as
@@ -561,8 +570,6 @@
 ttfopen/tt error while running Apache:br /
 br /
  
-
-div style=margin-left: 2em
   If you're running a PUT10 or higher version of TPF make
   the directory using the bttzfile
   mkdirnbsp;/usr/local/apache/logs/tt/b command.br /
@@ -570,7 +577,7 @@
If you're running TPF version PUT09 TFTP an empty file
   into the logs subdirectory to create it.nbsp;br /
   br /
-  

Re: [PATCH] Implement -k option for httpd

2002-05-17 Thread Jeff Trawick

Justin Erenkrantz [EMAIL PROTECTED] writes:

 Here's a starting point for someone else to pick up how to get
 httpd to honor -k [start|stop|graceful|restart] options.

For anybody playing with this, here is an update to the patch to
main.c so that

1) it applies after my changes this a.m. to zap APLOG_NOERRNO
2) it reports a missing pid file in the same way as apachectl

After this patch:

$ ~/apacheinst/bin/apachectl stop
/home/trawick/apacheinst/bin/apachectl stop: httpd (no pid file) not running
$ ~/apacheinst/bin/httpd -k stop
/home/trawick/apacheinst/bin/httpd (no pid file) not running

-- 
Jeff Trawick | [EMAIL PROTECTED]
Born in Roswell... married an alien...



Re: cvs commit: httpd-2.0/docs/conf httpd-std.conf.in

2002-05-17 Thread Brian Pane

Joshua Slive wrote:

On 17 May 2002 [EMAIL PROTECTED] wrote:

  

brianp  02/05/16 18:43:52

  Modified:docs/conf httpd-std.conf.in
  Log:
  Added EnableMMAP (commented out) to the standard config



Is this a directive that pretty much everyone using apache needs to know
about?


Yes, especially considering the NFS segfault issues.

  My guess is no, and if that is the case, it really doesn't need to
be in the default config file.  Even if it does need to be in there, it
could use a significantly briefer description.  Instead, you could
consider documenting it further in the performance-notes in the manual.


+0 for using a shorter description (we could replace some details with
   a please read the manual warning, like what we do with ServerRoot)

+1 for adding it to the performance notes also.  This is one of the many
   2.0 changes that need to be included in the performance notes.  Is there
   any plan to replace that document entirely, or is it safe to do 
incremental
   edits to it?

--Brian





Re: [PATCH] Implement -k option for httpd

2002-05-17 Thread Justin Erenkrantz

On Fri, May 17, 2002 at 01:06:23PM -0400, Jeff Trawick wrote:
 For anybody playing with this, here is an update to the patch to
 main.c so that

I think you intended to post the update?  -- justin



RE: [PATCH] Implement -k option for httpd

2002-05-17 Thread Allan Edwards

 I'm not going to finish it because:
 
 a) I'm not really sure what to do on Win32.

main.c(617) : error C2065: 'SIGHUP' : undeclared identifier
main.c(620) : error C2065: 'AP_SIG_GRACEFUL' : undeclared identifier
main.c(628) : warning C4013: 'kill' undefined; assuming extern returning int
Error executing cl.exe.

Maybe the best thing to do is follow the Windows model.
The shutdown/restart etc. processing is handled by the mpm
(on the rewrite_args hook), which is probably the 
logical place to do this sort of thing.

Allan




Re: [PATCH] Implement -k option for httpd

2002-05-17 Thread Jeff Trawick

Allan Edwards [EMAIL PROTECTED] writes:

  I'm not going to finish it because:
  
  a) I'm not really sure what to do on Win32.
 
 main.c(617) : error C2065: 'SIGHUP' : undeclared identifier
 main.c(620) : error C2065: 'AP_SIG_GRACEFUL' : undeclared identifier
 main.c(628) : warning C4013: 'kill' undefined; assuming extern returning int
 Error executing cl.exe.
 
 Maybe the best thing to do is follow the Windows model.
 The shutdown/restart etc. processing is handled by the mpm
 (on the rewrite_args hook), which is probably the 
 logical place to do this sort of thing.

Certainly the MPM (or maybe os/foo code) needs to be involved...

Doesn't the new function need to be done before we hit ap_mpm_run()?
If main() doesn't know what's going on then how would it work?

Maybe MPMs that want to support this need to define functions like

  is-server-running (-k start would use this)
  signal-server (-k restart|graceful|stop would use this)

I guess I'm leaning toward having main() in control, as with Justin's
initial patch.

-- 
Jeff Trawick | [EMAIL PROTECTED]
Born in Roswell... married an alien...



Odd URL (mis)behavior in 2.0

2002-05-17 Thread Dale Ghent


I think what I'm about to describe counts as a regression in 2.0 from
1.3.x.

I have a user who uses and odd URL scheme on his website. He has a PHP
script, /d.php that is referenced in following manner: /d.php/foo.html
where the /foo.html bit is passwd tothe d.v php script and the PHP
script generates dynamic content based on that argument.

On 1.3.x, this works fine. All the propper headers and content are
returned by the server to the client.

But in Apache 2.0 (running the same versoin of PHP - 4.2.1) a 404 status
is returned and the Content-Type header has application/x-httpd-php
rather than text/html. Of course, the browser then asks whether you'd
like to download the output or not because of the mime type.

ISTR that there was some fix put into the tree a long time ago for CGI
scripts that are called in this same manner, but for the life of me, I
can't figure out why this is failing on 2.0 with a PHP script called this
way.

Any thoughts?

/dale




Re: Odd URL (mis)behavior in 2.0

2002-05-17 Thread Aaron Bannert

On Fri, May 17, 2002 at 04:06:54PM -0400, Dale Ghent wrote:
 
 I think what I'm about to describe counts as a regression in 2.0 from
 1.3.x.
 
 I have a user who uses and odd URL scheme on his website. He has a PHP
 script, /d.php that is referenced in following manner: /d.php/foo.html
 where the /foo.html bit is passwd tothe d.v php script and the PHP
 script generates dynamic content based on that argument.
 
 On 1.3.x, this works fine. All the propper headers and content are
 returned by the server to the client.
 
 But in Apache 2.0 (running the same versoin of PHP - 4.2.1) a 404 status
 is returned and the Content-Type header has application/x-httpd-php
 rather than text/html. Of course, the browser then asks whether you'd
 like to download the output or not because of the mime type.
 
 ISTR that there was some fix put into the tree a long time ago for CGI
 scripts that are called in this same manner, but for the life of me, I
 can't figure out why this is failing on 2.0 with a PHP script called this
 way.

Right now PATH_INFO is not automatically passed to PHP scripts in the
Apache 2.0 module for PHP. I have a patch on my plate that enables it
by default, but for now you can add AcceptPathInfo On to the directory
or location sections where you want it to work.

-aaron



Re: Odd URL (mis)behavior in 2.0

2002-05-17 Thread Cliff Woolley

On Fri, 17 May 2002, Dale Ghent wrote:

 I have a user who uses and odd URL scheme on his website. He has a PHP
 script, /d.php that is referenced in following manner: /d.php/foo.html
 where the /foo.html bit is passwd tothe d.v php script and the PHP
 script generates dynamic content based on that argument.
 On 1.3.x, this works fine. All the propper headers and content are
 returned by the server to the client.
 But in Apache 2.0 (running the same versoin of PHP - 4.2.1) a 404 status
 is returned and the Content-Type header has application/x-httpd-php
 rather than text/html.

Two things with Apache 2.0:

1) You need to set AcceptPathInfo On if you want to allow this behavior
2) Don't set the magic mime type application/x-httpd-php anymore, just
   do the AddOutputFilter PHP and AddInputFilter PHP directives.

--Cliff

--
   Cliff Woolley
   [EMAIL PROTECTED]
   Charlottesville, VA






Re: Odd URL (mis)behavior in 2.0

2002-05-17 Thread Dale Ghent

On Fri, 17 May 2002, Cliff Woolley wrote:

| 1) You need to set AcceptPathInfo On if you want to allow this behavior
| 2) Don't set the magic mime type application/x-httpd-php anymore, just
|do the AddOutputFilter PHP and AddInputFilter PHP directives.

mmmkay!

regarding #2, the README in the apache2filter directory of the PHP source
tree used to say (in pre-4.2.0 revs) to use Add*Filter PHP directives. But
now, since 4.2.0 was released, it commands to use the traditional
AddType method to activate PHP scripts.

Thanks!
/dale




Re: Odd URL (mis)behavior in 2.0

2002-05-17 Thread Cliff Woolley

On Fri, 17 May 2002, Dale Ghent wrote:

 regarding #2, the README in the apache2filter directory of the PHP source
 tree used to say (in pre-4.2.0 revs) to use Add*Filter PHP directives. But
 now, since 4.2.0 was released, it commands to use the traditional
 AddType method to activate PHP scripts.

Oh, I forgot we did that.  Sorry.  Yeah, x-httpd-php should be okay.
Presumably if you get the PATH_INFO thing set right, the rest will work.
The AddType thing is just shorthand for the two Add*Filter directives, by
the way:

static void php_insert_filter(request_rec *r)
{
if (r-content_type 
strcmp(r-content_type, application/x-httpd-php) == 0) {
php_add_filter(r, r-output_filters);
php_add_filter(r, r-input_filters);
}
}




--
   Cliff Woolley
   [EMAIL PROTECTED]
   Charlottesville, VA





RE: [PATCH] Implement -k option for httpd

2002-05-17 Thread William A. Rowe, Jr.

At 01:33 PM 5/17/2002, Allan Edwards wrote:
  I'm not going to finish it because:
 
  a) I'm not really sure what to do on Win32.

main.c(617) : error C2065: 'SIGHUP' : undeclared identifier
main.c(620) : error C2065: 'AP_SIG_GRACEFUL' : undeclared identifier
main.c(628) : warning C4013: 'kill' undefined; assuming extern returning int
Error executing cl.exe.

Maybe the best thing to do is follow the Windows model.
The shutdown/restart etc. processing is handled by the mpm
(on the rewrite_args hook), which is probably the
logical place to do this sort of thing.


Why not mpm_common.c code that follows the Windows model, but is
undefined on Win32 (and others that this just won't work)?

I eventually plan to get back to moving the Signals code into apr,
where services, console windows and Win9x pseduo-services all
live within the apr_signal schema.  Then we can borrow the mpm_common
code as well and much of the extra service fooness from mpm_winnt.

Bill





[PATCH] little configure.in quoting problem....

2002-05-17 Thread Pier Fumagalli

It _should_ go with  quotes as well, but in M4, we'd better use [] square
brackes, am I right?

Pier

--
[Perl] combines all the worst aspects of C and Lisp:  a billion of different
sublanguages in  one monolithic executable.  It combines the power of C with
the readability of PostScript. [Jamie Zawinski - DNA Lounge - San Francisco]




patch-configure.in.txt
Description: Binary data


Re: Odd URL (mis)behavior in 2.0

2002-05-17 Thread Rasmus Lerdorf

 Right now PATH_INFO is not automatically passed to PHP scripts in the
 Apache 2.0 module for PHP. I have a patch on my plate that enables it
 by default, but for now you can add AcceptPathInfo On to the directory
 or location sections where you want it to work.

That should go in.  Why would you not want $PATH_INFO?  I don't think it
should be configurable at all.  It should always be there.

-Rasmus




RE: [PATCH] Implement -k option for httpd

2002-05-17 Thread Allan Edwards

 Doesn't the new function need to be done before we hit ap_mpm_run()?

ap_run_rewrite_args gets called before ap_mpm_run in main().

 If main() doesn't know what's going on then how would it work?

I was talking about putting the bit that didn't compile 
on windows in the unix mpm, mainly the part inside:

if (sendsignal != AP_NONE  sendsignal != AP_START)

If this is common for all unix mpm's then as Will said 
it should go in mpm_common.c

Allan



Re: Odd URL (mis)behavior in 2.0

2002-05-17 Thread William A. Rowe, Jr.

At 05:50 PM 5/17/2002, Rasmus Lerdorf wrote:
  Right now PATH_INFO is not automatically passed to PHP scripts in the
  Apache 2.0 module for PHP. I have a patch on my plate that enables it
  by default, but for now you can add AcceptPathInfo On to the directory
  or location sections where you want it to work.

That should go in.  Why would you not want $PATH_INFO?  I don't think it
should be configurable at all.  It should always be there.

For PHP by default?  Yes, only if you are using a handler.

If you are filtering the output of another handler [which you can't do right
now, php2filter is really a handler in filter's clothing] you should have no
say about the handler's choices.

So Aaron's patch aught to provide the default - on mapping of AcceptPathInfo
for x-httpd-php content.

The point to AcceptPathInfo is that you don't want infinite recursion on 
handlers
such as the default handler for static content.  In fact, it's probably a 
good idea
to set AcceptPathInfo Off for all but the specific cgi/php/jk content that 
actually
uses a PATH_INFO namespace.

But that 'right solution' would have broken too many old applications, so the
default AcceptPathInfo behavior depends on the handler serving the content.
E.g. the default handler will defaults to off, while dynamic handlers such as
cgi/ssi default to on, as should PHP.

Bill





Re: cvs commit: httpd-2.0/server core.c

2002-05-17 Thread Cliff Woolley

On 17 May 2002 [EMAIL PROTECTED] wrote:

 wrowe   02/05/17 12:34:53

   Modified:server   core.c
   Log:
 We need to grab ServerRoot, LogLevel, and ErrorLog right off the bat
 as we are reading the config.

 This closes a bug where ServerRoot /foo + LoadModule relative/mod_foo.so
 won't load mod_foo.so.

   Reported by: Ron Leung [EMAIL PROTECTED]


Umm, every one of these directives being EXEC_ON_READ causes the server to
segfault hard at startup.  (I tried un-exec-on-reading them one at a time,
and it kept segfaulted on each one in turn until they were all gone.)

--Cliff


(gdb) bt
#0  find_parent (dirp=0x0, what=0x8123918 Directory) at core.c:957
#1  0x080d5298 in ap_check_cmd_context (cmd=0xb5a0, forbidden=30)
at core.c:993
#2  0x080d6cbe in set_loglevel (cmd=0xb5a0, dummy=0xbfffd3f0,
arg=0x819c5e0 warn) at core.c:2175
#3  0x080c7faa in invoke_cmd (cmd=0x812478c, parms=0xb5a0,
mconfig=0xbfffd3f0, args=0xbfffd459 ) at config.c:699
#4  0x080c8e73 in execute_now (cmd_line=0x819c5a8 LogLevel,
args=0xbfffd455 warn, parms=0xb5a0, p=0x813c960, ptemp=0x8190ab0,
sub_tree=0xbfffd3f0, parent=0x0) at config.c:1310
#5  0x080c8732 in ap_build_config_sub (p=0x813c960, temp_pool=0x8190ab0,
l=0xbfffd44c LogLevel warn, parms=0xb5a0, current=0xbfffd444,
curr_parent=0xbfffd448, conftree=0x812f4f4) at config.c:912
#6  0x080c8b42 in ap_build_config (parms=0xb5a0, p=0x813c960,
temp_pool=0x8190ab0, conftree=0x812f4f4) at config.c:1114
#7  0x080c926e in ap_process_resource_config (s=0x8143aa8,
fname=0x8194950 /root/apache/test/conf/httpd.conf, conftree=0x812f4f4,
p=0x813c960, ptemp=0x8190ab0) at config.c:1495
#8  0x080c9953 in ap_read_config (process=0x813a9d8, ptemp=0x8190ab0,
filename=0x8121a70 conf/httpd.conf, conftree=0x812f4f4) at config.c:1773
#9  0x080cb3b5 in main (argc=1, argv=0xb6f4) at main.c:552
#10 0x4033874f in __libc_start_main () from /lib/libc.so.6
(gdb) frame 1
#1  0x080d5298 in ap_check_cmd_context (cmd=0xb5a0, forbidden=30)
at core.c:993
993 if (((forbidden  NOT_IN_DIRECTORY)
(gdb) list
988 return apr_pstrcat(cmd-pool, cmd-cmd-name, gt,
989 cannot occur within Directory/Location/Files 
990section, NULL);
991 }
992
993 if (((forbidden  NOT_IN_DIRECTORY)
994   ((found = find_parent(cmd-directive, Directory))
995  || (found = find_parent(cmd-directive, DirectoryMatch
996 || ((forbidden  NOT_IN_LOCATION)
997  ((found = find_parent(cmd-directive, Location))
(gdb) p *cmd-err_directive
$2 = {directive = 0x819c5a8 LogLevel, args = 0x819c5d8 warn, next = 0x0,
  first_child = 0x0, parent = 0x0, data = 0x0,
  filename = 0x8197af0 /root/apache/test/conf/httpd.conf, line_num = 460}




--
   Cliff Woolley
   [EMAIL PROTECTED]
   Charlottesville, VA