Re: mod_rewrite/3874: RewriteLock doesn't work for virtual hosts and silently fails

1999-08-03 Thread dgaudet
[In order for any reply to be added to the PR database, you need]
[to include [EMAIL PROTECTED] in the Cc line and make sure the]
[subject line starts with the report component and number, with ]
[or without any 'Re:' prefixes (such as general/1098: or  ]
[Re: general/1098:).  If the subject doesn't match this   ]
[pattern, your message will be misfiled and ignored.  The   ]
[apbugs address is not added to the Cc line of messages from  ]
[the database 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! ]


Synopsis: RewriteLock doesn't work for virtual hosts and silently fails

State-Changed-From-To: analyzed-closed
State-Changed-By: dgaudet
State-Changed-When: Tue Aug  3 11:17:29 PDT 1999
State-Changed-Why:
A patch has been applied to 1.3.8-dev which should fix this...
1.3.8 should be out shortly.

Dean



Re: mod_rewrite/3874: RewriteLock doesn't work for virtual hosts and silently fails

1999-04-21 Thread dgaudet
[In order for any reply to be added to the PR database, ]
[you need to include [EMAIL PROTECTED] 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! ]


Synopsis: RewriteLock doesn't work for virtual hosts and silently fails

State-Changed-From-To: open-analyzed
State-Changed-By: dgaudet
State-Changed-When: Tue Apr 20 16:52:34 PDT 1999
State-Changed-Why:
Ralf, how's it going?



Re: mod_rewrite/3874: RewriteLock doesn't work for virtual hosts and silently fails

1999-03-10 Thread Ralf S. Engelschall
The following reply was made to PR mod_rewrite/3874; it has been noted by GNATS.

From: Ralf S. Engelschall [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc:  Subject: Re: mod_rewrite/3874: RewriteLock doesn't work for virtual hosts 
and silently fails
Date: Wed, 10 Mar 1999 13:54:57 +0100

 In article [EMAIL PROTECTED] you wrote:
 
 [...]
  The lock file is opened during the init_child() phase and the file pointer is
  saved in that server_rec, but that config info isn't propagated to the 
  virtual 
  host config.  Since the file pointer isn't available, even though locking is 
  turned on, no locking is done and no warning is given and things break.
 How-To-Repeat:
  Add a logging line to rewritelock_alloc() like
  
  if (conf-rewritelockfp != -1) {
  fd_lock(r, conf-rewritelockfp);
  } else if (conf-rewritelockfile) {
ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ALERT, r,
 mod_rewrite: Don't have lockfile descriptor, can't 
  lock);
  }
  
  then use RewriteLock and RewriteMap inside and outside of a virtual host
  and you'll see that the lockfile fp isn't available through the virtual
  host config, so no locking is done.
 Fix:
  I moved the
  rewritelock_open(s, p);
  call from the init_child() function to the server for loop in 
  init_module() where the rewritelog open is as well, and that seems
  to have fixed it.
 
 You're right that there might be a problem caused by the fact that the
 filedescriptor isn't merged into virtual host.  But your solution (moving the
 rewritelock_open call to the init_module function) is incorrect, because this
 doesn't work on platforms where flock() is used.  Because under flock() based
 locking the file _has_ to be opened by the child. So the only solution seems
 to be to interate in init_child() over the virtual hosts.  I'll look at
 this...
Ralf S. Engelschall
[EMAIL PROTECTED]
www.engelschall.com


mod_rewrite/3874: RewriteLock doesn't work for virtual hosts and silently fails

1999-02-10 Thread Jeff Lewis

Number: 3874
Category:   mod_rewrite
Synopsis:   RewriteLock doesn't work for virtual hosts and silently fails
Confidential:   no
Severity:   serious
Priority:   medium
Responsible:apache
State:  open
Class:  sw-bug
Submitter-Id:   apache
Arrival-Date:   Wed Feb 10 13:30:02 PST 1999
Last-Modified:
Originator: [EMAIL PROTECTED]
Organization:
apache
Release:1.3.3
Environment:
SunOS wdev 5.5.1 Generic_103640-14 sun4u sparc SUNW,Ultra-1
gcc version 2.8.1
Description:
The lock file is opened during the init_child() phase and the file pointer is
saved in that server_rec, but that config info isn't propagated to the virtual 
host config.  Since the file pointer isn't available, even though locking is 
turned on, no locking is done and no warning is given and things break.
How-To-Repeat:
Add a logging line to rewritelock_alloc() like

if (conf-rewritelockfp != -1) {
fd_lock(r, conf-rewritelockfp);
} else if (conf-rewritelockfile) {
  ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ALERT, r,
   mod_rewrite: Don't have lockfile descriptor, can't lock);
}

then use RewriteLock and RewriteMap inside and outside of a virtual host
and you'll see that the lockfile fp isn't available through the virtual
host config, so no locking is done.
Fix:
I moved the
rewritelock_open(s, p);
call from the init_child() function to the server for loop in 
init_module() where the rewritelog open is as well, and that seems
to have fixed it.
Audit-Trail:
Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include [EMAIL PROTECTED] 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! ]