Received: (from majordom@localhost) by hyperreal.org (8.8.5/8.8.5) id XAA24362; Wed, 23 Jul 1997 23:28:04 -0700 (PDT) Received: from valis.worldgate.com (marcs@valis.worldgate.com [198.161.84.2]) by hyperreal.org (8.8.5/8.8.5) with ESMTP id XAA24327 for ; Wed, 23 Jul 1997 23:28:00 -0700 (PDT) Received: from localhost (marcs@localhost) by valis.worldgate.com (8.8.5/8.8.5) with SMTP id AAA07977 for ; Thu, 24 Jul 1997 00:27:58 -0600 (MDT) Date: Thu, 24 Jul 1997 00:27:58 -0600 (MDT) From: Marc Slemko To: new-httpd@apache.org Subject: Re: solaris HUP blues In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org On Wed, 23 Jul 1997, Dean Gaudet wrote: > Oh my gawd, we use SO_REUSEADDR? For some reason I've never noticed that. > This of course means that if a site tries to run a server on a port >= > 1024 that any old user can share the port with the server. Not that > there's not other problems with high-numbered ports ... but just an > observation. Yup. More like steal on most setups, since Apache is bound to INADDR_ANY. Some systems, like OpenBSD and Linux (? ... there have been so many broken implementions of this restriction on Linux that I'm not sure where the current score is...) do things like have a user credential associated with a socket and don't let other users bind to it. I won't bring up pserver again right now. Sigh. > > So you think the slack should just be moved after all the option settings? > Somehow I figured that'd be more dangerous. Sigh. I think we should say any version of Solaris before 2.6 is unsupported. Sigh. We can't have the option settings before ap_slack, because they may magically disappear on some systems when you do the dup(). We can't have ap_slack before the bind on Solaris, because that is broken. We can't have the options after the bind, because then the bind may fail. Can anyone verify my fear of systems loosing settings when you do a dup()? Ah. Ok, on Solaris we can do them before the bind and ap_slack, everywhere else we do them before the bind and after ap_slack. That is assuming Solaris doesn't loose socket options on a dup(). And no, keeping the sockets open across HUPs doesn't solve the SO_REUSEADDR problem.