You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Henning Brauer <hb...@bsws.de> on 2002/07/17 13:42:31 UTC
[PATCH] We have sysvsem on OpenBSD
sorry if this appears twice, first one seems not to have made it.
we have sysvsem on OpenBSD and applied the following patch to ap_config.h
in our tree - would be nice to have it in the apache.org tree as well. this
is for apache 1.3.
Index: src/include/ap_config.h
===================================================================
RCS file: /cvs/src/usr.sbin/httpd/src/include/ap_config.h,v
retrieving revision 1.10
diff -u -r1.10 ap_config.h
--- src/include/ap_config.h 29 Mar 2002 02:08:05 -0000 1.10
+++ src/include/ap_config.h 9 Jul 2002 06:42:15 -0000
@@ -687,7 +687,11 @@
#define HAVE_MMAP 1
#define USE_MMAP_SCOREBOARD
#define USE_MMAP_FILES
+#if defined __OpenBSD__
+#define HAVE_SYSVSEM_SERIALIZED_ACCEPT
+#else
#define HAVE_FLOCK_SERIALIZED_ACCEPT
+#endif
#define SINGLE_LISTEN_UNSERIALIZED_ACCEPT
#elif defined(UTS21)
greetz
Henning
--
henning@openbsd.org
Re: [PATCH] We have sysvsem on OpenBSD
Posted by Aaron Bannert <aa...@clove.org>.
On Wed, Jul 17, 2002 at 07:23:08AM -0700, Ryan Bloom wrote:
> > Why isn't this being detected by autoconf? SysV semaphore support
> > isn't perfect yet and has some problems.
>
> Because this is Apache 1.3 which doesn't use autoconf. :-)
This is my brain -= sleep. :)
-aaron
RE: [PATCH] We have sysvsem on OpenBSD
Posted by Ryan Bloom <rb...@covalent.net>.
> From: Aaron Bannert [mailto:aaron@clove.org]
>
> On Wed, Jul 17, 2002 at 10:31:44AM -0400, Jeff Trawick wrote:
> > does everybody agree that this is preferable?
>
> Why isn't this being detected by autoconf? SysV semaphore support
> isn't perfect yet and has some problems.
Because this is Apache 1.3 which doesn't use autoconf. :-)
Ryan
Re: [PATCH] We have sysvsem on OpenBSD
Posted by Aaron Bannert <aa...@clove.org>.
On Wed, Jul 17, 2002 at 10:31:44AM -0400, Jeff Trawick wrote:
> does everybody agree that this is preferable?
Why isn't this being detected by autoconf? SysV semaphore support
isn't perfect yet and has some problems.
-aaron
> Index: src/include/ap_config.h
> ===================================================================
> RCS file: /home/cvs/apache-1.3/src/include/ap_config.h,v
> retrieving revision 1.323
> diff -u -r1.323 ap_config.h
> --- src/include/ap_config.h 3 Jun 2002 12:28:27 -0000 1.323
> +++ src/include/ap_config.h 17 Jul 2002 14:23:39 -0000
> @@ -688,6 +688,10 @@
> #define USE_MMAP_SCOREBOARD
> #define USE_MMAP_FILES
> #define HAVE_FLOCK_SERIALIZED_ACCEPT
> +#if defined(__OpenBSD__)
> +#define HAVE_SYSVSEM_SERIALIZED_ACCEPT
> +#define USE_SYSVSEM_SERIALIZED_ACCEPT
> +#endif
> #define SINGLE_LISTEN_UNSERIALIZED_ACCEPT
>
> #elif defined(UTS21)
Re: [PATCH] We have sysvsem on OpenBSD
Posted by Henning Brauer <hb...@bsws.de>.
On Wed, Jul 17, 2002 at 10:31:44AM -0400, Jeff Trawick wrote:
> does everybody agree that this is preferable?
>
> Index: src/include/ap_config.h
> ===================================================================
> RCS file: /home/cvs/apache-1.3/src/include/ap_config.h,v
> retrieving revision 1.323
> diff -u -r1.323 ap_config.h
> --- src/include/ap_config.h 3 Jun 2002 12:28:27 -0000 1.323
> +++ src/include/ap_config.h 17 Jul 2002 14:23:39 -0000
> @@ -688,6 +688,10 @@
> #define USE_MMAP_SCOREBOARD
> #define USE_MMAP_FILES
> #define HAVE_FLOCK_SERIALIZED_ACCEPT
> +#if defined(__OpenBSD__)
> +#define HAVE_SYSVSEM_SERIALIZED_ACCEPT
> +#define USE_SYSVSEM_SERIALIZED_ACCEPT
> +#endif
> #define SINGLE_LISTEN_UNSERIALIZED_ACCEPT
>
> #elif defined(UTS21)
that's exactly what I've commited in our tree, so I do agree ;-)
Re: [PATCH] We have sysvsem on OpenBSD
Posted by Jeff Trawick <tr...@attglobal.net>.
Henning Brauer <hb...@bsws.de> writes:
> On Wed, Jul 17, 2002 at 08:42:33AM -0400, Jeff Trawick wrote:
> > I would have thought you would add
> >
> > #if defined __OpenBSD__
> > #define HAVE_SYSVSEM_SERIALIZED_ACCEPT
> > #endif
> >
> > since you have flock too.
> >
> > If you want to force sysvsem be the default, add
> >
> > #define USE_SYSVSEM_SERIALIZED_ACCEPT
> >
> > in the __OpenBSD__ path.
> >
> > This way you allow the admin to choose flock if they really want.
>
> you're right.
> I'm on committing that change.
does everybody agree that this is preferable?
Index: src/include/ap_config.h
===================================================================
RCS file: /home/cvs/apache-1.3/src/include/ap_config.h,v
retrieving revision 1.323
diff -u -r1.323 ap_config.h
--- src/include/ap_config.h 3 Jun 2002 12:28:27 -0000 1.323
+++ src/include/ap_config.h 17 Jul 2002 14:23:39 -0000
@@ -688,6 +688,10 @@
#define USE_MMAP_SCOREBOARD
#define USE_MMAP_FILES
#define HAVE_FLOCK_SERIALIZED_ACCEPT
+#if defined(__OpenBSD__)
+#define HAVE_SYSVSEM_SERIALIZED_ACCEPT
+#define USE_SYSVSEM_SERIALIZED_ACCEPT
+#endif
#define SINGLE_LISTEN_UNSERIALIZED_ACCEPT
#elif defined(UTS21)
--
Jeff Trawick | trawick@attglobal.net
Born in Roswell... married an alien...
Re: [PATCH] We have sysvsem on OpenBSD
Posted by Henning Brauer <hb...@bsws.de>.
On Wed, Jul 17, 2002 at 08:42:33AM -0400, Jeff Trawick wrote:
> I would have thought you would add
>
> #if defined __OpenBSD__
> #define HAVE_SYSVSEM_SERIALIZED_ACCEPT
> #endif
>
> since you have flock too.
>
> If you want to force sysvsem be the default, add
>
> #define USE_SYSVSEM_SERIALIZED_ACCEPT
>
> in the __OpenBSD__ path.
>
> This way you allow the admin to choose flock if they really want.
you're right.
I'm on committing that change.
as we have privilege seperation (chroot & drop root privs in the parent)
now per default we don't want flock, no files writeable by www inside
ServerRoot.
Re: [PATCH] We have sysvsem on OpenBSD
Posted by Jeff Trawick <tr...@attglobal.net>.
Henning Brauer <hb...@bsws.de> writes:
> we have sysvsem on OpenBSD and applied the following patch to ap_config.h
> in our tree - would be nice to have it in the apache.org tree as well. this
> is for apache 1.3.
>
> Index: src/include/ap_config.h
> ===================================================================
> RCS file: /cvs/src/usr.sbin/httpd/src/include/ap_config.h,v
> retrieving revision 1.10
> diff -u -r1.10 ap_config.h
> --- src/include/ap_config.h 29 Mar 2002 02:08:05 -0000 1.10
> +++ src/include/ap_config.h 9 Jul 2002 06:42:15 -0000
> @@ -687,7 +687,11 @@
> #define HAVE_MMAP 1
> #define USE_MMAP_SCOREBOARD
> #define USE_MMAP_FILES
> +#if defined __OpenBSD__
> +#define HAVE_SYSVSEM_SERIALIZED_ACCEPT
> +#else
> #define HAVE_FLOCK_SERIALIZED_ACCEPT
> +#endif
> #define SINGLE_LISTEN_UNSERIALIZED_ACCEPT
>
> #elif defined(UTS21)
I would have thought you would add
#if defined __OpenBSD__
#define HAVE_SYSVSEM_SERIALIZED_ACCEPT
#endif
since you have flock too.
If you want to force sysvsem be the default, add
#define USE_SYSVSEM_SERIALIZED_ACCEPT
in the __OpenBSD__ path.
This way you allow the admin to choose flock if they really want.
--
Jeff Trawick | trawick@attglobal.net
Born in Roswell... married an alien...
Re: [PATCH] We have sysvsem on OpenBSD
Posted by Henning Brauer <hb...@bsws.de>.
On Wed, Jul 17, 2002 at 03:22:54PM +0200, Henning Brauer wrote:
> flock works with out chroot, but we don't want www-writeable files inside
> the chroot, so we default to sysvsem.
flock works with our chroot, that is.
Re: [PATCH] We have sysvsem on OpenBSD
Posted by Henning Brauer <hb...@bsws.de>.
On Wed, Jul 17, 2002 at 09:18:34AM -0400, Jim Jagielski wrote:
> Henning Brauer wrote:
> >
> > sorry if this appears twice, first one seems not to have made it.
> >
> > we have sysvsem on OpenBSD and applied the following patch to ap_config.h
> > in our tree - would be nice to have it in the apache.org tree as well. this
> > is for apache 1.3.
> >
> > Index: src/include/ap_config.h
> > ===================================================================
> > RCS file: /cvs/src/usr.sbin/httpd/src/include/ap_config.h,v
> > retrieving revision 1.10
> > diff -u -r1.10 ap_config.h
> > --- src/include/ap_config.h 29 Mar 2002 02:08:05 -0000 1.10
> > +++ src/include/ap_config.h 9 Jul 2002 06:42:15 -0000
> > @@ -687,7 +687,11 @@
> > #define HAVE_MMAP 1
> > #define USE_MMAP_SCOREBOARD
> > #define USE_MMAP_FILES
> > +#if defined __OpenBSD__
> > +#define HAVE_SYSVSEM_SERIALIZED_ACCEPT
> > +#else
> > #define HAVE_FLOCK_SERIALIZED_ACCEPT
> > +#endif
> >
>
> Why the "#else" part? Does OpenBSD lack flock() or is it because of
> the new 'chroot' that your version does, but the .org doesn't. If the
> latter, I'd prefer allowing both with the official ASF code.
oversight on our part.
I just commited a fix.
flock works with out chroot, but we don't want www-writeable files inside
the chroot, so we default to sysvsem.