Re: [PATCH] We have sysvsem on OpenBSD

2002-07-17 Thread Jeff Trawick

Henning Brauer [EMAIL PROTECTED] 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 -  1.10
 +++ src/include/ap_config.h   9 Jul 2002 06:42:15 -
 @@ -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 | [EMAIL PROTECTED]
Born in Roswell... married an alien...



Re: [PATCH] We have sysvsem on OpenBSD

2002-07-17 Thread Henning Brauer

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

2002-07-17 Thread Jim Jagielski

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 -  1.10
 +++ src/include/ap_config.h   9 Jul 2002 06:42:15 -
 @@ -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.


-- 
===
   Jim Jagielski   [|]   [EMAIL PROTECTED]   [|]   http://www.jaguNET.com/
  A society that will trade a little liberty for a little order
 will lose both and deserve neither - T.Jefferson



Re: [PATCH] We have sysvsem on OpenBSD

2002-07-17 Thread Henning Brauer

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 -  1.10
  +++ src/include/ap_config.h 9 Jul 2002 06:42:15 -
   -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.



Re: [PATCH] We have sysvsem on OpenBSD

2002-07-17 Thread Henning Brauer

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

2002-07-17 Thread Jim Jagielski

Henning Brauer wrote:
 
  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.
 

Looks like some messages were passing right by each other. I see the
other thread on the same topic :)

-- 
===
   Jim Jagielski   [|]   [EMAIL PROTECTED]   [|]   http://www.jaguNET.com/
  A society that will trade a little liberty for a little order
 will lose both and deserve neither - T.Jefferson



Re: [PATCH] We have sysvsem on OpenBSD

2002-07-17 Thread Jeff Trawick

Henning Brauer [EMAIL PROTECTED] 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 -   1.323
+++ src/include/ap_config.h 17 Jul 2002 14:23:39 -
@@ -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 | [EMAIL PROTECTED]
Born in Roswell... married an alien...



Re: [PATCH] We have sysvsem on OpenBSD

2002-07-17 Thread Jim Jagielski

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 -   1.323
 +++ src/include/ap_config.h   17 Jul 2002 14:23:39 -
 @@ -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
  

+1

-- 
===
   Jim Jagielski   [|]   [EMAIL PROTECTED]   [|]   http://www.jaguNET.com/
  A society that will trade a little liberty for a little order
 will lose both and deserve neither - T.Jefferson



Re: [PATCH] We have sysvsem on OpenBSD

2002-07-17 Thread Henning Brauer

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 -   1.323
 +++ src/include/ap_config.h   17 Jul 2002 14:23:39 -
  -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

2002-07-17 Thread Aaron Bannert

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 -   1.323
 +++ src/include/ap_config.h   17 Jul 2002 14:23:39 -
  -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

2002-07-17 Thread Ryan Bloom

 From: Aaron Bannert [mailto:[EMAIL PROTECTED]]

 
 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

2002-07-17 Thread Aaron Bannert

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