Received: (qmail 7360 invoked by uid 2012); 22 Oct 1998 18:01:15 -0000 Message-Id: <19981022180115.7359.qmail@hyperreal.org> Date: 22 Oct 1998 18:01:15 -0000 From: Henry Escobar Reply-To: escobarh@saic.com To: apbugs@hyperreal.org Subject: Intergration of module in apache X-Send-Pr-Version: 3.2 >Number: 3272 >Category: apache-api >Synopsis: Intergration of module in apache >Confidential: no >Severity: non-critical >Priority: medium >Responsible: apache >State: closed >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Thu Oct 22 11:10:00 PDT 1998 >Last-Modified: Thu Oct 22 12:40:00 PDT 1998 >Originator: escobarh@saic.com >Organization: >Release: apache 1.3.3 >Environment: SunOS ********** 5.6 Generic sun4c sparc SUNW,Sun_4_65 >Description: I currently have implemented an nt authentication module for apache since I didn't like any of the currently registed modules... (which I plan to submit to the apache module database when I am happy with it) I am now attempting to create a ntauth.log file and was wondering where the correct/appropiate place I should open the log file. I want to avoid opening/closing the file all the time, and I want/need to make it as easy as possible to integrate into later versions of apache (I also don't want to use syslog either...). How/when/where should I create/open this file? Is there a way to do this without hacking the apache source code (too much)? [ side note: Where is a good resource to the apache API? so I don't have to bug you guys with questions like this! ] >How-To-Repeat: not really... not really a problem! >Fix: An added datastruct to apache for misc logs to be opened? >Audit-Trail: State-Changed-From-To: open-closed State-Changed-By: marc State-Changed-When: Thu Oct 22 11:16:16 PDT 1998 State-Changed-Why: Look at any of the mod_log* moduels for examples. You open it in the init stage, there are a few API functions you can use for various parts of it for consistency, etc. It shouldn't be difficult to figure out from the existing logging modules. The biggest difference is that you probably don't want to log to it from the logging stage, but when you are called to do authentication. There isn't really any great documentation on this sort of stuff right now, unfortunately. From: "Escobar, Henry J." To: marc@APACHE.ORG Cc: apbugs@APACHE.ORG Subject: RE: apache-api/3272: Integration of module in apache Date: Thu, 22 Oct 1998 12:23:07 -0700 Marc, I've already looked at that part of the code, but before I start hacking the apache code, I was wondering if there was an API to open a logfile and to get a file descriptor prior to when httpd is forked. The main reason I want to do this is so that when apache 1.x comes out, I can simply cp ~nt_auth/src/*.[ch] to ~apache/src/modules/extra make some changes in ~apache/src/modules/extra/Makefile compile and go. I want to avoid going into ~apache/src/main/http_main.c to get the logging capability I need. Since this web server will be authenticating all of the time, I want to minimize the overhead of opening and closing the log file (such as when apache changes stderr to be logs/error_log file -> which I am using for now). I also plan to only log when it authenticates as well... Please tell me there is a way around hacking apache... It will make my install script a lot more difficult with a lot of assumptions (ass-u-me-tions)!!!! Thanks in advance, -Henry From: Marc Slemko To: "Escobar, Henry J." Cc: Apache bugs database Subject: RE: apache-api/3272: Integration of module in apache Date: Thu, 22 Oct 1998 12:34:42 -0700 (PDT) On Thu, 22 Oct 1998, Escobar, Henry J. wrote: > Marc, > I've already looked at that part of the code, but before I start hacking > the apache code, I was wondering if there was an API to open a logfile and > to get a file descriptor prior to when httpd is forked. Again, look at mod_log_*. > > The main reason I want to do this is so that when apache 1.x comes out, I > can simply cp ~nt_auth/src/*.[ch] to ~apache/src/modules/extra > make some changes in ~apache/src/modules/extra/Makefile compile and go. > > I want to avoid going into ~apache/src/main/http_main.c to get the logging > capability I need. mod_log_* does not do anything in http_main.c. It only uses API calls. While there isn't a fully API to just open a logfile, it is only a dozen lines or so of code. All logging except from error logging is done completely by modules right now. >Unformatted: [In order for any reply to be added to the PR database, ] [you need to include in the Cc line ] [and leave the subject line UNCHANGED. This is not done] [automatically because of the potential for mail loops. ] [If you do not include this Cc, your reply may be ig- ] [nored unless you are responding to an explicit request ] [from a developer. ] [Reply only with text; DO NOT SEND ATTACHMENTS! ]