https://issues.apache.org/bugzilla/show_bug.cgi?id=44755





--- Comment #4 from Ruediger Pluem <[EMAIL PROTECTED]>  2008-04-14 14:34:30 PST 
---
(In reply to comment #2)
> Created an attachment (id=21815)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=21815) [details]
> fix for 2.2.8 piped logger fd leaks
> 
> I've attached a patch which should fix this; a combined effort from Ruediger
> and I.  Can you try this out?
> 

Thanks for putting the patch here Joe. Actually the the call to
apr_file_inherit_unset is not directly linked to this report as it is no
regression. After some thoughts I think the following place would be better for
apr_file_inherit_unset as it would also solve the issue for all callers of 
ap_open_piped_log (e.g. the access logs). Furthermore I guess this would also
improve security as CGI scripts would no longer inherit these file descriptors
and thus would be no longer able to write directly to the access logs.

Index: server/log.c
===================================================================
--- server/log.c        (Revision 647395)
+++ server/log.c        (Arbeitskopie)
@@ -307,6 +307,7 @@
         if (rc == APR_SUCCESS) {
             apr_pool_note_subprocess(p, procnew, APR_KILL_AFTER_TIMEOUT);
             (*fpin) = procnew->in;
+            apr_file_inherit_unset(*fpin);
             /* read handle to pipe not kept open, so no need to call
              * close_handle_in_child()
              */


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to